This repository contains instructions for performing object detection tasks by training an RTMDet model using MMDetection with Docker.
Before you begin, ensure you have Docker installed on your system. If not, you can install it by following the instructions here.
Clone this GitHub repository:
git clone https://github.com/javad-rezaie/RTMDet
cd RTMDet
There are two options for setting up the Docker environment:
Run the following command to pull the pre-built MMDetection Docker image:
make docker-pull-mmdetection
Build your own Docker image with MMDetection and your project code by running:
make docker-build-mmdetection
- Download the Kvasir-Instrument dataset from simula.
- Unzip the dataset and place it in a suitable directory.
- Convert the dataset format to COCO format by following the steps described in
Data_Preparation.ipynb
Jupyter notebook.
To run the Jupyter notebook from the terminal, execute the jupyter.sh
script:
bash jupyter.sh
- Update the
DATA_DIR
path inside thetrain.sh
script to your appropriate local path where the dataset is located. - Update the
GPU
variable to the number of installed GPUs on your PC.
Ensure that the train.sh
and jupyter.sh
bash scripts has executable permissions. If not, grant execute permission by running chmod u+x train.sh
.
Our trained PyTorch model was converted to OpenVINO format using the Model Optimizer tool. This streamlined the deployment process for various hardware platforms.
We shared the trained models (original PyTorch model and its converted version to OpenVINO format) on the Hugging Face Model Hub, making it easily accessible for developers (here). This allows for straightforward integration into applications and fine-tuning on custom datasets.
Instantiating the model from its unique identifier on Hugging Face enables easy execution and result visualization. Whether through the website interface or the API, running the model is intuitive and efficient.
This project is intended for educational purposes only. It is not intended to provide medical advice or any other professional advice. Any use of this project for real-world applications should be done with caution and proper consultation with relevant experts.
This project is licensed under the This project is licensed under the Apache License 2.0 - see the LICENSE file for details.