Alessio Grancini
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -250,10 +250,13 @@ def get_detection_data(image_data):
|
|
250 |
img = cv2.cvtColor(img, cv2.COLOR_RGB2BGR)
|
251 |
|
252 |
#image = utils.resize(img)
|
|
|
|
|
253 |
image = img
|
254 |
print(f"Debug - Original image shape: {image.shape}")
|
|
|
255 |
image_segmentation, objects_data = img_seg.predict(image)
|
256 |
-
depthmap, depth_colormap = depth_estimator.make_prediction(
|
257 |
|
258 |
detections = []
|
259 |
for idx, obj in enumerate(objects_data):
|
|
|
250 |
img = cv2.cvtColor(img, cv2.COLOR_RGB2BGR)
|
251 |
|
252 |
#image = utils.resize(img)
|
253 |
+
resized_image = utils.resize(img) #depth requires resizing
|
254 |
+
print(f"Debug - Resized image shape: {resized_image.shape}")
|
255 |
image = img
|
256 |
print(f"Debug - Original image shape: {image.shape}")
|
257 |
+
|
258 |
image_segmentation, objects_data = img_seg.predict(image)
|
259 |
+
depthmap, depth_colormap = depth_estimator.make_prediction(resized_image)
|
260 |
|
261 |
detections = []
|
262 |
for idx, obj in enumerate(objects_data):
|