myCosada: Fish Counting System with Instance Segmentation Integration
What is this project?
myCosada is a fish counting system designed to speed up the fish fry counting process at Institut Penyelidikan Marine Borneo (IPMB) at Universiti Malaysia Sabah (UMS). Although there were previous attempts to implement a computer vision model for fish counting at IPMB, manual counting was still preferred. Despite being labor-intensive, manual counting remains more reliable for producing accurate counts.
I saw this as a challenge and an opportunity to solve a real-world problem. This gave me a chance to design a system for professional use in complex environments. Thus, I began exploring new technologies and ways to incorporate responsive web development with machine learning and computer vision. I decided I want to approach this using the prototype model and keep the development work flexible.
What did I do?
I began by conducting research. This involved investigating industry standards, comparing similar implementations, and learning from their successes and failures. From this research, I was able to plan and develop a unique approach to the problem.
The next step was designing the system. During this stage, I created multiple artifacts, which I reviewed with my Academic Supervisor and continuously improved. By the end of this stage, we should have a clear mental picture of how the system will work in the future.
Then came the fun part: implementing what we had designed. At this point, I already knew what tools I would be using:
- MERN stack for web development
- YOLOv8 for computer vision
- Public dataset for machine learning
The mission was to have a proof of concept or a minimum viable product. I had a list of goals I wanted to achieve (and achieved it I did 😜):
- Create a custom YOLOv8 object segmentation model
- Implement a web application
- Integrate the YOLOv8 model with the web application
What are the challenges?
1. Burnout
As software engineers, burnout is one of the biggest issues we face, especially when working on solo projects (This is probably why we almost never complete the start-up ideas we always have in the back of our heads 😜). My approach to managing burnout is to compartmentalize. I break my project into smaller tasks and then break those into even smaller tasks. I keep track of these tasks and tackle them one by one. As the completed task list grows, the backlog shrinks. It’s just a way to visualize our own effort.
2. Optimization
“It run fine on my machine” - said every software engineer ever
One of my goal was to host my app online. I had never hosted anything on the cloud before 🥲 and it seems really daunting at first. To make matter worst, I was blinded by excitement of the blazingly fast results of running my app on a local machine, I did not think of what it would cost me to host this monstrosity on a cloud platform (my wallet shivers at the though of it).
Due to my love of all things free, I had to optimize my app so I can fit it under any available free tier cloud platform. I set my eyes on Render backend free web service hosting with Node supported. So I began analyzing anything that I can do to make my app as lightweight as possible. In my effort, I opted to use a smaller YOLOv8 model, modified my architecture to use single REST API for both my python YOLO8 model and business logic. Most notably, I also used docker to configure the system limits for the web services.
Although I was able to run it on the free Render web service, I decided to switch to use the Digital Ocean droplets (sponsored by Github education pack 🤩). This allow me to keep my service more reliable and overall a better learning experience for me in a professional settings.
What are the outcomes?
Viva came and I answered.
I successfully defended my project, earning an A for my FYP 2 🤩. I also had the opportunity to present this project to IPMB and test it with them to gather their feedback on the final products. Since my model was trained using an open dataset, I was a bit concerned about its performance in the IPMB environment. However, it performed surprisingly well, with no false positives and only two false negatives. The results were satisfactory, and we engaged in further discussions about potential collaboration between the institute and the faculty.
I mentioned that I had anticipated this outcome and explained that the model could be tuned and improved as more IPMB users utilize it. Additionally, I introduced my academic supervisor and IPMB to autodistil, a method to automate YOLOv8 training with minimal effort required for dataset preparation.
Want to know more?
Feel free to Contact Me and we can have further discussion regarding any topic that you have in mind.