https://github.com/gaborvecsei/dummy-objects-dataset
https://github.com/gaborvecsei/dummy-objects-dataset
dataset machine-learning opencv python python3 sklearn
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/gaborvecsei/dummy-objects-dataset
- Owner: gaborvecsei
- Created: 2018-08-29T07:25:10.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-06-03T19:53:51.000Z (about 6 years ago)
- Last Synced: 2024-12-29T17:17:01.468Z (over 1 year ago)
- Topics: dataset, machine-learning, opencv, python, python3, sklearn
- Language: Python
- Size: 34.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dummy Object Dataset
**This tool is under development and not completed - contains lot of problems**
The purpose of this "tool" is that we can easily debug our Machine Learning solutions for **object detection** (in the
near future: **segmentation** and **keypoint detection**)
I always had trouble finding small datasets where my model can easily overfit, or where I can check if it works
as it is supposed to. So the best solution is: generate the simplest images in the fly.
This tool is highly influenced by the idea in: [matterport/Mask_RCNN](https://github.com/matterport/Mask_RCNN/blob/master/samples/shapes/shapes.py#L63)
## Sample images
We can change the min number of shapes, max number of shapes, image size, etc...



## Install
- Required packages
- OpenCV 3
- Numpy
`python3 setup.py install` or you can do this directly from github
## Usage
```
import dummy_dataset
image, bboxes, labels = dummy_dataset.DummyObjectsDataset.get_image_with_labels(image_height, image_width)
# image shape: (image_height, image_width, 3)
# bboxes shape: (n_boxes, 4) --> (x0, y0, x1, y1)
# labels shape: (n_boxes, 1) --> int
fig, ax = plt.subplots(1, 1)
ax.imshow(image)
for b in bboxes:
x0, y0, x1, y1 = b
rec = patches.Rectangle((x0, y0), x1-x0, y1-y0, fill=0)
ax.add_patch(rec)
```