Giter Club home page Giter Club logo

Comments (6)

jhony2507 avatar jhony2507 commented on July 27, 2024 1

Open your .param in Netron website : Screenshot_20230519_222033_Chrome Then you'll see the convolution output names.

For your model, you may use : "/model.77/m.0/Conv_output_0" instead of "output" "/model.77/m.1/Conv_output_0" instead of "286" "/model.77/m.2/Conv_output_0" instead of "298"

dadin852

It worked!!

I greatly appreciate your help! It was extremely useful!

from ncnn-android-yolov7.

dadin852 avatar dadin852 commented on July 27, 2024

Next, go to these reference :
https://youtu.be/PukcRMN-Hs0
https://youtu.be/gOvvzS1-RuI
https://blog.csdn.net/qq_43268106/article/details/127139216

Finally, we need to change output name to Convolution, instead of Permute :
螢幕擷取畫面 (2)
螢幕擷取畫面 (3)

Thank @xiang-wuu so much for this example!

from ncnn-android-yolov7.

jhony2507 avatar jhony2507 commented on July 27, 2024

Hi dadin852,

I followed the steps recommended by you and in the videos indicated, but I still have a problem. The application closes right after turning on the camera.
Using the weights available here in git (assets/yolov7-tiny.bin and yolov7-tiny.param) the application works normally on my cell phone.

Do you have any ideas to help me? Below is the modified excerpt from yolo.cpp
yolo-tuny-custom

from ncnn-android-yolov7.

dadin852 avatar dadin852 commented on July 27, 2024

Seems that you're using Premute outputs. Would you try to set Convolution as outputs?
239368588-2d584147-b114-4aec-9459-e59a6c61c1b2

from ncnn-android-yolov7.

jhony2507 avatar jhony2507 commented on July 27, 2024

Seems that you're using Premute outputs. Would you try to set Convolution as outputs? 239368588-2d584147-b114-4aec-9459-e59a6c61c1b2

Thanks for your feedback dadin852!

Unfortunately, I don't think I have enough experience to make this change.

I'm exporting the trained weights from pytroch to onnx with the command:

python export.py --weights yolov7-tiny.pt --simplify --topk-all 100 --iou-thres 0.50 --conf-thres 0.15 --img-size 448 448 --max-wh 448

to export from onnx to ncnn use:
./onnx2ncnn yolov7-tiny.onnx yolov7-tiny.param yolov7-tiny.bin

Should the changes suggested by you be made directly in the generated .param file or in the onnx file?

Below I am sending the generated .param file.
yolov7-tiny.zip

from ncnn-android-yolov7.

dadin852 avatar dadin852 commented on July 27, 2024

Open your .param in Netron website :
Screenshot_20230519_222033_Chrome
Then you'll see the convolution output names.

For your model, you may use :
"/model.77/m.0/Conv_output_0" instead of "output"
"/model.77/m.1/Conv_output_0" instead of "286"
"/model.77/m.2/Conv_output_0" instead of "298"

from ncnn-android-yolov7.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.