ermig1979 / Synet

A small framework to infer neural network
MIT License
137 stars 26 forks source link

Grayscale frames performance/accuracy #15

Closed edward9112 closed 4 years ago

edward9112 commented 4 years ago

Hello,

How do grayscale frames (instead of bgra) affect performance and detection accuracy of Synet algorithms?

Thank you

ermig1979 commented 4 years ago

Hello!

Synet only performs inference of trained network. If format of input image is differ from internal format of network Synet performs conversion of input image to required internal format. Ordinary the image conversion time is much lesser than inference of neural network. If you use grayscale image than color information is lost and it can lead to accuracy degradation (usually it is insignificant accurcy loss).

To resize image to neural network input is better to use function Simd::Resize with parameter ::SimdResizeMethodArea.

edward9112 commented 4 years ago

Thank you so much for the descriptive reply! Another question, is there any common recommendation for the optimal input image size? Or it all depends on the network and objects size?

ermig1979 commented 4 years ago

There are neural models which support resizing. But most of them are trained for fixed input size. And of course the input size is determined by size of detected objects.

edward9112 commented 4 years ago

Thank you very much for clearing that out. I really admire your job with Simd, top class coding!