dCubelic / BelaDetector

3 stars 0 forks source link

Lots of classes will slow down recognition speed on iOS15 #2

Open caichunjian520 opened 2 years ago

caichunjian520 commented 2 years ago

I have a project recognize 52 playing cards. So there are 52 classes. It works fine on iPhone XR iOS14(drawing bounding box when detect multiple playing cards). But on iOS15, the detection will delay about 2 seconds.

I didn't change any code, just update my iPhone XR from iOS14 to iOS15.

On iPhone 13, it works fine.

How can I change some code to make it work like on iOS14?

dCubelic commented 2 years ago

Hi,

are you using the code and the model from this project or do you have your own variations? I would need a bit more information as I have not yet encountered those errors.

caichunjian520 commented 2 years ago

Most of the code I am using is from this project, I just remove the score and the label and add bounding box when detecting playing cards. I will try this original project with my own yolov3 trained model.

I have tried yolov5s mlmodel file(including Non-Maximum Suppression) with Apple's object detection example project. It works much better than yolov3. It even works well on my iPhone 6S, less than 0.5s delay.

I guess if adding Non-Maximum Suppression when converting from yolov3 weights file to mlmodel file will speed up the detection and will reduce a lot of code in project.