2025-07-27 1:02 AM
I am using the object detection code from ST model zoo.
I have a small image of 4X4 example:
const uint8_t myImage[NN_HEIGHT] [ NN_WIDTH]= {
// Row 0 (all black)
{ 255, 0, 0, 0},
// Row 1 (black, then white dot, then black)
{ 0, 255, 255, 0}, // Pixels 1 and 2 are white (center of a 2x2 dot)
// Row 2 (black, then white dot, then black)
{0, 255, 255, 0},// Pixels 1 and 2 are white
// Row 3 (all black)
{0, 0, 0, 0}
};
I want to see the output as number of dots.
I dont use the camera or display unit of the N6-DK board and I am using memcpy to load the image to the input buffer(nn_in)
The image is also loading into the input buffer as when I put a bp at the memcpy line and see nn_in its first value is shown as 255 'y'
but when I see the output which is stored in pp_output the number of objects detected are 0.
Why do i see that value??
Is using memcpy to load images to input buffer correct?
If not, why and how can I adopt another workflow?
Is there an issue with my image input??
Thanks in advance!
2025-07-28 1:45 AM
Hello @Supraja_Kurella,
You are working with 4x4 images to detect white dots.
You gave the example of:
{ 255, 0 , 0 , 0}
{ 0 , 255, 255, 0}
{0 , 255, 255, 0}
{0 , 0 , 0 , 0}
And so here your output should be 5, correct?
You mentioned model zoo code? Are you using one of the models? Did you retrain one? I doubt that the input model form the code you use is of size 4x4.
Do you perform some simple tests here? I don't see the need to use AI for that.
Have a good day,
Julian
2025-07-28 2:41 AM
I used object detection code from the model zoo and commented out the camera code and used memcpy to load my image to input buffer.
Is there anything else I need to do..?