pytorch-yolo-v3 icon indicating copy to clipboard operation
pytorch-yolo-v3 copied to clipboard

Number of Images inference

Open tomhayat opened this issue 6 years ago • 4 comments

Hi, Thank you for your work. It is really easier to use pytorch instead of darknet. Nevertheless, I have tried to run the command on a folder with thousands of images python3 detect.py --images img --det det --reso 320 --weights yolov3.weights And got a killed error:

Loading network.....
Network successfully loaded
Killed

I don't know why it is working for few images and not for more. I have tried to use a batch size of 1 image but I still get the same error. Thanks in advance

tomhayat avatar May 12 '18 16:05 tomhayat

How many images are we talking here? All the image addresses are loaded into a list called imlist before the detector is run. You think we might have an overflow, or some MemoryIO error. Could you try to locate exactly at which line the problem occurs?

ayooshkathuria avatar May 18 '18 10:05 ayooshkathuria

it loads the all images inside the folder at once, so if your RAM can't handle thousands of images, then it wont work. batch size is only for the network, all images are loaded onto memory at once.

skrish13 avatar May 21 '18 02:05 skrish13

@skrish13 is right. @tomhayat Will implement a DataLoader class to load images in the coming week or so, then it wouldn't be a problem.

ayooshkathuria avatar Jun 11 '18 19:06 ayooshkathuria

@ayooshkathuria I'm sure you know it but it worth a try. Pytorch have a really nice ImageLoader class, just assets that the images are well organized in a folder it will load them by batch automatically ;)

ierezell avatar Nov 18 '18 22:11 ierezell