Git Product home page Git Product logo

happywhale's Introduction

HappyWhale

HappyWhale model implementation - Phase B

User Documentation

General Description

The purpose of our model is to accurately identify a dolphin or whale individual in a given image. Our model is implemented in Python (version 3.8.16) programming language, under the Pytorch framework (version 1.13.0+cu116) and GoogleColab is used as the platform to run our code.

Steps to run HappyWhale desktop application

Prequisitions:

  1. Open Spyder (Python 3.9) 5.1.5 IDE

  2. Inside Spider's terminal run the following line:

    pip install -r yolov5/requirements.txt

Running Code

  1. Open HappyWhaleApp.py in Spyder (Python 3.9) 5.1.5 IDE

  2. Click run button inside IDE to open the HappyWhaleApp application

Picture1

  1. Click “Upload” to choose a whale or dolphin image:

Picture2

Picture3

  1. Click “Detect” to find out the whale or dolphin individual ID:

Picture4

  1. Result:

Picture5

Steps to run HappyWhale model in GoogleColab

  1. Unzip project, you should have the following files/directories:
  • HappyWhale.ipynb
  • YOLOv5
  • dataset
  • dataset_images.csv
  1. Inside your google drive, create a project directory with the following path: /content/gdrive/MyDrive/Final_Project/Phase_B.

If you wish to create a different path for the project, go to the HappyWhale.ipynb and change the following line inside the Config() class:

Picture6

Make sure to change the project’s directory inside data.yaml (inside YOLOv5/data.yaml) to your personal directory path:

Picture7

  1. Create the following sub-folders inside the project directory in the following hierarchy:

Picture8

Under the project directory, create two sub-directories: FinalCode, YOLOv5. Under FinalCode, create five sub-directories: dataset, labeled_data, test, validation, train, yolov5_results.

  1. Insert given files and directories under directories in google drive: After creating directories and subdirectories (in previous step), insert the following files inside the directories you just made:

  2. Inside /content/gdrive/MyDrive/Final_Project/Phase_B/FinalCode/dataset insert images from given dataset directory. After this step, dataset directory in your google drive should look like this:

Picture9

Inside /content/gdrive/MyDrive/Final_Project/Phase_B/YOLOv5 insert files from the given YOLOv5 directory. After this step, YOLOv5 directory in your google drive should look like this:

Picture10

To train and test the HappyWhale model, open HappyWhale.ipynb in GoogleColab, and choose “run-all” in the Runtime tab.

Configuring model’s hyperparameters

In order to change the model’s hyperparameters, go to the Config() class:

In order to change YOLOv5 hyperparameters, change the following values:

Picture11

In order to change ResNet50 hyperparameters, change the following values:

Picture12

Note: After changing values inside Config(), be sure to run the class’ cell to update the model.

Results

Results of the HappyWhale model will be saved under labeled_data directory (/content/gdrive/MyDrive/Final_Project/Phase_B/FinalCode/labeled_data).

Each prediction of the HappyWhale model is saved under labeled_data in the following manner:

labeled_data/predicted_whale_id/{all images that the model predicted to belong to this individual whale}.

happywhale's People

Contributors

ayalachn avatar

Watchers

 avatar

happywhale's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.