imagebaker 0.0.1__tar.gz

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.
Files changed (37) hide show
  1. imagebaker-0.0.1/LICENSE +21 -0
  2. imagebaker-0.0.1/PKG-INFO +83 -0
  3. imagebaker-0.0.1/README.md +69 -0
  4. imagebaker-0.0.1/imagebaker/__init__.py +3 -0
  5. imagebaker-0.0.1/imagebaker/layers/__init__.py +3 -0
  6. imagebaker-0.0.1/imagebaker/layers/annotable_layer.py +847 -0
  7. imagebaker-0.0.1/imagebaker/layers/base_layer.py +477 -0
  8. imagebaker-0.0.1/imagebaker/layers/canvas_layer.py +825 -0
  9. imagebaker-0.0.1/imagebaker/list_views/__init__.py +3 -0
  10. imagebaker-0.0.1/imagebaker/list_views/annotation_list.py +203 -0
  11. imagebaker-0.0.1/imagebaker/list_views/canvas_list.py +179 -0
  12. imagebaker-0.0.1/imagebaker/list_views/image_list.py +138 -0
  13. imagebaker-0.0.1/imagebaker/list_views/layer_list.py +379 -0
  14. imagebaker-0.0.1/imagebaker/list_views/layer_settings.py +212 -0
  15. imagebaker-0.0.1/imagebaker/models/__init__.py +0 -0
  16. imagebaker-0.0.1/imagebaker/models/base_model.py +144 -0
  17. imagebaker-0.0.1/imagebaker/models/rtdetr_v2.py +255 -0
  18. imagebaker-0.0.1/imagebaker/models/sam_model.py +362 -0
  19. imagebaker-0.0.1/imagebaker/models/segmentation.py +289 -0
  20. imagebaker-0.0.1/imagebaker/tabs/__init__.py +2 -0
  21. imagebaker-0.0.1/imagebaker/tabs/baker_tab.py +387 -0
  22. imagebaker-0.0.1/imagebaker/tabs/layerify_tab.py +776 -0
  23. imagebaker-0.0.1/imagebaker/window/__init__.py +1 -0
  24. imagebaker-0.0.1/imagebaker/window/app.py +136 -0
  25. imagebaker-0.0.1/imagebaker/window/main_window.py +171 -0
  26. imagebaker-0.0.1/imagebaker/workers/__init__.py +3 -0
  27. imagebaker-0.0.1/imagebaker/workers/baker_worker.py +182 -0
  28. imagebaker-0.0.1/imagebaker/workers/layerfy_worker.py +81 -0
  29. imagebaker-0.0.1/imagebaker/workers/model_worker.py +43 -0
  30. imagebaker-0.0.1/imagebaker.egg-info/PKG-INFO +83 -0
  31. imagebaker-0.0.1/imagebaker.egg-info/SOURCES.txt +35 -0
  32. imagebaker-0.0.1/imagebaker.egg-info/dependency_links.txt +1 -0
  33. imagebaker-0.0.1/imagebaker.egg-info/entry_points.txt +2 -0
  34. imagebaker-0.0.1/imagebaker.egg-info/requires.txt +8 -0
  35. imagebaker-0.0.1/imagebaker.egg-info/top_level.txt +1 -0
  36. imagebaker-0.0.1/setup.cfg +4 -0
  37. imagebaker-0.0.1/setup.py +34 -0
