From aca1e4b7bdf1d54f124735368bcb8b72ec6d0804 Mon Sep 17 00:00:00 2001 From: Nikita Sokovnin <49622375+sokovninn@users.noreply.github.com> Date: Tue, 12 Dec 2023 16:32:45 +0100 Subject: [PATCH 1/2] docs: update bug report template --- .github/ISSUE_TEMPLATE/bug_report.md | 30 ++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..dde11a4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,30 @@ +--- +name: Bug report +about: Create a report to help us improve +title: "[BUG_TITLE]" +labels: bug +assignees: sokovninn, tersekmatija + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Environment (please complete the following information):** + - OS: [e.g. iOS] + - Package version: [e.g. 0.1.0] + +**To Reproduce** +Please provide a minimal reproducible example. This would include: +- Config file +- Script to generate the dataset in case the issue cannot be reproduced using one of our [example](../../examples) datasets +- Sript to run the pipeline + +**Additional context** +Add any other context about the problem here. From 1c0bc1e836b83b403087fea709ed3ca90ab5fe4b Mon Sep 17 00:00:00 2001 From: Nikita Sokovnin Date: Tue, 12 Dec 2023 15:38:00 +0000 Subject: [PATCH 2/2] style: fix style issues --- .github/ISSUE_TEMPLATE/bug_report.md | 13 +++++++----- README.md | 30 ++++++++++++++++++++-------- 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index dde11a4..2e6813a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,11 +1,12 @@ ---- +______________________________________________________________________ + name: Bug report about: Create a report to help us improve -title: "[BUG_TITLE]" +title: "\[BUG_TITLE\]" labels: bug assignees: sokovninn, tersekmatija ---- +______________________________________________________________________ **Describe the bug** A clear and concise description of what the bug is. @@ -17,11 +18,13 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Environment (please complete the following information):** - - OS: [e.g. iOS] - - Package version: [e.g. 0.1.0] + +- OS: \[e.g. iOS\] +- Package version: \[e.g. 0.1.0\] **To Reproduce** Please provide a minimal reproducible example. This would include: + - Config file - Script to generate the dataset in case the issue cannot be reproduced using one of our [example](../../examples) datasets - Sript to run the pipeline diff --git a/README.md b/README.md index 041d9cc..a4403df 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ In essence, `DataDreamer` is designed to transform the AI development process, m - [Acknowledgements](#acknowledgements) + ## Features - **Prompt Generation**: Automate the creation of image prompts using powerful language models. @@ -57,6 +58,7 @@ In essence, `DataDreamer` is designed to transform the AI development process, m [Example](https://github.com/luxonis/datadreamer/blob/main/examples/generate_dataset_and_train_yolo.ipynb) + ## Installation To install with pip: @@ -77,14 +79,16 @@ pip install . ``` + ## Hardware Requirements To ensure optimal performance and compatibility with the libraries used in this project, the following hardware specifications are recommended: - `GPU`: A CUDA-compatible GPU with a minimum of 16 GB memory. This is essential for libraries like `torch`, `torchvision`, `transformers`, and `diffusers`, which leverage CUDA for accelerated computing in machine learning and image processing tasks. - `RAM`: At least 16 GB of system RAM, although more (32 GB or above) is beneficial for handling large datasets and intensive computations. - + + ## Usage The `datadreamer/pipelines/generate_dataset_from_scratch.py` (`datadreamer` command) script is a powerful tool for generating and annotating images with specific objects. It uses advanced models to both create images and accurately annotate them with bounding boxes for designated objects. @@ -96,6 +100,7 @@ datadreamer --save_dir --class_names --prompts_number + ### Main Parameters - `--save_dir` (required): Path to the directory for saving generated images and annotations. @@ -103,6 +108,7 @@ datadreamer --save_dir --class_names --prompts_number + ### Additional Parameters - `--task`: Choose between `detection` and `classification`. Default is `detection`. @@ -119,17 +125,19 @@ datadreamer --save_dir --class_names --prompts_number + ### Available models -| Model Category | Model Names | Description/Notes | -|--------------------|------------------------------------------------------------------------------|-----------------------------------------------------| -| Prompt Generation | [Mistral-7B-Instruct-v0.1](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1) | Semantically rich prompts | -| | Simple random generator | Joins randomly chosen object names | -| Image Generation | [SDXL-1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0) | Slow and accurate (1024x1024 images) | -| | [SDXL-Turbo](https://huggingface.co/stabilityai/sdxl-turbo) | Fast and less accurate (512x512 images) | -| Image Annotation | [OWlv2](https://huggingface.co/google/owlv2-large-patch14-ensemble) | Open-Vocabulary object detector | +| Model Category | Model Names | Description/Notes | +| ----------------- | ------------------------------------------------------------------------------------- | --------------------------------------- | +| Prompt Generation | [Mistral-7B-Instruct-v0.1](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1) | Semantically rich prompts | +| | Simple random generator | Joins randomly chosen object names | +| Image Generation | [SDXL-1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0) | Slow and accurate (1024x1024 images) | +| | [SDXL-Turbo](https://huggingface.co/stabilityai/sdxl-turbo) | Fast and less accurate (512x512 images) | +| Image Annotation | [OWlv2](https://huggingface.co/google/owlv2-large-patch14-ensemble) | Open-Vocabulary object detector | + ### Example ```bash @@ -139,6 +147,7 @@ datadreamer --save_dir path/to/save_directory --class_names person moon robot -- This command generates images for the specified objects, saving them and their annotations in the given directory. The script allows customization of the generation process through various parameters, adapting to different needs and hardware configurations. + ### Output The dataset comprises two primary components: images and their corresponding annotations, stored as JSON files. @@ -156,6 +165,7 @@ save_dir/ ``` + ### Annotations Format 1. Detection Annotations (detection_annotations.json): @@ -190,11 +200,13 @@ save_dir/ ``` + ### Note Please make sure that all dependencies are correctly installed and that the datadreamer package is properly set up in your Python environment before running the script. + ## Limitations While the datadreamer library leverages advanced Generative models to synthesize datasets and Foundation models for annotation, there are inherent limitations to consider: @@ -206,11 +218,13 @@ While the datadreamer library leverages advanced Generative models to synthesize Despite these limitations, the datasets created by datadreamer provide a valuable foundation for developing and training models, especially for edge computing scenarios where data availability is often a challenge. The synthetic and annotated data should be seen as a stepping stone, granting a significant head start in the model development process. + ## License This project is licensed under the [Apache License, Version 2.0](https://opensource.org/license/apache-2-0/) - see the [LICENSE](LICENSE) file for details. + ## Acknowledgements This library was made possible by the use of several open-source projects, including Transformers, Diffusers, and others listed in the requirements.txt.