https://github.com/pranftw/oddgen
Generate object detection datasets from individual objects with automatic bounding box annotations
https://github.com/pranftw/oddgen
automatic-generation bounding-box-annotations dataset-generation object-detection
Last synced: 8 days ago
JSON representation
Generate object detection datasets from individual objects with automatic bounding box annotations
- Host: GitHub
- URL: https://github.com/pranftw/oddgen
- Owner: pranftw
- License: mit
- Created: 2023-03-17T10:00:54.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-23T02:20:24.000Z (almost 3 years ago)
- Last Synced: 2023-08-23T05:58:20.728Z (almost 3 years ago)
- Topics: automatic-generation, bounding-box-annotations, dataset-generation, object-detection
- Language: Python
- Homepage:
- Size: 107 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ODDGen - Object Detection Dataset Generator
### Generate object detection datasets from individual objects with automatic bounding box annotations
## Features
- Automatically generates object detection dataset along with bounding box annotations
- Background remover for objects with backgrounds along with training script for U2NET if one requires a custom background remover
- Add backgrounds to generated images
- Easily scalable to generate tens of thousands of images through batching
## Installation
```bash
git clone https://github.com/pranftw/oddgen.git
cd oddgen
# create and activate virtual environment
pip install -r requirements.txt
```
## Example
- A simple ShapeNet example is demonstrated in `example.py`
- Download sample dataset from https://drive.google.com/drive/folders/1mGMq5jGSY_BmnOdYjejDg_yi8zeSmOc2?usp=sharing and sample backgrounds from https://drive.google.com/drive/folders/135ozo_lTppYSaquCMWP566fEpl0MyWff?usp=sharing
- The sample dataset contains 3 objects - phone, ship and plane from ShapeNet. Sample backgrounds contains several background images
- Set the required path environment variables as specified in SET ENV VARS
- Execute `python example.py` by uncommenting only the required functions one by one
## Download PyTorch files for Background Remover
- `mkdir oddgen/bg_remover/models`
- Download the required files from the following links into `oddgen/bg_remover/models`
- model scripts - https://drive.google.com/drive/folders/1CckJQwVC2gRu9xw0HNNw5JYhC4RHfMHQ?usp=sharing
- ISNET weights - https://drive.google.com/file/d/1nV57qKuy--d5u1yvkng9aXW1KS4sOpOi/view?usp=sharing (from [official link](https://github.com/xuebinqin/DIS))
- U2NET weights - https://drive.google.com/file/d/1ao1ovG1Qtx4b7EoskHXmi2E9rp5CHLcZ/view?usp=sharing (from [official link](https://github.com/xuebinqin/U-2-Net))
- U2NETP weights - https://drive.google.com/file/d/1rbSTGKAE-MTxBYHd-51l2hMOQPT_7EPy/view?usp=sharing (from [official link](https://github.com/xuebinqin/U-2-Net))