Race to the Finish: Python vs C++ in OpenCV and Computer Vision Speed and Performance Test
ฝัง
- เผยแพร่เมื่อ 1 ต.ค. 2024
- Inside my school and program, I teach you my system to become an AI engineer or freelancer. Life-time access, personal help by me and I will show you exactly how I went from below average student to making $250/hr. Join the High Earner AI Career Program here 👉 www.nicolai-ni... (PRICES WILL INCREASE SOON)
You will also get access to all the technical courses inside the program, also the ones I plan to make in the future! Check out the technical courses below 👇
_____________________________________________________________
In this video 📝 we are going to do a Python vs C++ OpenCV Test. We will run some of the methods and applications that we have implemented during this tutorial and compare the performance in Python with C++. We will evaluate and talk about the results we get and why we get exactly those results in both Python and C++ with OpenCV. We will be going over some of the differences between using python or C++ for your computer vision implementation or application.
If you enjoyed this video, be sure to press the 👍 button so that I know what content you guys like to see.
_____________________________________________________________
🛠️ Freelance Work: www.nicolai-ni...
_____________________________________________________________
💻💰🛠️ High Earner AI Career Program: www.nicolai-ni...
⚙️ Real-world AI Technical Courses: (www.nicos-scho...)
📗 OpenCV GPU in Python: www.nicos-scho...
📕 YOLOv7 Object Detection: www.nicos-scho...
📒 Transformer & Segmentation: www.nicos-scho...
📙 YOLOv8 Object Tracking: www.nicos-scho...
📘 Research Paper Implementation: www.nicos-scho...
📔 CustomGPT: www.nicos-scho...
_____________________________________________________________
📞 Connect with Me:
🌳 linktr.ee/nico...
🌍 My Website: www.nicolai-ni...
🤖 GitHub: github.com/nic...
👉 LinkedIn: / nicolaiai
🐦 X/Twitter: / nielsencv_ai
🌆 Instagram: / nicolaihoeirup
_____________________________________________________________
🎮 My Gear (Affiliate links):
💻 Laptop: amzn.to/49LJkTW
🖥️ Desktop PC:
NVIDIA RTX 4090 24GB: amzn.to/3Uc7yAM
Intel I9-14900K: amzn.to/3W4Z5Cb
Motherboard: amzn.to/4aR6wBC
32GB RAM: amzn.to/3Jt2XVR
🖥️ Monitor: amzn.to/4aLP8hh
🖱️ Mouse: amzn.to/3W501GH
⌨️ Keyboard: amzn.to/3xUGz5b
🎙️ Microphone: amzn.to/3w1F1WK
📷 Camera: amzn.to/4b4Ryr9
_____________________________________________________________
Tags:
#PythonOpenCV #CppOpenCV #PythonVsCpp #OpenCV #ComputerVision #PythonComputerVision #CppComputerVision
Join My AI Career Program
www.nicolai-nielsen.com/aicareer
Enroll in My School and Technical Courses
www.nicos-school.com
I think your visual studio mode is debug, although I can't see it exactly. Why didn't you run the release mod? I think opencv's release mode will work more than debug mode. Thanks for sharing.
Yes unfortunately it was in debug mode, should definitely redo it in release mode. Thanks for watching!
Typical problem of the runtime external libraries, similar problem occurs with Matlab (ImageProcesing toolbox) and C++ integration. A solution can be crate a function where you initialize the runtime library first and then call a desired algorithm. Another question would be how the OpenCV has been compiled along OpenCL? At the industrial level if the OpenCL has been chosen as the main GPU library I would check maybe SYCL implementation and create my own representation of the algorithm. Thanks for the test...
Thank you for some ideas on why that result was a bit weird, will try to check them out. But it's still a bit weird that it seems to only be with the haar Cascade classifier. I will try a couple more algorithms/methods and see if the same result occurs
interesting and hard to understand, why for loop affects python performance so much
any idea how to integrate cython in python application? :) maybe that will help the issue
It's because python is interpreted and c++ i compiled, so it's way faster. Not only for loops are faster, pretty much all the things but often forloops is the worst. I haven't actually worked with cython before. Often i just use python or c++ depending on the application. But my guess would be that it would not be easy to use modules/frameworks with cython
dont be lazy and just pick up c++, spend that energy learning cython on it. ;) you'd also become a better programmer too!
@@jesuschrist1501 or pyo3 with rust. I prefer rust over cpp for produce native python modules.
Was wondering about this until seeing your video. Thx a lot!
Ur welcome! Thanks for watching
Is there a way to integrate Lua (python lupa) with openCV? Lua is based on C
i've checked and you are running c++ in debug mode :V
Thanks for mentioning it! Should try in release
@@NicolaiAI hehe, no problem. Great content.
1. change the build type to release
2. and also launch it in without a debugging session(ctrl+F5 or go to debug->start without debugging
@@NicolaiAI "Must" try in release builds, as "debug" builds using OpenCV "....d.lib's" rather than " .....lib's" noticeably slower even to the naked eye with objects moving with at least some noticeable stuttering on the screen.
thank you, amazing sharing~~
Thank you very much!
Great work! and where can I find the code?
Thanks a lot for watching! All the code should be available on my GitHub
Great!!!!
Thank you!
Really Great
I hope you will soon make videos for geospatial data too... arcpy and gdal libraries