-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Poor Classification Performance on Crazyflie AI-deck #145
Comments
A great starting point is to use Additionally I’ll give some pointers to help you troubleshoot, but the actual implementation and training fall under the user’s responsibility of course. A good first step is to verify that the network performs well on your computer. This helps ensure that the model is properly trained and hasn’t fallen into issues like overfitting or poor generalization. For example, if your dataset is heavily skewed towards one class, such as mostly background images, the model might have learned to always predict background. This could result in the network getting stuck in a local minimum. Another important factor to consider is quantization. By default, the GAP8 deploys a quantized version of the network (quantized in TensorFlow), which can introduce performance drops due to reduced precision. Please check whether the quantized version of the network performs well on your computer. You should also ensure that the dataset used for training closely matches the conditions of the deployed environment. Deep learning models can be highly sensitive to environmental variations. Similarly, verify that the images fed to the network are in the expected format, including dimensions, color channels, and any preprocessing steps like normalization or scaling. |
Thank you for your response.
|
Are you using the color or grayscale camera? |
I am using the grayscale camera. |
I meant to suggest manually using classification.c:68:4: warning: pointer targets in passing argument 1 of 'classificationCNN' differ in signedness [-Wpointer-sign]
(cameraBuffer, Output_1);
^~~~~~~~~~~~
In file included from classification.c:32:0:
/tmp/bitcraze/aideck-gap8-examples/examples/ai/classification/BUILD_MODEL_SQ8BIT/classificationKernels.h:535:12: note: expected 'signed char * restrict' but argument is of type 'unsigned char *' may be problematic |
What could I do to address this? As you probably know,
Thanks |
You can convert your cameraBuffer to the expected type.
I would try to get the model working as expected in |
Which version of docker-aideck are you using? |
I am using the same version. Do you also get the same warning when using the |
I am getting the same, try adding |
Hi @gemenerik, thank you for your help. The warning has been resolved, but now, regardless of the input, the network only outputs the custom class (in my case, the cap class). I'll continue investigating on my own, but any further assistance would be greatly appreciated. |
Following the steps in the Classification Demo, I was able to fine-tune the model with my custom dataset (with an higher number of images respect to the provided training data) as explained in the guide. I tested the model on my laptop using new images, and while it’s not perfectly accurate, it works most of the time and it is able to distinguish between two classes:
cap
andbackground
. However, when I deploy the model on the AI-deck following the provided instructions, the network mostly detects only the background class.Does anyone have suggestions on why this might be happening and how I can debug or resolve the issue?
The text was updated successfully, but these errors were encountered: