-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdetect.py
More file actions
21 lines (20 loc) · 932 Bytes
/
Copy pathdetect.py
File metadata and controls
21 lines (20 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import warnings
warnings.filterwarnings('ignore')
from ultralytics import YOLO
if __name__ == '__main__':
model = YOLO('/final/FRNet/runs/train/SCB3/yolo11/weights/best.pt') # select your model.pt path
model.predict(source='/final/datasets/SCB-Dataset/SCB3.yaml',
imgsz=640,
project='runs/detect/SCB3',
name='yolo11',
save=True,
# conf=0.2,
# iou=0.7,
agnostic_nms=True,
visualize=True, # visualize model features maps
# line_width=2, # line width of the bounding boxes
# show_conf=False, # do not show prediction confidence
# show_labels=False, # do not show prediction labels
save_txt=True, # save results as .txt file
save_crop=True, # save cropped images with results
)