Giter VIP home page Giter VIP logo

agarvision_2024's Introduction

Hackathon Agarvision

image

This project was developed as part of the AgarVision hackathon hosted by Novo Nordisk at ITU (Denmark). There are two subtasks.

first subtask: binary classification of agar plates to determine whether they are empty or not

Utilizing a pre-trained DenseNet-121 model, originally trained on ImageNet, the project adapts the model for a binary classification task by modifying the last layer. This approach achieved a score of 0.98 (98%) on the final test set based on a combined metric of accuracy and recall.

second subtask: how many colonies are on each agar plates

Utilizing a pre-trained YOLOv8 model, the project adapts the model for object detection and localization. The model achieved a score of 0.054 on the final test set based on mean squared log error.

First subtask: Binary classification

Setup

  1. Clone this repository.
  2. Install the required packages by running poetry install.
  3. Download the dataset [https://agar.neurosys.com/]

Usage

Open the binary_classifier.ipynb notebook and it will go through loading data, preprocessing, model training, and evaluation.

Performance

The primary goal of the model was to minimize false negatives to ensure that agar plates with bacteria are accurately identified, avoiding the risk of misclassifying contaminated plates as clean. In the validation set, out of 198 agar plates that were truly empty, the model correctly identified 187, resulting in 11 false negatives. This translates to an approximately 4% misclassification rate for the empty class.

image

Second Subtask: Object detection

Setup

Install the required packages

pip install ultralytics

Usage

Since we run models on a cluster, we have to submit jobs to the cluster. The following scripts are used to submit jobs to the cluster. You might need to change the paths to the data and the model as well as the required resources in the bash scripts.

  • Process the data: We turn all the images into grayscale and resize them since they are in different lighting conditions and sizes.
sbatch data.sh
  • Train the model: you might need to change the setting in novo.yaml.
sbatch sbatch.sh
  • Evaluate the model
sbatch eval.sh

agarvision_2024's People

Contributors

magnuss0 avatar oran-ac avatar

Stargazers

 avatar

Watchers

 avatar

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.