@@ -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,83 @@
1
+ Metadata-Version: 2.1
2
+ Name: imagebaker
3
+ Version: 0.0.1
4
+ Summary: A package for baking images.
5
+ Home-page: https://github.com/q-viper/Image-Baker
6
+ Author: Ramkrishna Acharya
7
+ Author-email: qramkrishna@gmail.com
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
+
15
+ # Image-Baker
16
+
17
+ Let's bake an image.
18
+
19
+ ## Why is it relevant?
20
+
21
+ 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.
22
+
23
+ ## What's up with the name?
24
+
25
+ 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.
26
+
27
+ ## Getting Started
28
+
29
+ ### Installation
30
+
31
+ #### Using PIP
32
+
33
+ ```bash
34
+ pip install imagebaker
35
+ ```
36
+
37
+ #### Developing
38
+
39
+ Clone this repository and install it locally:
40
+
41
+ ```bash
42
+ pip install -e .
43
+ ```
44
+
45
+ ### First Run
46
+
47
+ Run the following command to launch the GUI:
48
+
49
+ ```bash
50
+ imagebaker
51
+ ```
52
+
53
+ If the command does not work, try running the example script:
54
+
55
+ ```bash
56
+ python examples/app.py
57
+ ```
58
+
59
+ ## Features
60
+
61
+ - **Annotating Images**: Load a folder of images and annotate them using bounding boxes or polygons.
62
+ - **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.
63
+ - **Layerifying**: Crop images based on annotations to create reusable layers. Each cropped image represents a single layer.
64
+ - **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**.
65
+ - **Playing States**: Replay saved states, export them locally, or use them for further predictions.
66
+ - **Exporting States**: Export the final annotated JSON and the baked multilayer image.
67
+
68
+ ### Shortcuts
69
+ * **Ctrl + C**: Copy selected annotation/layer.
70
+ * **Ctrl + V**: Paste copied annotation/layer in its parent image/layer if it is currently open.
71
+ * **Delete**: Delete selected annotation/layer.
72
+ * **Left Click**: Select an annotation/layer on mouse position.
73
+ * **Left Click + Drag**: Drag a selected annotation/layer.
74
+ * **Double Left Click**: When using Polygon annotation, completes the polygon.
75
+ * **Right Click**: Deselect an annotation/layer. While on annotating polygon, undo last point.
76
+ * **Ctrl + Mouse Wheel**: Zoom In/Out on the mouse position i.e. resizes the viewport.
77
+ * **Ctrl + Drag**: If done on the background, the viewport is panned.
78
+ * **Ctrl + S**: Save State.
79
+
80
+
81
+ ## Contributions
82
+
83
+ Contributions are welcome! Feel free to open issues or submit pull requests to improve the project.
@@ -0,0 +1,69 @@
1
+ # Image-Baker
2
+
3
+ Let's bake an image.
4
+
5
+ ## Why is it relevant?
6
+
7
+ 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.
8
+
9
+ ## What's up with the name?
10
+
11
+ 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.
12
+
13
+ ## Getting Started
14
+
15
+ ### Installation
16
+
17
+ #### Using PIP
18
+
19
+ ```bash
20
+ pip install imagebaker
21
+ ```
22
+
23
+ #### Developing
24
+
25
+ Clone this repository and install it locally:
26
+
27
+ ```bash
28
+ pip install -e .
29
+ ```
30
+
31
+ ### First Run
32
+
33
+ Run the following command to launch the GUI:
34
+
35
+ ```bash
36
+ imagebaker
37
+ ```
38
+
39
+ If the command does not work, try running the example script:
40
+
41
+ ```bash
42
+ python examples/app.py
43
+ ```
44
+
45
+ ## Features
46
+
47
+ - **Annotating Images**: Load a folder of images and annotate them using bounding boxes or polygons.
48
+ - **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.
49
+ - **Layerifying**: Crop images based on annotations to create reusable layers. Each cropped image represents a single layer.
50
+ - **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**.
51
+ - **Playing States**: Replay saved states, export them locally, or use them for further predictions.
52
+ - **Exporting States**: Export the final annotated JSON and the baked multilayer image.
53
+
54
+ ### Shortcuts
55
+ * **Ctrl + C**: Copy selected annotation/layer.
56
+ * **Ctrl + V**: Paste copied annotation/layer in its parent image/layer if it is currently open.
57
+ * **Delete**: Delete selected annotation/layer.
58
+ * **Left Click**: Select an annotation/layer on mouse position.
59
+ * **Left Click + Drag**: Drag a selected annotation/layer.
60
+ * **Double Left Click**: When using Polygon annotation, completes the polygon.
61
+ * **Right Click**: Deselect an annotation/layer. While on annotating polygon, undo last point.
62
+ * **Ctrl + Mouse Wheel**: Zoom In/Out on the mouse position i.e. resizes the viewport.
63
+ * **Ctrl + Drag**: If done on the background, the viewport is panned.
64
+ * **Ctrl + S**: Save State.
65
+
66
+
67
+ ## Contributions
68
+
69
+ Contributions are welcome! Feel free to open issues or submit pull requests to improve the project.
@@ -0,0 +1,3 @@
1
+ from loguru import logger # noqa
2
+
3
+ logger.info("imagebaker package loaded with loguru logger.")
@@ -0,0 +1,3 @@
1
+ from .base_layer import BaseLayer # noqa: F401
2
+ from .annotable_layer import AnnotableLayer # noqa: F401
3
+ from .canvas_layer import CanvasLayer # noqa: F401