- YOLOv8_TO.ipynb +0 -0
- utils/yolo_utils.py +0 -5
YOLOv8_TO.ipynb
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
utils/yolo_utils.py
CHANGED
@@ -146,11 +146,6 @@ def run_model(model, image, conf=0.05, iou=0.5, imgsz=640):
|
|
146 |
results = model(image, conf=conf, iou=iou, imgsz=imgsz)
|
147 |
return results
|
148 |
|
149 |
-
def save_results(results, filename='results.jpg'):
|
150 |
-
for r in results:
|
151 |
-
im_array = r.plot(boxes=True, labels=False, line_width=1)
|
152 |
-
im = Image.fromarray(im_array[..., ::-1])
|
153 |
-
im.save(filename)
|
154 |
|
155 |
def process_results(results, input_image):
|
156 |
diceloss = CustomDiceLoss()
|
|
|
146 |
results = model(image, conf=conf, iou=iou, imgsz=imgsz)
|
147 |
return results
|
148 |
|
|
|
|
|
|
|
|
|
|
|
149 |
|
150 |
def process_results(results, input_image):
|
151 |
diceloss = CustomDiceLoss()
|