question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Darknet] CPU usage optimization ./uselib API

See original GitHub issue

Discussion started here with @rantgithub : https://github.com/opendatacam/opendatacam/issues/184#issuecomment-608226738

There is this issue on the darknet repo: https://github.com/AlexeyAB/darknet/issues/5170

Seems we can change a line on the darknet implementation:

in darknet/src/yolo_console_dll.cpp

while(!a_ptr.load()) std::this_thread::sleep_for(std::chrono::milliseconds(3));

to

while(!a_ptr.load()) std::this_thread::sleep_for(std::chrono::milliseconds(30));

@rantgithub , could you explain a bit more what would be the drawback of doing this ? I don’t really understand what is it doing ? Would it slow down the process for less high end devices ? How is this related to FPS ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rantgithubcommented, Apr 9, 2020

Hi

  1. I am not sure why this is happening, but is a “big” problem, specially with more than 1 instance. Only solution i have found so far, is to buffer the stream using a 3rd party, because with the direct url m3u8, is just to fragmented. I will ask Alexyeb and see if he has any input

  2. It is because i have touched many parts of the code on v2, in this way looking is how to put all together. I am testing this frames issue with v3 as well. I think we need a kind of internal buffer

0reactions
tdurandcommented, Apr 28, 2020

ok, so closing this

Read more comments on GitHub >

github_iconTop Results From Across the Web

README.md · master · Francesco Gatti / darknet - GitLab
Improvements in this repository​​ ps1 script or the makefile (Linux only) you will find darknet in the root directory. If you use the...
Read more >
Programming Comments - Darknet FAQ - ccoderun.ca
What is the optimal network size? Can I train a neural network with a CPU? What is the difference between CPU and GPU?...
Read more >
Darknet — A Neural Network Framework written in C and CUDA
Darknet is an open-source neural network framework written in C and CUDA. It is fast, easy to install, and supports CPU and GPU...
Read more >
Yolov3 CPU Inference Performance Comparison - Towards AI
onnx fomrat . We will use a repository which was created specifically for converting darknet *.weights format into *.pt (PyTorch) and *.onnx ( ......
Read more >
Optimization of Real-Time Object Detection on Intel® Xeon ...
In this work, the original Darknet model is converted to a TensorFlow model. First, the convolutional neural network is optimized for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found