Giter Club home page Giter Club logo

Comments (17)

WongKinYiu avatar WongKinYiu commented on July 22, 2024 8

#11 (comment) should be corrected.

    line 903 in utils/general.py 
    prediction = prediction[0][1]  # select only inference output, [0][0] for aux prediction, [0][1] for main prediction.

from yolov9.

spacewalk01 avatar spacewalk01 commented on July 22, 2024 6

So, the correct one is as follows, right?

 line 903 in utils/general.py 
    prediction = prediction[0][1]  

from yolov9.

SkalskiP avatar SkalskiP commented on July 22, 2024 6

Following this discussion, I opened a PR with a (probably temporal) fix. It makes detect.py work with both yolov9 and gelan models.

from yolov9.

Dragos-Stan avatar Dragos-Stan commented on July 22, 2024 5
    line 903 in utils/general.py 
    prediction = prediction[0][0]  # select only inference output

from yolov9.

WongKinYiu avatar WongKinYiu commented on July 22, 2024 3

@Dragos-Stan provides a temporal solution.

To inference yolov9 models, we need follow val_dual.py to construct detect_dual.py. Or do re-parameterization for yolov9 models, then using detect.py.

Currently, re-parametwrization part is under construction.

from yolov9.

codewithleo1103 avatar codewithleo1103 commented on July 22, 2024 2

So, the correct one is as follows, right?

 line 903 in utils/general.py 
    prediction = prediction[0][1]  

I followed yr ways, it worked with yolov9-c and yolov9-e.
But:

line 903 in utils/general.py 
     prediction = prediction[0] 

worked with gelan-c.pt and gelan-e.pt.

from yolov9.

spacewalk01 avatar spacewalk01 commented on July 22, 2024

Got same error in detect.py

from yolov9.

spacewalk01 avatar spacewalk01 commented on July 22, 2024

It works!

from yolov9.

noorkhokhar99 avatar noorkhokhar99 commented on July 22, 2024

I am getting the same error and fixed the general.py file as here discussions main...noorkhokhar99:yolov9:patch-1

from yolov9.

mkrupczak3 avatar mkrupczak3 commented on July 22, 2024

@SkalskiP Your fix is working for me for a yolov9-c model. Haven't tested ELAN.

Is this a better fix than @Dragos-Stan 's given it works for either architecture?

#11 (comment) should be corrected.

    line 903 in utils/general.py 
    prediction = prediction[0][1]  # select only inference output, [0][0] for aux prediction, [0][1] for main prediction.

from yolov9.

SkalskiP avatar SkalskiP commented on July 22, 2024

Hi @mkrupczak3 👋🏻 My fix should work with both GELAN and YOLOv9 architectures. Take a look here. I use it to run both models.

from yolov9.

mkrupczak3 avatar mkrupczak3 commented on July 22, 2024

@SkalskiP I found your fix applies to detect.py but does not fix val.py. Fixing utils/general.py according to WongKinYiu's comment fixes both however. I'm using that now

from yolov9.

SkalskiP avatar SkalskiP commented on July 22, 2024

@mkrupczak3 what's wrong with validation? I've done it yesterday and it works for me.

from yolov9.

mkrupczak3 avatar mkrupczak3 commented on July 22, 2024

Altering just detect.py does not fix val.py for dual models such as yolov9-c. Modifying utils/general.py as described does fix val.py however,

from yolov9.

AndrewHawking avatar AndrewHawking commented on July 22, 2024
    line 903 in utils/general.py 
    prediction = prediction[0][0]  # select only inference output

thanks

from yolov9.

WongKinYiu avatar WongKinYiu commented on July 22, 2024
    line 903 in utils/general.py 
    prediction = prediction[0][0]  # select only inference output

thanks

#11 (comment)

from yolov9.

xinlin-xiao avatar xinlin-xiao commented on July 22, 2024

Following this discussion, I opened a PR with a (probably temporal) fix. It makes work with both and models.detect.py``yolov9``gelan

thanks,its work

from yolov9.

Related Issues (20)

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.