Face Tracking Turret made with Arduino and Open CV2

  Рет қаралды 41,677

Owen O'Brien

Owen O'Brien

Күн бұрын

Пікірлер: 87
@NullNullZero02
@NullNullZero02 9 ай бұрын
I love that simple example, it's a great base for other projects
@omdano6432
@omdano6432 7 ай бұрын
its like i know what the other projects are, the ones with bullets in them
@zaoakared
@zaoakared Жыл бұрын
great project
@owenobrien8804
@owenobrien8804 11 ай бұрын
Thank you!
@milesbuss4856
@milesbuss4856 9 ай бұрын
You should upload all of those code and 3D model files somewhere for download, this is super cool stuff! I’m looking into doing something similar to this for my senior project at my engineering program, I want to make a self driving turret to attack my classmates 😂
@owenobrien8804
@owenobrien8804 9 ай бұрын
Awesome heres a github with all the 3D models, circuits, and code. github.com/OwenTheGreenBean/Face-Tracking-Turret
@milesbuss4856
@milesbuss4856 9 ай бұрын
Thanks so much dude! I just now hooked up two of my little DC fan motors to 3D printed rollers, and have a working shooter mechanism to mount onto this awesome contraption! I’ll keep you updated and put some credit to you on the final piece.
@Discipline0777
@Discipline0777 8 ай бұрын
@@owenobrien8804 Thank you so much. This is a huge help in starting a project of my own.
@owenobrien8804
@owenobrien8804 8 ай бұрын
@@Discipline0777 Glad to help out!
@Discipline0777
@Discipline0777 8 ай бұрын
@@owenobrien8804 😁
@ivonne8412
@ivonne8412 14 күн бұрын
cool the way you got your supplies :)
@natthadhamabutra3671
@natthadhamabutra3671 9 ай бұрын
thank you so much this is simple but very useful
@jiyapanchal3082
@jiyapanchal3082 Жыл бұрын
so slay
@xayord9818
@xayord9818 9 ай бұрын
that's so cool brother
@ICARE-MECATRONIQUE
@ICARE-MECATRONIQUE 7 ай бұрын
Merci pour cet exemple simple qui permet de mieux comprendre.
@owenobrien8804
@owenobrien8804 6 ай бұрын
Merci beaucoup
@FastGeek-fn8tc
@FastGeek-fn8tc 6 ай бұрын
Interesting bro Good job
@林诗敏-f7e
@林诗敏-f7e 5 ай бұрын
organic jumper wires
@daisywong-ke1kz
@daisywong-ke1kz 11 ай бұрын
GREAT WORK! We'd love to offer you some boards if you may need them in the upcoming content. (PCBWay Daisy)
@owenobrien8804
@owenobrien8804 11 ай бұрын
Cool, thanks! If i have a project that needs then I will let you know!
@daisywong-ke1kz
@daisywong-ke1kz 10 ай бұрын
@@owenobrien8804 Cool thing! feel free to reach out. :)
@TheSalimkop
@TheSalimkop 7 ай бұрын
Thanks for the video. how can i access to the serial port in both IDE, python IDE and arduino IDE? because when i open the serial monitor on arduino IDE, i can't open it on pycharm ?
@owenobrien8804
@owenobrien8804 7 ай бұрын
When running the python script the serial monitor cannot be open along with the script trying to sends commands to the Arduino. To fix this you must only have one open at a time. In your case I think making sure to have the serial monitor closed before running the program will fix it
@utube521
@utube521 9 ай бұрын
0:58 - U can C how it's jerking, and that's because of the servos - they've got min 1 degree steps and nothing you can do. maybe only bldc gimbal motors or steppers with microstepping can do it smoother. I'm bashing my head on similar to get my gopro to rotate left/right with the steering wheel of a car, and with servos, even for 50 euros, the image is terrible, jerking like here
@owenobrien8804
@owenobrien8804 9 ай бұрын
Steppers would be a great improvement because of there greater precision and accuracy! I plan to work with the Nema 17 stepper motors soon and it would be cool to try and implement those into this design. Good luck with your project, post a video of it when it's done I like to check it out!
@theredstormer8078
@theredstormer8078 7 ай бұрын
Like he said steppers are probably better, but I'd just gear the servos down (or use a linkage) and call it a day. Depends on the use case ofc but I think you'd only need 2/3x to 1/2x the range of motion. Just a thought.
@JBENGINEERING-gj4lo
@JBENGINEERING-gj4lo 16 күн бұрын
Can i use esp32 cam for making this type of face tracking system ?
@owenobrien8804
@owenobrien8804 15 күн бұрын
I believe this is possible but the python code would not be applicable to ESP32 and would have to use the esp32 cam internal face tracking system.
@JBENGINEERING-gj4lo
@JBENGINEERING-gj4lo 15 күн бұрын
@owenobrien8804 can you please make a video on this .... ? Because i can't find any videos related to this topic.
@AW-xj4un
@AW-xj4un 8 ай бұрын
Can anybody shed some light on a persistent problem I encounter? With code attached to this video and all of the similar face tracking videos, as soon as the python detects a face, the servo motors instantly move away from the target. I know how servo motors work and I can see how the code is supposed to work, however, every Arduino code gives the same result, the servo motors rapidly move away from the identified face.
@owenobrien8804
@owenobrien8804 8 ай бұрын
Could it be that the servo's are wired backwards, like ground goes to positive and positive goes to ground, in that case switching the wiring might switch the direction of the way to motor turns but im not sure. A way to fix this in the code would be reflecting the image before doing the image processing of finding the face
@AW-xj4un
@AW-xj4un 8 ай бұрын
@@owenobrien8804 Thanks, but I have tried both of these. Added code in python to invert the image. Checked the wiring and reversed it. No difference. I know it’s something in my setup, but I can’t see where. Even connected a picoscope and could see the PWM signal changing as the serial buffer was filled, but the servos still flip out and go to odd and arbitrary position.
@theredstormer8078
@theredstormer8078 7 ай бұрын
Have you tried other servos or inverting the direction in code?
@Carticiak
@Carticiak 6 ай бұрын
​@AW-xj4un These servos are pretty shoddy. did you try different ones.
@owenobrien8804
@owenobrien8804 6 ай бұрын
@@Carticiak I have not tried others but I do have some larger more powerful ones that will work better
@BobDixon-o1d
@BobDixon-o1d 6 ай бұрын
Super cool and looks relatively simple!! But with my limited knowledge of using arduino, I'm sure I would get hung up if I try to make one. Wanting to build a simple head or eye movement devise to track the face as a person walks by. Not too concerned about jerking motion of servos. I'd like to compose the program and load to the arduino and remove from the laptop. Would use a typical webcam camera instead of laptop camera. Use 5v PS, relays if needed, etc. Is that possible? Your video shows using Nano 3.0 but circuit diagram shows Arduino UNO. Will either work? I made arduino controlled Halloween props last year that worked great, but I still have limited knowledge.
@owenobrien8804
@owenobrien8804 6 ай бұрын
To switch to a webcam is as simple as changing one line in the python code, the micro controller should not matter as long as the wiring is that same and the servos are connected to the same IO pins but I have yet to try it. Good luck lmk if you have any other question!
@BobDixon-o1d
@BobDixon-o1d 6 ай бұрын
@@owenobrien8804 This is going to be a Halloween project. Trying to get this done well in advance. I will use this for a moving skull head or a pair of eyes tracking a person. I could buy a tracking security camera from Amazon, but making this devise will be more fun! Besides, I want to learn more about this stuff so I can make more projects. Will let you know if I have any hiccups (I'm sure I will). Thanks
@BobDixon-o1d
@BobDixon-o1d 6 ай бұрын
@@owenobrien8804 I do have a couple of questions: I have a couple of Arduino boards (actually ELEGOO UNO R3) from previous projects. Will that work? And I noticed there are two programs shown. The video shows one is loaded in the laptop, and the other in the micro controller. Should both be loaded to the controller? Again, I am a novice to this but trying to learn.
@owenobrien8804
@owenobrien8804 6 ай бұрын
@@BobDixon-o1d The elegoo Arduino are the same as normal Arduino with out the Arduino brand personally I prefer to use elegoo because it’s cheaper with the same quality, the code on the laptop is the .py file and can be run with the command: python “name of file.py” and then the Arduino code can then be uploaded using the Arduino IDE.
@BobDixon-o1d
@BobDixon-o1d 6 ай бұрын
@@owenobrien8804 I don't know what py file is, but going to look it up. I am a 71 year old retired Engineer who worked at a nuclear generating plant for my whole career, so I am used to researching things. Love learning new stuff so I am going to give this a shot. If I get too hung up, I would appreciate and little help.
@rakowumusic5143
@rakowumusic5143 2 ай бұрын
whate camera do you used? And how you integrated the Python file to arduino?
@owenobrien8804
@owenobrien8804 Ай бұрын
I used the built in camera in my laptop and I communicate the data from the python script to the arduino using serial communication. The serial communication just sends characters which both languages can process.
@rakowumusic5143
@rakowumusic5143 Ай бұрын
@@owenobrien8804 Hi thanks for your response, i already managed to make it work, i attached a lego gun to it firing in my face.... not the smartest idea but it works :D Btw not sure if you already know it, there is the ESP32 which has build in bluetooth and wifi conectivity and can run a minified Python script. Probably could be a standalone then. Camera component, lagging for esp32 but can be also buid and can store face ids. (ESP32 is pretty cheap). Have a nice Week!
@LeoYang-e3t
@LeoYang-e3t 2 ай бұрын
Cool project!!! I was wondering that do you need to make sure the relative position of the camera and the motors the same every time?
@owenobrien8804
@owenobrien8804 2 ай бұрын
That is correct
@TechyBeast08
@TechyBeast08 5 ай бұрын
somebody pls help me , all the things work fine the arduino code , the servo all of them , but when i run the python code and as it opens up the VIDEO window it works fine for 7-8 seconds after that it stops responding and when there is no face detected it starts responding again and when face is detected it again starts to stop. thanks for reading this
@LazarusAugment
@LazarusAugment 4 ай бұрын
loop
@palkia080
@palkia080 7 ай бұрын
that's awesome
@eliasready
@eliasready 5 ай бұрын
One question, do you have the tinkercad project? It would be really useful when building it
@owenobrien8804
@owenobrien8804 5 ай бұрын
@@eliasready I have the stl files which can be used in your slicer software to print them, it is linked on my GitHub
@user-gd6vt5ez2g
@user-gd6vt5ez2g 2 ай бұрын
@@owenobrien8804what is tinkercard and what is a slicer?
@obaidulkader3674
@obaidulkader3674 8 ай бұрын
File "c:\Users\sibme\OneDrive\Desktop\Face-Tracking-Turret-main\Face-Tracking-Turret-main\Webcam_Python\face_Detection.py", line 1, in import serial ModuleNotFoundError: No module named 'serial' how can i overcome this issue? please help,sir
@kshitijkulkarni4154
@kshitijkulkarni4154 8 ай бұрын
pip install serial Run this on your terminal
@owenobrien8804
@owenobrien8804 8 ай бұрын
@@kshitijkulkarni4154 yuh yuh‼️
@quindelira3010
@quindelira3010 5 ай бұрын
what do u use to run the code on ur laptop?
@owenobrien8804
@owenobrien8804 5 ай бұрын
@@quindelira3010 I’m using the Visual Studio code to open the code and then to run it with visual studio I use a python command in the terminal
@Xyezed
@Xyezed Ай бұрын
Can i make this with the regular arduino uno not the nano one?
@owenobrien8804
@owenobrien8804 Ай бұрын
@@Xyezed yes it should work exactly the same
@anonym6043
@anonym6043 5 ай бұрын
Add some firing stuff piw piw piw 😂
@farn69
@farn69 9 ай бұрын
github link if possible?
@owenobrien8804
@owenobrien8804 9 ай бұрын
github.com/OwenTheGreenBean/Face-Tracking-Turret
@farn69
@farn69 9 ай бұрын
@@owenobrien8804 thanks man
@Poleraction
@Poleraction 3 күн бұрын
yo can you plug in the arduno code?
@Poleraction
@Poleraction 3 күн бұрын
nvm i found it
@MrX01011000
@MrX01011000 9 ай бұрын
Do you have the code for this project? I am doing a similar project, but I will need to modify it for stepper motors instead of servos. Also, is your computer webcam supplying visual data to the device or is it something else?
@owenobrien8804
@owenobrien8804 9 ай бұрын
I have the video from the webcam on my computer processed through Python and then the location for the servos is communicated to the servos over serial communication. The built in computer camera can be switched to a external USB camera by using a different port in the code. Heres a link to the github for a closer look. github.com/OwenTheGreenBean/Face-Tracking-Turret
@TechBinarysphere
@TechBinarysphere 2 ай бұрын
Great
@RobertPacovsky
@RobertPacovsky 7 ай бұрын
Does anyone know what is it "haarcascade_frontalface_default.xml"? And what i should replace "/dev/cu.usbserial-11" with or how to find it?
@The_Prince770
@The_Prince770 4 ай бұрын
check usb settings in device manager or through arduino app to find the port
@rahulsinghmahar9480
@rahulsinghmahar9480 8 ай бұрын
Which feild of engeneering is required to make all thsees devies
@owenobrien8804
@owenobrien8804 8 ай бұрын
I’m currently pursuing my computer science degree and have learned CAD and electronics in my free time but to do this as a major I would recommend mechatronics robotics or electrical engineering
@Murilo_Floriano
@Murilo_Floriano 7 ай бұрын
Computer science, but a bit of mechanics for all the CAD and assembly stuff
@henrychen3820
@henrychen3820 8 ай бұрын
arduinoData = serial.Serial('/dev/cu.usbserial-110', 9600) how should i change the /dev/cu.usbserial-110
@owenobrien8804
@owenobrien8804 8 ай бұрын
The first parameter is string of the file path of the usb device in my case it was /dev/cu.usbserial-110, and then the 9600 is the baud width, this is declared in the arduino code as 9600 and shouldn't have to be changed. To find the first parameter on your own computer when you select ports in the arduino IDE it should say which one you are connected to and by copying that path it should work.
@obaidulkader3674
@obaidulkader3674 8 ай бұрын
@@owenobrien8804 how to copy that path?
@bluenielvet
@bluenielvet 6 ай бұрын
@@owenobrien8804 how to copy that path?
@ВладиславМаркелов-н1л
@ВладиславМаркелов-н1л 2 ай бұрын
@@owenobrien8804 how to copy that path?
@ВладиславМаркелов-н1л
@ВладиславМаркелов-н1л 2 ай бұрын
@@obaidulkader3674 how to copy that path?
@Vearflex
@Vearflex 6 ай бұрын
I am from india ....it's very sad to no body share full information like code & software , library to make ..face detect turret 😢😢😢😢😢😢😢help me pls... please share full info step by step
@owenobrien8804
@owenobrien8804 6 ай бұрын
Github with all the code and 3D models github.com/OwenTheGreenBean/Face-Tracking-Turret
@TragicGFuel
@TragicGFuel 5 ай бұрын
Are bhikari copy krna hi aata hai kya
Build an Arduino FPV Head Tracking Camera for RC Vehicles
18:32
Max Imagination
Рет қаралды 72 М.
DIY Laser Turret | Part 1 The Hardware
10:16
Michael Reeves
Рет қаралды 1,6 МЛН
Who is More Stupid? #tiktok #sigmagirl #funny
0:27
CRAZY GREAPA
Рет қаралды 10 МЛН
Почему Катар богатый? #shorts
0:45
Послезавтра
Рет қаралды 2 МЛН
I put ChatGPT on a Robot and let it explore the world
15:24
Nikodem Bartnik
Рет қаралды 1,2 МЛН
Starting out in electronics, robotics or computer science?
14:04
Owen O'Brien
Рет қаралды 2,2 М.
Bizzare Shifter
18:04
upir
Рет қаралды 436 М.
Trying To Reach Speed Of Sound At Home 3D Printed Gears
17:58
Canocholic
Рет қаралды 526 М.
I tried the 3 Cheapest Arduino Alternatives! (That you Suggested)
13:21
Make Dumb Electronics Smart for $3
13:13
I Like To Make Stuff
Рет қаралды 797 М.
Mechatronics - Build Whatever You Want (Or Just be Michael Reeves)
7:49
Virtual Dreamers
Рет қаралды 487 М.
Who is More Stupid? #tiktok #sigmagirl #funny
0:27
CRAZY GREAPA
Рет қаралды 10 МЛН