Skip to content
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

YoloV3 conversion for the current model #30

Open
yechta opened this issue Jan 12, 2022 · 6 comments
Open

YoloV3 conversion for the current model #30

yechta opened this issue Jan 12, 2022 · 6 comments

Comments

@yechta
Copy link

yechta commented Jan 12, 2022

Hello there,

I have been trying to implement this code for my custom model which uses YoloV3. When I get to the _outputShapes part, I get an error since the default model and mine aren't compatible.

The default model's output shape looks like this: [[1, 10, 4], [1, 10], [1, 10], [1]]

My model's output shape on the other hand, looks like this: [[1, 10647, 6]]

Here is where the problem is. I need to convert this part of code for my model.

    TensorBuffer outputLocations = TensorBufferFloat(_outputShapes[0]);

    TensorBuffer outputClasses = TensorBufferFloat(_outputShapes[1]);

    TensorBuffer outputScores = TensorBufferFloat(_outputShapes[2]);

    TensorBuffer numLocations = TensorBufferFloat(_outputShapes[3]);

What do I need to do in order for my custom model to work?

@Romoule
Copy link

Romoule commented Feb 3, 2022

@yechta Did you find a workaround ?

@Abdullah-Majeed
Copy link

Hey! @yechta @Romoule, Did you find anything about this problem?

@ayazmhmd
Copy link

anyone ?

@Romoule
Copy link

Romoule commented Jan 30, 2023

@Abdullah-Majeed @ayazmhmd Yep.

To put it simply, a step is missing to convert the current ouput ( [[1, LARGE_NUMBER, SMALL_NUMBER]] ) to the default one. The missing step is the non max suppression (NMS).
I successfully converted the output by reimplementing this algorithm in Flutter (to check the algo, you can check the official YOLOv5). I can suggest to you to use the package matrix2d to help you with the reimplementation.

@ayazmhmd
Copy link

ayazmhmd commented Feb 3, 2023

Can you tell us where we need to change the code

@asliZenith
Copy link

@Romoule how do i change it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants