As students, we tend to waste a lot of time looking around, resting our heads on the desk, scrolling through social media, without realising how much time we have lost. So we decided to use our greatest enemy- smartphones, to our advantage.

What it does

Introducing FocusLab, an android application catered to students or workers who had difficulty focusing on their work. Using face detection technology, the app is able to identify user who are distracted or out of optimal position and remind them to focus on their work. FocusLab is unique because it is definitely not just a simple reminder app, the team behind this are well-updated with the preferences of the studying community who want to focus and we had incorporated many popular aspects into our application that are not commonly found in other similar applications.

How we built it

The entire project is coded under Java using the Android Studio IDE.

For the face detection, we had used the OpenCV's pre-trained Haar Cascade xml files to detect faces and eyes. Java Camera View is used to display the result, i.e. label of faces.

For the frontend, we used VideoView and MediaPlayer to support sensory aids of our application, i.e. the calming video background and lofi music popularly used for studying/working. We also added a timer function which made use of CountdownTimer.

For the backend, we used SQLite to store daily focused durations (stats). The stats can be retrieved from the database and then be displayed on the applicaton as a graph using graphview.

Challenges we ran into

The first main challenge we encountered was the inaccuracy of the pre-trained face detection data. As our app was coded to display alert whenever no face was detected and until a face was detected, we realised during the testing period, the alert dialog was happening way too often. It was annoying because it happened even if the user was right in front of the camera but slightly tilted their face. After much research into various ML techniques and combing through relevant Haar Cascade files, we successfully overcome this challenge by combining 2 of them that was useful. The result of this was a much smoother app performance with barely little unintended interruptions which might affect our users.

The second main challenge we faced is the debugging of our SQLite database. We had trouble understanding which part of our code went wrong as the code seem to make sense. We had spent at least 4-5 hours at night to wee hours debugging and it was definitely challenging to pinpoint those errors.

The third main challenge we face is the lack of sufficient android phones/working emulator with webcam to test our application readily.

Accomplishment that we're proud of

  1. We managed to complete the project even though there are room for improvement.

  2. We all learnt new tech stack within such a short period of time.

  3. We got the chance to work together with new people/new friends and had a fun time working together as a group!

What we learned

Being able to partake in this competition was meaningful. We learnt new APIs/tech stack and have gained more technical knowledge. Our team also gained invaluable debugging skills as a whole as we debugged our way through the OpenCVLibrary, implementing our own functions to make the user experience a smoother one. It was a tough ride for us as it was our first time using the Haar Cascade classifier and none of us has experience with Android's built-in database. But most importantly, we learnt that teamwork indeed makes the dream work. The application would not be completed in time without extra effort from every single one of us, looking out for every teammate beyond our assigned responsibilites despite the time pressure. For that we bonded and forged new friendships.

What's next for FocusLab

We will continue to add new personalization features such as allowing users to choose their background, pick their study musics, add music livestreaming. Given more time, we might show more interesting statistics and advice to the user through the use of Machine Learning for example to identify the user's most efficent hours of the day. All in all, we strive to provide more value to all students/professionals out there who requires help with focusing.

+ 1 more
Share this project: