Conversation
dbb3524 to
856b1f5
Compare
|
Can you please describe what "before" and "after" means? |
Have you used |
“Before” means the results of running performance tests before this PR changes (without Yolov4 support) |
Yes, I used |
cfa41e6 to
4bbb21d
Compare
|
Great to see that this is in the 3.4.11 milestone. Will this reach the 4.x branch as well? |
|
Thank you for your interest @rgov, @wooseokyourself! These PR changes will be merged into master branch next week. |
|
@sqiprasanna, please read all the messages carefully - you're trying to use OpenCV 4.2.0. We just merged the changes yesterday. |
|
@l-bat Thanks for the reply. I just used this yolov4 for training on my custom dataset. It really worked well on detecting images. I'm more excited to test this model on real-time detection using OpenCV. As I see here you're trying to include yolov4 in OpenCV dnn. I just want to really appreciate the work you've done and would like to see adding yolov4 into OpenCV. Thank you again for your hard work. Have a nice day. |
|
@AlexeyAB, it might be, yes. I'd like to recommend to open an issue for YOLOv4 optimization (some research with per-layer performance will be very helpful). Thanks! |
|
Hello,
I'm buildin OpenCV 3.4.10 from source on a docker container. I'm cloning this repository: I'm not very familiar with this, so can someone please give me a simple answer like "It's not working yet" or "It's already working, you can git clone this link", instead of referencing another one confused thread. |
|
It's not working yet, wait for the next release or get latest master or 3.4 branch version and build it manually. |
|
Hi, Thanks |
Merge with extra: opencv/opencv_extra#753
resolves: #17148
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.
Performance tests
CPU: Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
CPU: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz x8
Mish activation function
Mish activation function in origin paper
𝑓(𝑥) = 𝑥 * 𝑡𝑎𝑛ℎ(softplus(𝑥)) where softplus (𝑥) = ln(1 + 𝑒xp(𝑥))
Darknet implementation softplus
We can use the original softplus function for darknet.
Proof:
x < -20: let's compare ln (1 + exp( 𝑥 )) with exp(x). exp (x) - > 0 and ln(1 + exp(x)) - > 0 when x - > -infinity. The maximum difference between ln (1 + exp ( 𝑥 )) and x at the maximum value of x (x=-20). exp (-20)= 2.061153622438558e-09 vs ln(1 + exp (-20)) = 2.0611536900435727e-09. both values are very close.
x > 20: let's compare ln(1 + 𝑒xp(𝑥)) with x. ln(1 + 𝑒xp(𝑥)) -> ln(𝑒xp(𝑥)) = x at X->infinity
The maximum difference between ln (1 + exp( 𝑥 )) and x with a minimum of x (x=20). ln(1 + exp(20)) = 20.000000002061153. So the difference is lower than 10e-8.