Coder Social home page Coder Social logo

Comments (11)

VitaliKaiser avatar VitaliKaiser commented on May 14, 2024 4

OK I found the answer myself in the code.
This are the function parameters of detect:
def detect(self, Image image, float thresh=.5, float hier_thresh=.5, float nms=.45):

from yolo3-4-py.

madhawav avatar madhawav commented on May 14, 2024 2

Hi,
You can filter results using the "score" value (2nd parameter of tuple) provided in results of net.detect() function.

For example, look at the if score > 0.5: line of below sample code.

            dark_frame = Image(frame)
            results = net.detect(dark_frame)
            del dark_frame

            for cat, score, bounds in results:
                if score > 0.5:
                    x, y, w, h = bounds
                    cv2.rectangle(frame, (int(x-w/2),int(y-h/2)),(int(x+w/2),int(y+h/2)),(255,0,0))

Did you try this approach?

from yolo3-4-py.

arasharchor avatar arasharchor commented on May 14, 2024

@madhawav Oh man I totally missed that score. Thanks a lot for your reply.

from yolo3-4-py.

arasharchor avatar arasharchor commented on May 14, 2024

But a small point, the detections are not identical when I use original c++ wrapper. I do not know why

from yolo3-4-py.

madhawav avatar madhawav commented on May 14, 2024

@smajida Can you send me some more details? Like maybe screen shots on certain scenarios where you noticed a difference?

If you can send, it would be of great help!

from yolo3-4-py.

arasharchor avatar arasharchor commented on May 14, 2024

@madhawav sure. Right now. I do not have my laptop with me. I will send it to you soon. BTW, are you interested in an internship in German Aerospace Center(DLR)?

from yolo3-4-py.

madhawav avatar madhawav commented on May 14, 2024

@smajida Thank you for the offer! Where can I find more information?

Also, how about opportunities to do higher studies? I recently completed my Bachelors Degree in Computer Science. Right now I am looking for opportunities to do higher studies.

from yolo3-4-py.

VitaliKaiser avatar VitaliKaiser commented on May 14, 2024

Hi,

but how would I lower the minimum threshold? If I get it right, after calling

results = net.detect(dark_frame)

I only get the results above the default confidence threshold of 0.25. I would not get results with a lower threshold. In my case I would like to get, e.g., every result above 0.01. How would I manage that?

Best,

Vitali

from yolo3-4-py.

sushant1727 avatar sushant1727 commented on May 14, 2024

Is there a way to print the confidence level?

Update: I got it using
cv2.putText(img, str(score), (int(x), int(y)), cv2.FONT_HERSHEY_COMPLEX, 1,(0,255,0),2)

from yolo3-4-py.

sushant1727 avatar sushant1727 commented on May 14, 2024

@VitaliKaiser @madhawav Where can I find the parameters of net.detect() function & pydarknet files where it imports Detector, Image.
(I installed using pip yolo gpu version.)

NVM, I got it in file pydarknet.pyx

from yolo3-4-py.

madhawav avatar madhawav commented on May 14, 2024

@smajida Any updates on the screenshots (on scenarios where you noticed detection differences) ?

from yolo3-4-py.

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.