# CvPal ๐ผ๏ธ
<div align="center">
![CvPal Logo](assets/image.png)
[![PyPI version](https://badge.fury.io/py/cvpal.svg)](https://badge.fury.io/py/cvpal)
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1D_MNu3Z4lQYErs3wdYbsG4GVOU-p2ywF?usp=sharing)
[![Documentation](https://img.shields.io/badge/Documentation-๐-blue)](https://github.com/Muhamed555/CvPal/tree/main/documentation)
</div>
## ๐ Introduction
Welcome to **CvPal** - Your Ultimate Computer Vision Companion! ๐
**CvPal** is a cutting-edge Python package designed to empower Computer Vision engineers worldwide. Our mission is to streamline image operations, dataset management, and synthetic data generation, allowing you to focus on what truly matters: building and optimizing your machine learning pipelines.
๐ **Proudly Sponsored by VisionFullSpace** ๐
## ๐ฏ Features
- ๐ผ๏ธ **Synthetic Image Generation**: Create custom datasets using text prompts
- ๐ **Dataset Merging**: Seamlessly combine datasets with multiple attributes
- ๐๏ธ **Label Management**: Effortlessly remove or replace specific labels from your dataset
- ๐ **Label Occurrence Counting**: Accurately track label frequencies
- ๐ **Dataset Reporting**: Generate comprehensive reports on your dataset
- ๐ **Easy Integration**: Smoothly integrate with existing ML pipelines
- ๐ **Comprehensive Documentation**: Detailed guides for all features
- ๐ค **AI-Powered Dataset Creation**: Generate entire datasets with just a prompt
- ๐ผ **Pandas Integration**: Group images and labels into a pandas DataFrame for advanced manipulation
## ๐ Dataset Folder Structure
For optimal performance, please structure your dataset folder as follows:
```
folder/
โโโ train/
โ โโโ images/
โ โโโ labels/
โโโ test/
โ โโโ images/
โ โโโ labels/
โโโ valid/
โโโ images/
โโโ labels/
```
For TXT format datasets, include a `data.yaml` config file:
```
folder/
โโโ data.yaml
```
Example `data.yaml`:
```yaml
names:
- Old_Paper
- Rock
- Scissors
nc: 3
roboflow:
license: Private
project: rock-paper-scissors-sxsw
url: https://universe.roboflow.com/roboflow-58fyf/rock-paper-scissors-sxsw/dataset/14
version: 14
workspace: roboflow-58fyf
test: ../test/images
train: Rock-Paper-Scissors-SXSW-14/train/images
val: Rock-Paper-Scissors-SXSW-14/valid/images
```
## ๐ Installation
Install CvPal with a simple pip command:
```bash
pip install cvpal==1.0.2
```
## ๐ง Example Usage
```python
from cvpal.generate import DetectionDataset
from cvpal.preprocessing import ImagesDetection
# Generate synthetic data
detection_dataset = DetectionDataset(model="stable-diffusion")
detection_dataset.generate("a cat looking at the camera", num_images=2, labels=["cat"], output_type="yolo", overwrite=False)
# Preprocess existing dataset
cp = ImagesDetection()
cp.read_data("/content/Rock-Paper-Scissors-SXSW-14", data_type="txt")
cp.report()
```
## ๐ Supported Models and Formats
| Model Name | Supported Format | Support in Package | Detection | Segmentation |
|-----------------------------|------------------|---------------------|-----------|--------------|
| YOLOv5-v11 | TXT & YAML config | โ
| โ
| โ
|
| YOLOv3-v4 | Darknet TXT | โ | โ | โ |
| EfficientDet | Pytorch JSON annotations | โ | โ | โ |
| Detectron 2 | JSON annotations | โ | โ | โ |
| Segmentation Models | XML format | โ | โ | โ |
| TensorFlow Object Detection | Binary format | โ | โ | โ |
| Fine-tune PaliGemma | JSONL annotations | โ | โ | โ |
| Apple's CreateML | Proprietary JSON format | โ | โ | โ |
| Turi Create tools | Proprietary JSON format | โ | โ | โ |
## ๐ค Call for Contributions
Join the CvPal community and make a global impact! We welcome contributions of all sizes:
- ๐ Bug fixes and enhancements
- ๐ Documentation improvements
- ๐จ UI/UX enhancements
- ๐งช New feature development
To contribute major changes, please reach out through our mailing list first.
Other ways to contribute:
- ๐ Help triage issues
- ๐ Create tutorials and presentations
- ๐ต๏ธ Review pull requests
## ๐ License
This project is licensed under the MIT License - see the [LICENSE](LICENSE.txt) file for details.
---
<div align="center">
<strong>Powered by VisionFullSpace</strong><br>
Empowering Computer Vision Worldwide
</div>
Raw data
{
"_id": null,
"home_page": null,
"name": "cvpal",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "python, computer vision, cv, Data Reformatting, YOLO, Roboflow, ultralytics, Data preprocessing",
"author": "Mohamed E. Ibrahim",
"author_email": "mohamedelsayed3487@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/c1/90/024964b7b30dd9aed173da9c987d5ced2a8abd12c2452caa15d3afe3a527/cvpal-1.0.2.tar.gz",
"platform": null,
"description": "\r\n# CvPal \ud83d\uddbc\ufe0f\r\n\r\n<div align=\"center\">\r\n\r\n![CvPal Logo](assets/image.png)\r\n\r\n[![PyPI version](https://badge.fury.io/py/cvpal.svg)](https://badge.fury.io/py/cvpal)\r\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\r\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1D_MNu3Z4lQYErs3wdYbsG4GVOU-p2ywF?usp=sharing)\r\n\r\n[![Documentation](https://img.shields.io/badge/Documentation-\ud83d\udcda-blue)](https://github.com/Muhamed555/CvPal/tree/main/documentation)\r\n\r\n</div>\r\n\r\n## \ud83c\udf1f Introduction\r\n\r\nWelcome to **CvPal** - Your Ultimate Computer Vision Companion! \ud83d\ude80\r\n\r\n**CvPal** is a cutting-edge Python package designed to empower Computer Vision engineers worldwide. Our mission is to streamline image operations, dataset management, and synthetic data generation, allowing you to focus on what truly matters: building and optimizing your machine learning pipelines.\r\n\r\n\ud83c\udfc6 **Proudly Sponsored by VisionFullSpace** \ud83c\udfc6\r\n\r\n## \ud83c\udfaf Features\r\n\r\n- \ud83d\uddbc\ufe0f **Synthetic Image Generation**: Create custom datasets using text prompts\r\n- \ud83d\udd04 **Dataset Merging**: Seamlessly combine datasets with multiple attributes\r\n- \ud83d\uddd1\ufe0f **Label Management**: Effortlessly remove or replace specific labels from your dataset\r\n- \ud83d\udcca **Label Occurrence Counting**: Accurately track label frequencies\r\n- \ud83d\udcdd **Dataset Reporting**: Generate comprehensive reports on your dataset\r\n- \ud83d\udd0c **Easy Integration**: Smoothly integrate with existing ML pipelines\r\n- \ud83d\udcda **Comprehensive Documentation**: Detailed guides for all features\r\n- \ud83e\udd16 **AI-Powered Dataset Creation**: Generate entire datasets with just a prompt\r\n- \ud83d\udc3c **Pandas Integration**: Group images and labels into a pandas DataFrame for advanced manipulation\r\n\r\n## \ud83d\udcc1 Dataset Folder Structure\r\n\r\nFor optimal performance, please structure your dataset folder as follows:\r\n\r\n```\r\nfolder/\r\n\u251c\u2500\u2500 train/\r\n\u2502 \u251c\u2500\u2500 images/\r\n\u2502 \u2514\u2500\u2500 labels/\r\n\u251c\u2500\u2500 test/\r\n\u2502 \u251c\u2500\u2500 images/\r\n\u2502 \u2514\u2500\u2500 labels/\r\n\u2514\u2500\u2500 valid/\r\n \u251c\u2500\u2500 images/\r\n \u2514\u2500\u2500 labels/\r\n```\r\n\r\nFor TXT format datasets, include a `data.yaml` config file:\r\n\r\n```\r\nfolder/\r\n\u2514\u2500\u2500 data.yaml\r\n```\r\n\r\nExample `data.yaml`:\r\n\r\n```yaml\r\nnames:\r\n - Old_Paper\r\n - Rock\r\n - Scissors\r\nnc: 3\r\nroboflow:\r\n license: Private\r\n project: rock-paper-scissors-sxsw\r\n url: https://universe.roboflow.com/roboflow-58fyf/rock-paper-scissors-sxsw/dataset/14\r\n version: 14\r\n workspace: roboflow-58fyf\r\ntest: ../test/images\r\ntrain: Rock-Paper-Scissors-SXSW-14/train/images\r\nval: Rock-Paper-Scissors-SXSW-14/valid/images\r\n```\r\n\r\n## \ud83d\ude80 Installation\r\n\r\nInstall CvPal with a simple pip command:\r\n\r\n```bash\r\npip install cvpal==1.0.2\r\n```\r\n\r\n## \ud83d\udd27 Example Usage\r\n\r\n```python\r\nfrom cvpal.generate import DetectionDataset\r\nfrom cvpal.preprocessing import ImagesDetection\r\n\r\n# Generate synthetic data\r\ndetection_dataset = DetectionDataset(model=\"stable-diffusion\")\r\ndetection_dataset.generate(\"a cat looking at the camera\", num_images=2, labels=[\"cat\"], output_type=\"yolo\", overwrite=False)\r\n\r\n# Preprocess existing dataset\r\ncp = ImagesDetection()\r\ncp.read_data(\"/content/Rock-Paper-Scissors-SXSW-14\", data_type=\"txt\")\r\ncp.report()\r\n```\r\n\r\n## \ud83d\udcca Supported Models and Formats\r\n\r\n| Model Name | Supported Format | Support in Package | Detection | Segmentation |\r\n|-----------------------------|------------------|---------------------|-----------|--------------|\r\n| YOLOv5-v11 | TXT & YAML config | \u2705 | \u2705 | \u2705 |\r\n| YOLOv3-v4 | Darknet TXT | \u274c | \u274c | \u274c |\r\n| EfficientDet | Pytorch JSON annotations | \u274c | \u274c | \u274c |\r\n| Detectron 2 | JSON annotations | \u274c | \u274c | \u274c |\r\n| Segmentation Models | XML format | \u274c | \u274c | \u274c |\r\n| TensorFlow Object Detection | Binary format | \u274c | \u274c | \u274c |\r\n| Fine-tune PaliGemma | JSONL annotations | \u274c | \u274c | \u274c |\r\n| Apple's CreateML | Proprietary JSON format | \u274c | \u274c | \u274c |\r\n| Turi Create tools | Proprietary JSON format | \u274c | \u274c | \u274c |\r\n\r\n## \ud83e\udd1d Call for Contributions\r\n\r\nJoin the CvPal community and make a global impact! We welcome contributions of all sizes:\r\n\r\n- \ud83d\udc1b Bug fixes and enhancements\r\n- \ud83d\udcdd Documentation improvements\r\n- \ud83c\udfa8 UI/UX enhancements\r\n- \ud83e\uddea New feature development\r\n\r\nTo contribute major changes, please reach out through our mailing list first.\r\n\r\nOther ways to contribute:\r\n- \ud83d\udd0d Help triage issues\r\n- \ud83d\udcda Create tutorials and presentations\r\n- \ud83d\udd75\ufe0f Review pull requests\r\n\r\n## \ud83d\udcc4 License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE.txt) file for details.\r\n\r\n---\r\n\r\n<div align=\"center\">\r\n <strong>Powered by VisionFullSpace</strong><br>\r\n Empowering Computer Vision Worldwide\r\n</div>\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A Python library for every Computer Vision Engineer",
"version": "1.0.2",
"project_urls": null,
"split_keywords": [
"python",
" computer vision",
" cv",
" data reformatting",
" yolo",
" roboflow",
" ultralytics",
" data preprocessing"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3b350c849ff8970f9b2eb11732b721c82c6b20424fe3c448ed390213420d15e6",
"md5": "7de0bd78ab5f6c88071c38115a6ff25d",
"sha256": "a57d124359a45b583ccd8a5d6a6c47271b760e0db925724764e0e097632545c6"
},
"downloads": -1,
"filename": "cvpal-1.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7de0bd78ab5f6c88071c38115a6ff25d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 16207,
"upload_time": "2024-10-14T20:36:41",
"upload_time_iso_8601": "2024-10-14T20:36:41.373490Z",
"url": "https://files.pythonhosted.org/packages/3b/35/0c849ff8970f9b2eb11732b721c82c6b20424fe3c448ed390213420d15e6/cvpal-1.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c190024964b7b30dd9aed173da9c987d5ced2a8abd12c2452caa15d3afe3a527",
"md5": "1fcab366815420c1ceda0e0943cc5a2d",
"sha256": "83ec2df6b71ae06aca51c35deb61aff230f76188081c743a689f906f04e81f58"
},
"downloads": -1,
"filename": "cvpal-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "1fcab366815420c1ceda0e0943cc5a2d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 15678,
"upload_time": "2024-10-14T20:36:44",
"upload_time_iso_8601": "2024-10-14T20:36:44.817803Z",
"url": "https://files.pythonhosted.org/packages/c1/90/024964b7b30dd9aed173da9c987d5ced2a8abd12c2452caa15d3afe3a527/cvpal-1.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-14 20:36:44",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "cvpal"
}