Khadas VIM3 custom one-class YOLOv3 inference issue

@Frank thanks. Looking forward to your solution.

@Akkisony What is your model used to identify classification?

@Frank I am sorry, I dint get your question.

@Akkisony What is the class lists of your model ?

@Akkisony I use you model and using the code of my hand demo, it runs very well, I think your code processing has a problem.

@Frank Thanks. I am also using the demo code of tengine sdk, but I hv problem with Non-Max Supression. Can you please hv a look at the .cpp file attached in the link?
https://drive.google.com/drive/folders/14wDTO81KBYYfyz0Jj0aWsCXWFixbHpwS?usp=sharing

@Akkisony

@Frank

@Akkisony I don’t have time to check your code for you. I can only help you confirm that your problem lies in your code. You should debug your code yourself. There is no problem with your model file, I have confirmed it

@Frank Thanks. Can you please delete your previous message with the output image? Just for data protection purpose.

@Akkisony It has been deleted. If there is any part related to privacy in the future, you can send me a private message

1 Like

@Frank @alcohol
Can you please try the model with Tengine SDK as you had verified with NPU SDK last time?
Before, tengine sdk was working fine with my custom dataset using the demo code - tengine_khadas_yolov3-picture.cpp. But now, there is a problem with non max supression I guess.
Was there any changes made?
Can you please try it with tengine sdk?

I hv changed the following parameters:
const int classes=1;
const char *coco_names[1]={“a”};

But I get 4000 detections in a single frame. Please check using Tengine SDK.

Please find the converted model (tmfile): 1-class-wng - Google Drive

Thanks in advance

@Akkisony You have to wait until I have time to help you test this problem

@Frank Sure, but please make some time soon, as I have a release coming up soon. Thanks in advance!

@Frank Could you find some time and try the same model with Tengine SDK? The coverted model can also be found in the link above. @Frank I hope to get a probable solution before the christmas holidays. It will help me a lot. Thanks again!

@Akkisony OK , I will test it next week

@Akkisony Share me some test pictures. what is you class list ?

@Akkisony Hello. I did a very detailed test on this question.

I used your model, the official yolov3 model, and my yoloface single-class model for testing.

I think your problem is related to the training of the model itself. Your activation function is ReLU, and my activation function is leaky.

When the function ReLU is activated, the problem of inaccurate detection always occurs in the third yolo output layer. This resulted in the identification of countless boxes.

If you insist on using tengine, you can use my cfg to train your single classification.

@Frank Thanks for your time in investigating the problem. Just for your info, I had also trained using 2 classes, using ReLU. Yet, I faced the same problem.

However, I will try using Leaky and your config file and update you with the result.

Thanks again. :slight_smile:

@Akkisony Okay, you can try to do this, give it a try, just use my cfg to train your data