AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.65k stars 7.96k forks source link

using higher batch size in test time #2512

Open robosina opened 5 years ago

robosina commented 5 years ago

Hi, Do we could change batch size in yolo_v2_class.cpp to decrease test time evaluation ? I have changed the batch size, but my program crashed because of segmentation fault, So do you have any advice how to change src to get result.

I changed the below line https://github.com/AlexeyAB/darknet/blob/dd0fdfb684aea43932c3851c4ed4c6b480b4dfba/src/yolo_v2_class.cpp#L126

and

https://github.com/AlexeyAB/darknet/blob/dd0fdfb684aea43932c3851c4ed4c6b480b4dfba/src/yolo_v2_class.cpp#L130

and recompile the src

I'm thinking that I should change the below lines

https://github.com/AlexeyAB/darknet/blob/dd0fdfb684aea43932c3851c4ed4c6b480b4dfba/src/yolo_v2_class.cpp#L255-L266

But how I can put images in Memory to support batch size?(Please not that I'm using OpenCv in test time)

ttdd11 commented 5 years ago

@robosina Did you figure this out?