sipeed / maix_train

k210(MaixPy)/V831 model example train code, include mobilenet classifier and YOLO V2 detector
https://wiki.sipeed.com/maixpy
Apache License 2.0
84 stars 39 forks source link

Small Objects Detection #18

Open diazGT94 opened 2 years ago

diazGT94 commented 2 years ago

I've a balanced dataset of 550 images with two classes, one of the classes has smaller objects than the other one.

Input Size [3x224x224]

When I set the training script using as input size [3x224x224] the performance of the second class is really terrible compared to the first class. But this size model can be deployed correctly in the Maix-II board

image

Input Size [3x416x416]

When I set the input size to [3x416x416] the results for both classes are better compared to the previous ones. However, when I tried to make the inference of this model in the board it crashes, loading the model to the board is successful but inference it seems that the board is running out of memory. Is it possible for the Maix-II board to support that kind of image resolution as input?

image

diazGT94 commented 2 years ago

This is the error I always get when I try to deploy my 3x416x416 model in the board. It's always triggered when the script executes the forward function. out = m.forward(img.resize((416,416)), quantize=True, layout="hwc") image