Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/girinchutia/fasterrcnn-torchvision-finetuning
Train Torchvision FasterRCNN model with custom COCO dataset
https://github.com/girinchutia/fasterrcnn-torchvision-finetuning
cnn computer-vision deep-learning deep-learning-algorithms deep-neural-networks evaluation faster-rcnn machine-learning object-detection training vision
Last synced: 2 months ago
JSON representation
Train Torchvision FasterRCNN model with custom COCO dataset
- Host: GitHub
- URL: https://github.com/girinchutia/fasterrcnn-torchvision-finetuning
- Owner: GirinChutia
- License: mit
- Created: 2023-07-11T18:19:00.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-26T16:56:46.000Z (6 months ago)
- Last Synced: 2024-07-26T18:44:22.955Z (6 months ago)
- Topics: cnn, computer-vision, deep-learning, deep-learning-algorithms, deep-neural-networks, evaluation, faster-rcnn, machine-learning, object-detection, training, vision
- Language: Jupyter Notebook
- Homepage:
- Size: 1.94 MB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Training code for torchvision FasterRCNN model with custom COCO dataset
---
# Faster RCNN :
Faster RCNN is an object detection model introduced in [Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks](https://arxiv.org/abs/1506.01497) paper.The architechure of Faster RCNN model is shown below,
![](utils/image.png)Faster R-CNN, is composed of two modules. The first module is a deep fully convolutional network that proposes regions, and the second module is the Fast R-CNN detector that uses the proposed regions.
---
# Environment :
- Python version used : 3.9.16
- Create a python or conda environment using ***requirements.txt***---
# Training Instructions :To train the Faster RCNN model follow the below steps :
1. Prepare dataset :
- Prepare dataset in COCO format. It should have the below 2 files & folders
- Image folder
- Annotation file (Json file) in coco format2. Run :
> python train.py --epoch 10 --train_image_dir --val_image_dir --train_coco_json --val_coco_json --batch_size 16 --exp_folderThe training weights and tensorboard logs will be saved in experiment folder
The training and validation logs can be visualized in tensorboard as shown below :
> Train logs
![Alt text](utils/train_logs.png)
> Val Logs
![Alt text](utils/val_logs.png)---
# Inference :The instruction about inference with a trained model are discussed in ***demo_inference.ipynb*** notebook