Do you have a color image recognition image management library?

Asked 2 years ago, Updated 2 years ago, 40 views

SPRESENSE implements image recognition, and Arduino IDE's sample sketch number_recognition.ino uses NetPBM.h's monochrome PBM file image library.

If SPRESENSE wants to implement a class classification network with 3(RBG) x 100x100 pixel input learned from the Neural Network Console, how can I input dnnrt.inputVariable?

No matter how you look at it, it seems that you can't do it without a library of color (JPG) images.

Enter a description of the image here

spresense

2022-09-29 22:44

1 Answers

The image data used for DNN image recognition should be RGB RAW data, not JPG.JPG is a completely different column of data depending on the compression rate and small differences in the image, so it cannot be used for recognition or learning.

1) If you want to use the data obtained by the SPRESENSE camera as recognition data
In this case, the camera image needs to be converted to RGB, but I think pages 13-15 of the next slide will be helpful.

https://www.slideshare.net/YoshinoriOota/spresense-study-meeting1-how-to-use-the-camera-board

In this example, only YV data is extracted from YUV, but if you do YUV->RGB conversion in this routine, you can use it as input data for color images.

2) If you want to use the data obtained by the SPRESENSE camera as learning data
The PNM (NetPBM) format is so simple that you can easily create your own.

https://ja.wikipedia.org/wiki/PNM_(%E7%94%BB%E5%83%8F%E3%83%95%E3%82%A9%E3%83%BC%E3%83%9E%E3%83%83%E3%83%88)

If you record the data obtained by the camera in PNM format on an SD card and convert it to PNG using ImageMagik on your PC, you can use it as NNC learning data.

That's all for your information.


2022-09-29 22:44

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.