Inspiration

Pedestrians are hard to see at night for drivers, so crosswalk safety is important for both drivers and pedestrians alike. We want to keep a safe environment for pedestrians, and ensure them and the driver's safety. Many animals are also killed by cars at night every year, so human pedestrians are not the only subject of this project. About 100,000 human pedestrians are injured by motor vehicles every year, so ensuring pedestrian safety will not only save their lives, but also reduce their stress while crossing the road. Almost 1.2 million pet owners are devastated each year as well, due to their pet running onto the street and the drivers not being able to see the animal.

What it does

Our program scans pedestrians, human or animal, who are potentially crossing the road, and creates a popup on an app. This app is supposed to be installed near a crosswalk post, to detect living entities which are near the street. The pop-up is just a placeholder for lights which are supposed to light up whenever a pedestrian is detected. These lights will illuminate the crosswalk, providing visibility for the driver. A sound is also played from the app, which reminds human pedestrians to look up from their phone, because crossing the road while looking at the phone is very dangerous.

How we built it

Our app is written in Android Studio with java, and the basics of the TensorFlow scanning function comes from the Tensorflow lite examples. We modified a lot of the main detection file, to filter out the scanning so that only animals and humans would be scanned because scanning apples won't really benefit us. We also used xml in the xml files to improve the looks of the app, and add in our logo.

Challenges we ran into

We ran into trouble at first, while trying to interpret the sample TensorFlow code. We at first did not have a sense as to how to retrieve the scanned objects, or even how to print some text to the phone. We spent most of our first day debugging our app so that it could actually run. We also ran into lots of trouble while uploading our project to GitHub, as none of our team is familiar with it. We had to download Github Desktop, because our project had too many files. While we were trying to implement audio playback in our app, we met many troubles trying to find a working audio player method. We spent almost 3 hours look at a variety of audio players for java, which almost all of which did not work. After we found a working media player, we did not know that the .wav file needed to be in the /res/raw folder, so we spent a lot of time trying to stream the file from YouTube, rather than from the project files itself. 2 of our team members also attempted to create a website application with our project, but it did not end up working because we were unable to link up our java code with the React website.

Accomplishments that we're proud of

This is the first hackathon for all of our team members, so we are very proud that we are even able to submit a working project. We are also proud that our project idea can benefit society, and maybe save lives if implemented in the future. This is also the first time working on a java program for all of our team members outside of school, so we think that we did a great job implementing some of our previous knowledge

What we learned

Our team learned many new functions with java, such as playing audio and accessing the phone camera. We also learned a lot about react, as only one team member had previous experience with creating a website. We learned how difficult it was to connect the front-end code with the back-end code, as they were on two different IDES. As it was our first hackathon, we also learned how fun a hackathon is, with all the activities that we attended.

Sources

The base foundation for our TensorFlow Object Detection was taken from link. We modified DetectorActivity.java, as well as a few other xml files to fit our needs for this project.

What's next for Crosswalk Safety

In the future, we hope to implement more physical features, such as the lights meant to illuminate the crosswalks, as well as speakers, to make the reminder voice audible for all of the pedestrians. Deploying this program to a website would also be a huge step forward, as this would allow for easier monitoring.

Built With

Share this project:

Updates