https://github.com/mr-talhailyas/augmenting_detection_dataset
augmenting object detection dataset along with bounding box annotations
https://github.com/mr-talhailyas/augmenting_detection_dataset
augumentation bounding-box-augmentation detection-dataset object-detection-augmentation xml-files
Last synced: about 1 year ago
JSON representation
augmenting object detection dataset along with bounding box annotations
- Host: GitHub
- URL: https://github.com/mr-talhailyas/augmenting_detection_dataset
- Owner: Mr-TalhaIlyas
- Created: 2020-11-05T22:58:45.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-07-16T05:56:40.000Z (almost 5 years ago)
- Last Synced: 2025-02-11T18:43:51.598Z (over 1 year ago)
- Topics: augumentation, bounding-box-augmentation, detection-dataset, object-detection-augmentation, xml-files
- Language: Jupyter Notebook
- Homepage:
- Size: 5.26 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://hits.seeyoufarm.com)
# Augmentation for Detection Dataset
This repo utilizes [**imageaug**](https://imgaug.readthedocs.io/en/latest/source/examples_bounding_boxes.html) library to augument the object detection dataset.
## Usage
```
python \path_2_script\bb_aug.py -i=C:\Users\Desktop\new\in -o=C:\Users\Desktop\new\op -c train bus cycle car -iter=3
```
For help
```
python D:\path 2 where file is located\bb_aug.py -h
usage: bb_aug.py [-h] [-i IMG_PATH] [-o OP_IMG_PATH]
[-c CLASSES [CLASSES ...]] [--xml_path XML_PATH]
[--op_xml_path OP_XML_PATH] [-iter ITERATIONS]
optional arguments:
-h, --help show this help message and exit
-i IMG_PATH, --img_path IMG_PATH
path to read images.
-o OP_IMG_PATH, --op_img_path OP_IMG_PATH
path to write images.
-c CLASSES [CLASSES ...], --classes CLASSES [CLASSES ...]
a list containing names of all classes in dataset
--xml_path XML_PATH path to read xml files if None then same as img_path.
--op_xml_path OP_XML_PATH
path to write xml files if None then same as
op_img_path.
-iter ITERATIONS, --iterations ITERATIONS
Number of times to augment each image e.g. if input
dir has 2 images and iterations=4 then op dir will
have 8 images, default is 1.
```
## Output
```
============================================================
Images Found = 3
Annot. Found = 3
------------------------------------------------------------
Augmneted Files = 9
============================================================
Augumenting Dataset (iteration 1of3): 100%|████████████████████████████████████████████████████████████████████████████████| 3/3 [00:03<00:00, 1.00s/it]
Augumenting Dataset (iteration 2of3): 100%|████████████████████████████████████████████████████████████████████████████████| 3/3 [00:03<00:00, 1.23s/it]
Augumenting Dataset (iteration 3of3): 100%|████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.40it/s]
```
## Dependency (Libraries)
1. imgaug
2. matplot
3. cv2
4. xmltodict
5. dicttoxml
## Follwing are some examples of input images with their b_boxes drawn on them and their corresponding augumented outputs.


