Update app.py
Browse files
app.py
CHANGED
@@ -101,11 +101,11 @@ def postprocess(pred, img0_shape, img):
|
|
101 |
def detect_objects(image_path):
|
102 |
#dicom_image, dicom_meta = read_and_preprocess_dicom(image_path)
|
103 |
img, img0 = preprocess_image(image_path)
|
104 |
-
img, img0 = preprocess_image(dicom_image)
|
105 |
pred = infer(model, img)
|
106 |
results = postprocess(pred, img0.shape, img)
|
107 |
#results = postprocess(pred, dicom_image, img)
|
108 |
-
return results
|
109 |
|
110 |
def draw_bounding_boxes(img, results):
|
111 |
for (x1, y1, x2, y2), conf, cls in results:
|
|
|
101 |
def detect_objects(image_path):
|
102 |
#dicom_image, dicom_meta = read_and_preprocess_dicom(image_path)
|
103 |
img, img0 = preprocess_image(image_path)
|
104 |
+
#img, img0 = preprocess_image(dicom_image)
|
105 |
pred = infer(model, img)
|
106 |
results = postprocess(pred, img0.shape, img)
|
107 |
#results = postprocess(pred, dicom_image, img)
|
108 |
+
return results #, dicom_image
|
109 |
|
110 |
def draw_bounding_boxes(img, results):
|
111 |
for (x1, y1, x2, y2), conf, cls in results:
|