Comments (11)
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.
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.
@madhawav Oh man I totally missed that score. Thanks a lot for your reply.
from yolo3-4-py.
But a small point, the detections are not identical when I use original c++ wrapper. I do not know why
from yolo3-4-py.
@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.
@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.
@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.
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.
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.
@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.
@smajida Any updates on the screenshots (on scenarios where you noticed detection differences) ?
from yolo3-4-py.
Related Issues (20)
- get error when i install yolo34py in Windows 8 pro HOT 1
- running yolov4 HOT 1
- Error installing from both pip and source HOT 5
- Disable architecture printing HOT 1
- batch inference HOT 1
- ModuleNotFoundError: No module named 'numpy' HOT 1
- does it work with yolov4? HOT 2
- Ubuntu 20.4 installation error HOT 1
- FileNotFoundError: pkg-config, pkg-config HOT 1
- ImportError: No module named pydarknet HOT 5
- Proxy issue in downloading https://github.com/madhawav/darknet while installing YOLO34PY using PIP HOT 1
- crashes on colab using custom weights/config HOT 2
- Trouble installing pip install yolo34py-gpu HOT 1
- Errors in "pip3 install yolo34py-gpu" HOT 1
- Error when installing yolo34py-gpu from source. HOT 2
- Segmentation Fault when running custom model HOT 1
- Error when pip installing
- Installation with newer GCC not working HOT 1
- Error pip installing yolo34py on windows
- Google Colab crashed when I was running the Detector HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yolo3-4-py.