Giter Site home page Giter Site logo

int20h-hackathon-2024's Introduction

RSNA Pneumonia Detection Challenge

About

This is experimental approach for the Pneumonia detection challenge available here.

Running Inference Script

To run the inference script, follow these steps:

  1. Clone the Repository:

    git clone https://github.com/nazarsavorona/INT20H-hackathon-2024
    cd INT20H-hackathon-2024
    
  2. Install Dependencies:

    pip install -r requirements.txt
    
  3. Run the Script:

    python inference.py --binary-weights /path/to/binary_weights.pt --detector-weights /path/to/detector_weights.pt --source /path/to/image/directory --batch-size 128
    

    Replace the following arguments with your desired values:

    • --binary-weights: Path to the binary weights file.
    • --detector-weights: Path to the detector weights file.
    • --source: Source directory containing images for inference.
    • --batch-size: Batch size for inference (default is 128).
  4. Output:

    After running the script, the results will be saved to submission.csv in the current directory.

Implementation

Approach/model selection

After some consideration, the final choice fell on using the YOLO model because of its high speed and good detection of multiple objects in the picture. The main idea was to break the task into two subtasks - pneumonia binary classification and object detection on previously classified data.

Data preprocessing

As required by YOLO models, we use 640*640 image rescaling saved in .png format to proceed with further training. Labels are stored as .txt file for each picture containing elements in format class x-center y-center width height.

Model building

For the classification part we use YOLOv8M-cls, which is a specific mid-sized variant of YOLOv8 for classification purposes and offers a pretty good balance between accuracy and speed.

Main selected parameters for YOLOv8M-cls:

  • dropout = 0.25
  • optimizer = AdamW
  • lr0 = 1e-4
  • lrf = 1e-3

For the object detection part we use same variant YOLOv8m, which is used for this type of tasks specifically.

Main selected parameters for YOLOv8m:

  • dropout = 0.1
  • optimizer = AdamW
  • lr0 = 1e-3
  • lrf = 1e-2

Prediction

In this challenge, we are expected to orginize our predictions by the following format:

confidence x-min y-min width height

Also we should provide only one prediction per image, althought there might be several bounding boxes, which have to be written one by one without separation.

int20h-hackathon-2024's People

Contributors

captainshepard01 avatar nazarsavorona avatar hodor-brain 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.