imagebaker 0.0.4__py3-none-any.whl → 0.0.41__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-0.0.4.dist-info → imagebaker-0.0.41.dist-info}/METADATA +59 -23
- imagebaker-0.0.41.dist-info/RECORD +7 -0
- imagebaker-0.0.4.dist-info/RECORD +0 -7
- {imagebaker-0.0.4.dist-info → imagebaker-0.0.41.dist-info}/WHEEL +0 -0
- {imagebaker-0.0.4.dist-info → imagebaker-0.0.41.dist-info}/entry_points.txt +0 -0
- {imagebaker-0.0.4.dist-info → imagebaker-0.0.41.dist-info}/licenses/LICENSE +0 -0
- {imagebaker-0.0.4.dist-info → imagebaker-0.0.41.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: imagebaker
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.41
|
4
4
|
Summary: A package for baking images.
|
5
5
|
Author-email: Ramkrishna Acharya <qramkrishna@gmail.com>
|
6
6
|
License: MIT
|
@@ -29,6 +29,20 @@ Requires-Dist: mkdocs-awesome-pages-plugin; extra == "docs"
|
|
29
29
|
Dynamic: license-file
|
30
30
|
|
31
31
|
# Image-Baker
|
32
|
+

|
33
|
+

|
34
|
+

|
35
|
+

|
36
|
+
<!--  -->
|
37
|
+

|
38
|
+
|
39
|
+
|
40
|
+
<p align="center">
|
41
|
+
<img src="assets/demo.gif" alt="Centered Demo" />
|
42
|
+
</p>
|
43
|
+
|
44
|
+
|
45
|
+
*An example of baked images. (Each object is a layer and an annotation will also be extracted for all layers.)*
|
32
46
|
|
33
47
|
Let's bake an image.
|
34
48
|
|
@@ -37,15 +51,12 @@ Let's bake an image.
|
|
37
51
|
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
52
|
|
39
53
|
## 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.
|
54
|
+
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
55
|
|
43
56
|
## Getting Started
|
44
|
-
|
45
57
|
### Installation
|
46
|
-
|
47
58
|
#### Using PIP
|
48
|
-
This project is also available
|
59
|
+
This project is also available on the PyPI server.
|
49
60
|
|
50
61
|
```bash
|
51
62
|
pip install imagebaker
|
@@ -61,25 +72,29 @@ pip install -e .
|
|
61
72
|
```
|
62
73
|
|
63
74
|
### First Run
|
64
|
-
|
65
75
|
Run the following command to launch the GUI:
|
66
76
|
|
67
|
-
|
68
|
-
imagebaker
|
69
|
-
```
|
77
|
+
`imagebaker`
|
70
78
|
|
71
|
-
|
79
|
+
By default, the above command will not run any models on the backend. So please take a look into the example of model definition at [examples/loaded_models.py](examples/loaded_models.py). Then we need to pass it as:
|
72
80
|
|
73
|
-
|
74
|
-
python examples/app.py
|
75
|
-
```
|
81
|
+
`imagebaker --models-file examples/loaded_models.py`
|
76
82
|
|
77
|
-
|
83
|
+
For more options, please do: `imagebaker --help` It should give the following options.
|
84
|
+
|
85
|
+

|
86
|
+
|
87
|
+
|
88
|
+
* **`--configs-file`** allows us to define custom configs. The custom configs have to inherit LayerConfig and CanvasConfig defined at [imagebaker/core/configs/configs.py](imagebaker/core/configs/configs.py). An example is available at [examples](examples/).
|
78
89
|
|
90
|
+
After cloning and going to the project directory, the following code should work.
|
91
|
+
`imagebaker --models-file examples/loaded_models.py --configs-file examples/example_config.py`
|
92
|
+
|
93
|
+
## Features
|
79
94
|
- **Annotating Images**: Load a folder of images and annotate them using bounding boxes or polygons.
|
80
95
|
- **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
96
|
- **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
|
97
|
+
- **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
98
|
- **Playing States**: Replay saved states, export them locally, or use them for further predictions.
|
84
99
|
- **Exporting States**: Export the final annotated JSON and the baked multilayer image.
|
85
100
|
|
@@ -89,29 +104,50 @@ python examples/app.py
|
|
89
104
|
* **Delete**: Delete selected annotation/layer.
|
90
105
|
* **Left Click**: Select an annotation/layer on mouse position.
|
91
106
|
* **Left Click + Drag**: Drag a selected annotation/layer.
|
92
|
-
* **Double Left Click**: When using
|
93
|
-
* **Right Click**: Deselect an annotation/layer. While
|
94
|
-
* **Ctrl + Mouse Wheel**: Zoom In/Out on the mouse position i.e
|
107
|
+
* **Double Left Click**: When using polygon annotation, completes the polygon.
|
108
|
+
* **Right Click**: Deselect an annotation/layer. While annotating the polygon, undo the last point.
|
109
|
+
* **Ctrl + Mouse Wheel**: Zoom In/Out on the mouse position, i.e., resize the viewport.
|
95
110
|
* **Ctrl + Drag**: If done on the background, the viewport is panned.
|
96
111
|
* **Ctrl + S**: Save State on Baker Tab.
|
97
112
|
* **Ctrl + D**: Draw Mode on Baker Tab. Drawing can happen on a selected or main layer.
|
98
113
|
* **Ctrl + E**: Erase Mode on Baker Tab.
|
99
|
-
* **Wheel**: Change size of the drawing pointer.
|
100
|
-
|
114
|
+
* **Wheel**: Change the size of the drawing pointer.
|
101
115
|
|
102
116
|
## Demo
|
117
|
+
### Annotation Page
|
118
|
+
This is where the loading of the image folder and annotation, connection with the model running in the backend, and layerifying happen.
|
103
119
|
|
104
|
-
|
120
|
+

|
121
|
+
|
122
|
+
### Baker Page
|
123
|
+
This is where the layer baking happens. And the extraction of the layers as well.
|
124
|
+
|
125
|
+

|
126
|
+
|
127
|
+
An example of drawing:
|
128
|
+
|
129
|
+

|
130
|
+
|
131
|
+
### Annotated
|
132
|
+
|
133
|
+
The JSON and the baked image will be exported to the local folder, and in debug mode, the annotations and the mask for each layer will be exported too.
|
134
|
+
|
135
|
+

|
136
|
+
|
137
|
+
### Demo Video
|
105
138
|
|
106
139
|
To see the tool in action, check out the demo video below:
|
107
140
|
|
141
|
+
|
108
142
|
[](https://youtu.be/WckMT0r-2Lc)
|
109
143
|
|
144
|
+
|
110
145
|
Click on the image above to play the video on YouTube.
|
111
146
|
|
112
147
|
|
113
148
|
## Contributions
|
114
149
|
|
150
|
+
|
115
151
|
Contributions are welcome!
|
116
152
|
|
117
|
-
Do you find this project to be useful and looking for some features that
|
153
|
+
Do you find this project to be useful and are you looking for some features that are 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.41.dist-info/licenses/LICENSE,sha256=1vkysFPOnT7y4LsoFTv9YsopIrQvBc2l6vUOfv4KKLc,1082
|
3
|
+
imagebaker-0.0.41.dist-info/METADATA,sha256=lJ-4W657mS5XgQ0mKDISr3tdVzTVYSTcTnda-sAPLbs,6761
|
4
|
+
imagebaker-0.0.41.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
5
|
+
imagebaker-0.0.41.dist-info/entry_points.txt,sha256=IDjZHJCiiHpH5IUTByT2en0nMbnnnlrJZ5FPFehUvQM,61
|
6
|
+
imagebaker-0.0.41.dist-info/top_level.txt,sha256=Gg-eILTlqJXwVQr0saSwsx3-H4SPdZ2agBZaufe194s,11
|
7
|
+
imagebaker-0.0.41.dist-info/RECORD,,
|
@@ -1,7 +0,0 @@
|
|
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,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|