Alessio Grancini
commited on
Update image_segmenter.py
Browse files- image_segmenter.py +2 -1
image_segmenter.py
CHANGED
@@ -42,7 +42,8 @@ class ImageSegmenter:
|
|
42 |
image = image.copy()
|
43 |
#predictions = self.model.predict(image)
|
44 |
# Use the original image resolution (1512x1008) instead of default YOLO resize
|
45 |
-
predictions = self.model.predict(image, imgsz=(1512, 1008), conf=self.confidence_threshold)
|
|
|
46 |
|
47 |
cls_ids = predictions[0].boxes.cls.cpu().numpy()
|
48 |
bounding_boxes = predictions[0].boxes.xyxy.int().cpu().numpy()
|
|
|
42 |
image = image.copy()
|
43 |
#predictions = self.model.predict(image)
|
44 |
# Use the original image resolution (1512x1008) instead of default YOLO resize
|
45 |
+
# predictions = self.model.predict(image, imgsz=(1512, 1008), conf=self.confidence_threshold)
|
46 |
+
predictions = self.model.predict(image, imgsz=(1536, 1024), conf=self.confidence_threshold)
|
47 |
|
48 |
cls_ids = predictions[0].boxes.cls.cpu().numpy()
|
49 |
bounding_boxes = predictions[0].boxes.xyxy.int().cpu().numpy()
|