OlafenwaMoses / ImageAI

A python library built to empower developers to build applications and systems with self-contained Computer Vision capabilities
https://www.genxr.co/#products
MIT License
8.58k stars 2.19k forks source link

Confussing about the detection speed selection on imageai object detection pretrain model #756

Open aaghiijnnuz opened 2 years ago

aaghiijnnuz commented 2 years ago

I tried the pretrained model to process my image and confused on some of the detection speed option.

As you can see from the source code , there are some detection speed option for adjustment. But some of the adjustment option may lead to error, which have been listed below.

https://github.com/OlafenwaMoses/ImageAI/blob/fe2d6bab3ddb1027c54abe7eb961364928869a30/imageai/Detection/__init__.py#L159

https://github.com/OlafenwaMoses/ImageAI/blob/fe2d6bab3ddb1027c54abe7eb961364928869a30/imageai/Detection/__init__.py#L175

I tested other cases and find out the reason may be the number in the options can not be divided by 32. I do not know if it is set on purpose, but I hope it can be fixed.

ps: This is the pretrained model. Which I have been used. YOLOv3 (Size = 237 mb, moderate performance and accuracy, with a moderate detection time) TinyYOLOv3 (Size = 34 mb, optimized for speed and moderate performance, with fast detection time)