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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: imagebaker
3
- Version: 0.0.4
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
+ ![Dependabot Status](https://img.shields.io/badge/dependabot-active-brightgreen)
33
+ ![GitHub License](https://img.shields.io/github/license/q-viper/image-baker)
34
+ ![commit activity](https://img.shields.io/github/commit-activity/w/q-viper/SmokeSim/master)
35
+ ![code size in bytes](https://img.shields.io/github/languages/code-size/q-viper/image-baker)
36
+ <!-- ![Tests](https://github.com/q-viper/SmokeSim/actions/workflows/test-on-push.yml/badge.svg) -->
37
+ ![Code Formatting](https://github.com/q-viper/image-baker/actions/workflows/black-formatter.yml/badge.svg)
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 in PyPI server.
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
- ```bash
68
- imagebaker
69
- ```
77
+ `imagebaker`
70
78
 
71
- If the command does not work, try running the example script after cloning the project.:
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
- ```bash
74
- python examples/app.py
75
- ```
81
+ `imagebaker --models-file examples/loaded_models.py`
76
82
 
77
- ## Features
83
+ For more options, please do: `imagebaker --help` It should give the following options.
84
+
85
+ ![](assets/demo/options.png)
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 **Save State** button or **Ctrl + S**.
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 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.
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
- ## Demo
120
+ ![](assets/demo/annotation_page.png)
121
+
122
+ ### Baker Page
123
+ This is where the layer baking happens. And the extraction of the layers as well.
124
+
125
+ ![](assets/demo/baker_page.png)
126
+
127
+ An example of drawing:
128
+
129
+ ![](assets/demo/drawing.png)
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
+ ![](assets/demo/annotated_veg_smiley.png)
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
  [![Demo Video](https://img.youtube.com/vi/WckMT0r-2Lc/0.jpg)](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 is not implemented yet? Feel free to open issues or submit pull requests to improve the project.
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,,