Skip to content

sayapakailinuxpak/Coral-ID

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coral-ID

Coral-ID is an Android application that can classify the taxonomy of corals through uploaded images or images taken. With Coral-ID, we wish to change from the traditional methods of coral identification to the modern method that is much more accurate, cheap, and fast. Therefore, it will help to understand the ecology of corals and make better preservation plans. This application also has an objective as a citizen science project for coral reefs. Since the coral can be easily identified using a trained model inside the app, anyone can partake in this citizen science project. We wish that through this project, the public will raise their awareness about crucial and threatened marine ecosystems like coral reefs.

Android

Screenshots



Features

  • Coral Book : show coral catalogue in details
  • Coral Detection: use machine learning technology for identify and clasify coral species

Links

Architecture Diagram

This application strictly follows the below architecture:

Tech-Stack



Project Cloud using GCP (Google Cloud Platform)

Description

For the first infrastructure design, we used Kubernetes Engine mainly for serving our Django REST API and machine learning model. The reason why we used Kubernetes Engine because we can deploy our code using CI/CD concept by implementing Jenkins and Docker on the process. To configure the Jenkins, we setups a jenkins file based on our reference and modify it, the jenkins file also automatically insert the secret manager value into the settings.py and also build an docker image using container registry. The jenkins file also will deploy it on the kubernetes engine. The design also used Cloud SQL as database for the corals information and also Cloud Storage for saving the images and machine learning model. The infrastructure design will looks like this:

Cloud Design

When working on this infrastructure design, we successfully implemented CI/CD concept into the cloud infrastructure. The problem that we faced when working on this infrastructure is the django code didn’t response as we intended when integrating with machine learning model and also we low on our budgets.

The second infrastructure design and the design we ended up with, where the main component is using Compute Engine for serving our Django REST API. We used E2 series with machine type e2 medium and operating system Debian. The environment we setup in the Compute Engine was:

  • Setting up new user account for running django environment
  • Pull the bangkit team repository from Github
  • Installing requirements.txt using pip3
  • Settings Environment Variables based on our team needs
  • Run django services on port 80

The django code we setup to automatically pull machine learning model from github, so we do not need to upload manually into the machine. The design for the infrastructure will looks like this:

Cloud Design - 2

References



Machine Learning

Data Specification

The dataset is from StructureRSMAS that contains 409 images separated by class and has 14 classes. But since the application is about coral identification, our team focuses on 7 classes (ACER, APAL, CNAT, MALC, MCAV, MMEA, and SSID). For our baseline and transfer learning model, we generate more images using data augmentation (from 256 images to 1898 images).

WhatsApp Image 2021-06-09 at 21 30 16 (1)


We also make bounding boxes for the YOLOv4 training model with makesense.ai, in which you can find out more here.

WhatsApp Image 2021-06-09 at 21 30 16

The Approach

In machine learning, we try three different scenarios for training models: baseline from CNN Coursera, transfer learning DenseNet121, and object detection using YOLOv4.

flowchart

And here’s the result of each model:

Algorithm Precision Recall F-1 Score
Baseline CNN Coursera 0.10 0.11 0.10
Transfer Learning DenseNet-121 0.15 0.17 0.15
Object Detection YOLOv4 0.81 0.81 0.81

The precision, recall, and F-1 score on the baseline model are really low and the transfer learning only improves them a little bit. Then with YOLOv4, we achieved 81% on precision, recall, and F-1 score and we think this is adequate for our model to run smoothly. Other reasons for using the YOLOv4 model: being able to detect multiple classes in various conditions fast and accurately.

References


People Behind Coral-ID

Android

Cloud Computing

Machine Learning