imagebaker 0.0.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
imagebaker/__init__.py ADDED
@@ -0,0 +1,5 @@
1
+ from loguru import logger # noqa
2
+
3
+ logger.info("imagebaker package loaded with loguru logger.")
4
+
5
+ __version__ = "0.0.4" # noqa
@@ -0,0 +1,117 @@
1
+ Metadata-Version: 2.4
2
+ Name: imagebaker
3
+ Version: 0.0.4
4
+ Summary: A package for baking images.
5
+ Author-email: Ramkrishna Acharya <qramkrishna@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/q-viper/Image-Baker
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.10
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: numpy>=1.21
15
+ Requires-Dist: matplotlib>=3.4
16
+ Requires-Dist: opencv-python>=4.5
17
+ Requires-Dist: black>=23.1
18
+ Requires-Dist: pydantic>=2.0
19
+ Requires-Dist: flake8>=6.0
20
+ Requires-Dist: typer>=0.9
21
+ Requires-Dist: PySide6==6.8.3
22
+ Requires-Dist: loguru
23
+ Provides-Extra: docs
24
+ Requires-Dist: mkdocs>=1.4; extra == "docs"
25
+ Requires-Dist: mkdocs-material>=9.0; extra == "docs"
26
+ Requires-Dist: mkdocstrings[python]>=0.21; extra == "docs"
27
+ Requires-Dist: pymdown-extensions>=8.0; extra == "docs"
28
+ Requires-Dist: mkdocs-awesome-pages-plugin; extra == "docs"
29
+ Dynamic: license-file
30
+
31
+ # Image-Baker
32
+
33
+ Let's bake an image.
34
+
35
+ ## Why is it relevant?
36
+
37
+ When training computer vision models (especially for detection and segmentation), labeling large amounts of data is crucial for better model performance. Often, the process involves multiple cycles of labeling, training, and evaluation. By generating multiple realistic labeled datasets from a single image, the time spent on labeling can be significantly reduced.
38
+
39
+ ## What's up with the name?
40
+
41
+ The concept involves extracting portions of an image (e.g., objects of interest) using tools like polygons or models such as Segment Anything. These extractions are treated as layers, which can then be copied, pasted, and manipulated to create multiple instances of the desired object. By combining these layers step by step, a new labeled image with annotations in JSON format is created. The term "Baking" refers to the process of merging these layers into a single cohesive image.
42
+
43
+ ## Getting Started
44
+
45
+ ### Installation
46
+
47
+ #### Using PIP
48
+ This project is also available in PyPI server.
49
+
50
+ ```bash
51
+ pip install imagebaker
52
+ ```
53
+
54
+ #### Developing
55
+ Please, clone this repository and install it locally:
56
+
57
+ ```bash
58
+ git clone https://github.com/q-viper/image-baker.git
59
+ cd image-baker
60
+ pip install -e .
61
+ ```
62
+
63
+ ### First Run
64
+
65
+ Run the following command to launch the GUI:
66
+
67
+ ```bash
68
+ imagebaker
69
+ ```
70
+
71
+ If the command does not work, try running the example script after cloning the project.:
72
+
73
+ ```bash
74
+ python examples/app.py
75
+ ```
76
+
77
+ ## Features
78
+
79
+ - **Annotating Images**: Load a folder of images and annotate them using bounding boxes or polygons.
80
+ - **Model Testing**: Define models for detection, segmentation, and prompts (e.g., points or rectangles) by following the base model structure in [imagebaker/models/base_model.py](imagebaker/models/base_model.py). See [examples/loaded_models.py](examples/loaded_models.py) for a working example.
81
+ - **Layerifying**: Crop images based on annotations to create reusable layers. Each cropped image represents a single layer.
82
+ - **Baking States**: Arrange layers to create image variations by dragging, rotating, adjusting opacity, and more. Save the state using the **Save State** button or **Ctrl + S**.
83
+ - **Playing States**: Replay saved states, export them locally, or use them for further predictions.
84
+ - **Exporting States**: Export the final annotated JSON and the baked multilayer image.
85
+
86
+ ### Shortcuts
87
+ * **Ctrl + C**: Copy selected annotation/layer.
88
+ * **Ctrl + V**: Paste copied annotation/layer in its parent image/layer if it is currently open.
89
+ * **Delete**: Delete selected annotation/layer.
90
+ * **Left Click**: Select an annotation/layer on mouse position.
91
+ * **Left Click + Drag**: Drag a selected annotation/layer.
92
+ * **Double Left Click**: When using Polygon annotation, completes the polygon.
93
+ * **Right Click**: Deselect an annotation/layer. While on annotating polygon, undo last point.
94
+ * **Ctrl + Mouse Wheel**: Zoom In/Out on the mouse position i.e. resizes the viewport.
95
+ * **Ctrl + Drag**: If done on the background, the viewport is panned.
96
+ * **Ctrl + S**: Save State on Baker Tab.
97
+ * **Ctrl + D**: Draw Mode on Baker Tab. Drawing can happen on a selected or main layer.
98
+ * **Ctrl + E**: Erase Mode on Baker Tab.
99
+ * **Wheel**: Change size of the drawing pointer.
100
+
101
+
102
+ ## Demo
103
+
104
+ ## Demo
105
+
106
+ To see the tool in action, check out the demo video below:
107
+
108
+ [![Demo Video](https://img.youtube.com/vi/WckMT0r-2Lc/0.jpg)](https://youtu.be/WckMT0r-2Lc)
109
+
110
+ Click on the image above to play the video on YouTube.
111
+
112
+
113
+ ## Contributions
114
+
115
+ Contributions are welcome!
116
+
117
+ Do you find this project to be useful and looking for some features that is not implemented yet? Feel free to open issues or submit pull requests to improve the project.
@@ -0,0 +1,7 @@
1
+ imagebaker/__init__.py,sha256=UeXmuH87AJb0MVzWgT4HXNtl99XxS7HGenLyI9K93go,127
2
+ imagebaker-0.0.4.dist-info/licenses/LICENSE,sha256=1vkysFPOnT7y4LsoFTv9YsopIrQvBc2l6vUOfv4KKLc,1082
3
+ imagebaker-0.0.4.dist-info/METADATA,sha256=PHVvDdO8aGlw333C7SLYIh6i3oMAT6epQ8uWfqDnnJo,4715
4
+ imagebaker-0.0.4.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
5
+ imagebaker-0.0.4.dist-info/entry_points.txt,sha256=IDjZHJCiiHpH5IUTByT2en0nMbnnnlrJZ5FPFehUvQM,61
6
+ imagebaker-0.0.4.dist-info/top_level.txt,sha256=Gg-eILTlqJXwVQr0saSwsx3-H4SPdZ2agBZaufe194s,11
7
+ imagebaker-0.0.4.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (78.1.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ imagebaker = imagebaker.window.app:app_cli
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Ramkrishna Acharya(Viper)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ imagebaker