Note
I didn't mention this in the video, but there are two setup test cases available. One with cars.mp4 and one with yes_car.mp4. When using yes_car.mp4, search for "user_car_images" in the code and add a 1 to the end because we are using different images to detect a different car. Also, for the UI, the user can press q to quit the application at any time. Then, it will process the frames it had created into a video.
Inspiration
Carjacking is a big problem in Canada, where I live. So, to prevent someone stealing my family's car and anyone else's I created this project. I also gained inspiration from a movie I watched where the detectives used cameras to track the criminal's car everywhere. With this project, I've reimagined the security of my community through computer science & coding, thus following the theme properly. I truly believe that CC can SIGNIFICANTLY improve community security and will have `a large impact.
What it does
Carjacking Camera or CC, tracks the movement of the user's car, giving a full visual and is more reliable (and hard to be thwarted) than a normal location tracker (i.e. airtags). CC uses object detection to watch the user's car and alert them whenever there's suspicious movement (i.e. moving at nighttime, when the user is likely asleep). If the user doesn't respond, CC uses cameras along the roads and anywhere to lock in on the user's car and track it in real-time. Compared to an Airtag which only shares the location of the car, it can stop the theft early. It can send alerts to the police to capture the criminal and return the car to the user.
How we built it
I used Python's OpenCV library for computer vision. I constantly checked for the user's car or any stolen cars (stored in the database). The application will check for the colour of the car, then it will try to match the license plate, and it will compare the model/shape of the car through images. By identifying the stolen car, it can track it using some simple math calculations and determining where the criminal is likely to go next. It will then contact the nearby cameras to look for the car and possibly alert the police beforehand. Unfortunately, I wasn't able to code the last part properly as I don't have access to multiple cameras and the coding for that requires some access details and more complex resources. So, I mimicked the IRL application in pygame. The cameras would send the directions and the predicted directions to the pygame code, and the pygame would display the car movement on a screen. This pygame part would likely be the UI for the user and police. I also wanted to use the actual Google Maps Python API, however, given the time constraint of this hackathon and the trouble I was having with using it, I decided to just write some pseudocode and leave it at that.
Challenges we ran into
The main challenge was raising the accuracy of the detection. I am using Haar cascades and OpenCV, so it's hard to get an accurate read of the detections. This was due to numerous factors including camera quality, distance, and slight misreads (especially for the license plate). Thankfully, I was able to raise it to a considerable usable standard.
What's next for Carjacking Camera
- Detection Accuracy Improvement (probably through Deep Learning or just refining the camera data)
- Connection to real cameras, and testing in IRL Looking ahead, this project has the potential to go beyond just carjacking. With some adjustments to the training data and goals, CC could be used to track other crimes, such as drug trafficking or robberies. For example, it could track thieves after store or house robberies, gathering vital details that would help authorities catch the criminal. The basic algorithm is already in place—it just needs to be adapted for different use cases.
Log in or sign up for Devpost to join the conversation.