WongKinYiu / ScaledYOLOv4

Scaled-YOLOv4: Scaling Cross Stage Partial Network
GNU General Public License v3.0
2.02k stars 575 forks source link

FPS calculations #266

Open alex2021873 opened 3 years ago

alex2021873 commented 3 years ago

Dear WongKinYui,

first of all, thank you for your work. I have been doing some tests with your new yolov4 large on google-Collaboratory environment , and I ve a question.

Branch yolov4_large

when detection if the batch-size = 16 as default and the time results from detection (AVG)= 0.053 means this ~19Fps does the result = 16 X 19 = 304 or only 19

Namespace(agnostic_nms=False, augment=False, classes=None, conf_thres=0.5, device='', img_size=896, iou_thres=0.6, output='inference/output', save_txt=True, source='../test/images', update=False, view_img=False, weights=['./runs/exp0_yolov4large/weights/best.pt'])

image 1/36 /content/test/images/BloodImage_00038.jpg: 896x640 2 Plateletss, 19 RBCs, 1 WBCs, Done. (0.053s) image 2/36 /content/test/images/BloodImage_00044.jpg: 896x640 3 Plateletss, 17 RBCs, 2 WBCs, Done. (0.053s) image 3/36 /content/test/images/BloodImage_00062.jpg: 896x640 1 Plateletss, 14 RBCs, 2 WBCs, Done. (0.053s)

@WongKinYiu

WongKinYiu commented 3 years ago

when detection if the batch-size = 16 as default and the time results from detection (AVG)= 0.053 means this ~19Fps does the result = 16 X 19 = 304 or only 19

only 19.

image 1/36 /content/test/images/BloodImage_00038.jpg: 896x640 2 Plateletss, 19 RBCs, 1 WBCs, Done. (0.053s) image 2/36 /content/test/images/BloodImage_00044.jpg: 896x640 3 Plateletss, 17 RBCs, 2 WBCs, Done. (0.053s) image 3/36 /content/test/images/BloodImage_00062.jpg: 896x640 1 Plateletss, 14 RBCs, 2 WBCs, Done. (0.053s)

this seems batch size is 1, could you show your command?

alex2021873 commented 3 years ago

!python detect.py --weights ./runs/exp0_yolov4large/weights/best.pt --img 896 --conf 0.5 --iou_thres 0.6 --source ../test/images

WongKinYiu commented 3 years ago

detect.py has no batch-size argument, default value is 1.

alex2021873 commented 3 years ago

where we can calculate Fps

alex2021873 commented 3 years ago

i mean do there any argument to show the Fps