Inspiration

Going into this Hackathon, our goal was to explore Raspberry PI/Arduino, learn Python OpenCV, and utilize our 3D Printer while working on a collaborative security-themed project that would be interesting to project group members with different majors. Our original plan was to make a security camera on a 2-axis gimbal that could look around and identify people and faces. Our project had software, electrical, and mechanical, and computer vision aspects, keeping all of us busy the entire time. We wanted to be able to identify trespassers but later decided it would be fun to shoot at the trespassers as well so we decided to expand the scope of the project and make an AI-powered gun turret.

What it does

Our AI-powered gun turret uses a webcam and facial recognition algorithm to identify human "targets." The coordinates of the targets on the screen are used to incrementally adjust 2 servos to zero in on the target. Once the turret is pointing at the target it fires a pellet at it. The algorithm is capable of distinguishing between people it knows and "trespassers."

How we built it

  • We use Arduino to control 2 servos and 1 continuous servo and change the direction the turret/camera is facing.
  • We use Python and OpenCV, [other shit] to....
  • We use serial to send messages from our Python programs to Arduino, and incrementally adjust servo angles until the turret points at a target.
  • All of our structural components and mechanisms were designed using Inventor and 3d Printed using a Bambu P1S 3D Printer.

Challenges we ran into. SO MANY CHALLENGES!

  • We originally wanted to use a Raspberry PI but couldn't get it to work, we eventually found out that the micro SD was bent which is why the laptop wouldn't recognize it. We had to switch to Arduino which somewhat limited our options for the project.
  • Many of the electronic components we tested didn't work or didn't work for our purposes. The shooter we designed uses a spring to fire the pellet, we couldn't find a motor powerful enough to load the spring.
  • Serial Communication between our python scripts and the Arduino
  • Using a 3d printer it was important to try to get things right on the first try, every time a piece didn't come out right it added a significant delay.
  • Properly utilizing the YOLO model took a bit of research, but wasn't that bad in the end. In the end, we also weren't able to incorporate proper facial detection due to time, but doing this properly, that is, not having issues with the program not identifying or mis-identifying, was giving us issues. ## Accomplishments that we're proud of We were able to implement a program that uses AI computer vision to pick out individuals in an environment and target them. We also implemented a program that took a cropped image of individuals in the video feed and attempted to identify them from a local image database.

What we learned

  • Arduino
  • Open CV

Future Plans

  • Make it wireless and accessible using a web interface.
  • Redesign the projectile launch system by increasing the rate of fire and using cartridge-based ammunition.

Built With

Share this project:

Updates