digitalsreeni-image-annotator 0.1.3__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.
- digitalsreeni-image-annotator-0.1.3/LICENSE +41 -0
- digitalsreeni-image-annotator-0.1.3/PKG-INFO +135 -0
- digitalsreeni-image-annotator-0.1.3/README.md +117 -0
- digitalsreeni-image-annotator-0.1.3/setup.cfg +4 -0
- digitalsreeni-image-annotator-0.1.3/setup.py +40 -0
- digitalsreeni-image-annotator-0.1.3/src/digitalsreeni_image_annotator/__init__.py +21 -0
- digitalsreeni-image-annotator-0.1.3/src/digitalsreeni_image_annotator/annotator_window.py +777 -0
- digitalsreeni-image-annotator-0.1.3/src/digitalsreeni_image_annotator/constants.py +25 -0
- digitalsreeni-image-annotator-0.1.3/src/digitalsreeni_image_annotator/help_window.py +132 -0
- digitalsreeni-image-annotator-0.1.3/src/digitalsreeni_image_annotator/image_label.py +431 -0
- digitalsreeni-image-annotator-0.1.3/src/digitalsreeni_image_annotator/main.py +24 -0
- digitalsreeni-image-annotator-0.1.3/src/digitalsreeni_image_annotator/utils.py +47 -0
- digitalsreeni-image-annotator-0.1.3/src/digitalsreeni_image_annotator.egg-info/PKG-INFO +135 -0
- digitalsreeni-image-annotator-0.1.3/src/digitalsreeni_image_annotator.egg-info/SOURCES.txt +19 -0
- digitalsreeni-image-annotator-0.1.3/src/digitalsreeni_image_annotator.egg-info/dependency_links.txt +1 -0
- digitalsreeni-image-annotator-0.1.3/src/digitalsreeni_image_annotator.egg-info/entry_points.txt +2 -0
- digitalsreeni-image-annotator-0.1.3/src/digitalsreeni_image_annotator.egg-info/requires.txt +1 -0
- digitalsreeni-image-annotator-0.1.3/src/digitalsreeni_image_annotator.egg-info/top_level.txt +1 -0
- digitalsreeni-image-annotator-0.1.3/tests/test_annotator_window.py +28 -0
- digitalsreeni-image-annotator-0.1.3/tests/test_image_label.py +30 -0
- digitalsreeni-image-annotator-0.1.3/tests/test_utils.py +23 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Dr. Sreenivas Bhattiprolu
|
|
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.
|
|
22
|
+
|
|
23
|
+
--------------------------------------------------------------------------------
|
|
24
|
+
|
|
25
|
+
CITATION REQUEST:
|
|
26
|
+
|
|
27
|
+
If you use this software in your research, please cite it as follows:
|
|
28
|
+
|
|
29
|
+
Bhattiprolu, S. (2024). Image Annotator [Computer software].
|
|
30
|
+
https://github.com/bnsreenu/digitalsreeni-image-annotator
|
|
31
|
+
|
|
32
|
+
BibTeX:
|
|
33
|
+
@software{image_annotator,
|
|
34
|
+
author = {Bhattiprolu, Sreenivas},
|
|
35
|
+
title = {Image Annotator},
|
|
36
|
+
year = {2024},
|
|
37
|
+
url = {https://github.com/bnsreenu/digitalsreeni-image-annotator}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
While not required by the license, citation is appreciated and helps support the
|
|
41
|
+
continued development and maintenance of this software.
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: digitalsreeni-image-annotator
|
|
3
|
+
Version: 0.1.3
|
|
4
|
+
Summary: A tool for annotating images with polygons and rectangles
|
|
5
|
+
Home-page: https://github.com/bnsreenu/digitalsreeni-image-annotator
|
|
6
|
+
Author: Dr. Sreenivas Bhattiprolu
|
|
7
|
+
Author-email: digitalsreeni@gmail.com
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Intended Audience :: Science/Research
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
+
Requires-Python: >=3.9
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Requires-Dist: PyQt5>=5.15.7
|
|
18
|
+
|
|
19
|
+
# DigitalSreeni Image Annotator
|
|
20
|
+
|
|
21
|
+

|
|
22
|
+

|
|
23
|
+

|
|
24
|
+
|
|
25
|
+
A powerful and user-friendly tool for annotating images with polygons and rectangles, built with PyQt5.
|
|
26
|
+
|
|
27
|
+
@DigitalSreeni
|
|
28
|
+
Dr. Sreenivas Bhattiprolu
|
|
29
|
+
|
|
30
|
+
## Features
|
|
31
|
+
|
|
32
|
+
- Load and annotate images with polygons and rectangles
|
|
33
|
+
- Save annotations in COCO-compatible JSON format
|
|
34
|
+
- Edit existing annotations
|
|
35
|
+
- Zoom and pan functionality for detailed annotations
|
|
36
|
+
- Support for multiple classes with customizable colors
|
|
37
|
+
- Import and export annotations
|
|
38
|
+
- User-friendly interface with intuitive controls
|
|
39
|
+
|
|
40
|
+
## Installation
|
|
41
|
+
|
|
42
|
+
You can install the DigitalSreeni Image Annotator directly from PyPI:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pip install digitalsreeni-image-annotator
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Usage
|
|
49
|
+
|
|
50
|
+
1. Run the DigitalSreeni Image Annotator application:
|
|
51
|
+
```bash
|
|
52
|
+
digitalsreeni-image-annotator
|
|
53
|
+
```
|
|
54
|
+
or
|
|
55
|
+
```bash
|
|
56
|
+
python -m digitalsreeni_image_annotator.main
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
2. Using the application:
|
|
60
|
+
- Click "Open New Image Set" to load a new set of images from your computer.
|
|
61
|
+
- Use "Add More Images" to append images to the current set.
|
|
62
|
+
- Add classes using the "Add Class" button.
|
|
63
|
+
- Select a class and use the Polygon or Rectangle tool to create annotations.
|
|
64
|
+
- Edit existing annotations by double-clicking on them.
|
|
65
|
+
- Save your annotations using the "Save Annotations" button.
|
|
66
|
+
- Use "Import Saved Annotations" to load previously created annotations.
|
|
67
|
+
- Access the help documentation by clicking the "Help" button.
|
|
68
|
+
|
|
69
|
+
3. Keyboard shortcuts:
|
|
70
|
+
- Use the mouse wheel or trackpad to zoom in/out
|
|
71
|
+
- Hold Ctrl and drag to pan the image
|
|
72
|
+
- Press 'Esc' to cancel the current annotation
|
|
73
|
+
- Press 'Enter' to finish the current polygon annotation
|
|
74
|
+
|
|
75
|
+
## Development
|
|
76
|
+
|
|
77
|
+
For development purposes, you can clone the repository and install it in editable mode:
|
|
78
|
+
|
|
79
|
+
1. Clone the repository:
|
|
80
|
+
```bash
|
|
81
|
+
git clone https://github.com/bnsreenu/digitalsreeni-image-annotator.git
|
|
82
|
+
cd digitalsreeni-image-annotator
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
2. Create a virtual environment (optional but recommended):
|
|
86
|
+
```bash
|
|
87
|
+
python -m venv venv
|
|
88
|
+
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
3. Install the package and its dependencies in editable mode:
|
|
92
|
+
```bash
|
|
93
|
+
pip install -e .
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Contributing
|
|
97
|
+
|
|
98
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
99
|
+
|
|
100
|
+
1. Fork the repository
|
|
101
|
+
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
|
|
102
|
+
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
|
|
103
|
+
4. Push to the branch (`git push origin feature/AmazingFeature`)
|
|
104
|
+
5. Open a Pull Request
|
|
105
|
+
|
|
106
|
+
## License
|
|
107
|
+
|
|
108
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
109
|
+
|
|
110
|
+
## Acknowledgments
|
|
111
|
+
|
|
112
|
+
- Thanks to all contributors who have helped shape this project
|
|
113
|
+
- Inspired by the need for efficient image annotation in computer vision tasks
|
|
114
|
+
|
|
115
|
+
## Contact
|
|
116
|
+
|
|
117
|
+
Dr. Sreenivas Bhattiprolu - [@DigitalSreeni](https://twitter.com/DigitalSreeni)
|
|
118
|
+
|
|
119
|
+
Project Link: [https://github.com/bnsreenu/digitalsreeni-image-annotator](https://github.com/bnsreenu/digitalsreeni-image-annotator)
|
|
120
|
+
|
|
121
|
+
## Citing
|
|
122
|
+
|
|
123
|
+
If you use this software in your research, please cite it as follows:
|
|
124
|
+
|
|
125
|
+
Bhattiprolu, S. (2024). DigitalSreeni Image Annotator [Computer software].
|
|
126
|
+
https://github.com/bnsreenu/digitalsreeni-image-annotator
|
|
127
|
+
|
|
128
|
+
```bibtex
|
|
129
|
+
@software{digitalsreeni_image_annotator,
|
|
130
|
+
author = {Bhattiprolu, Sreenivas},
|
|
131
|
+
title = {DigitalSreeni Image Annotator},
|
|
132
|
+
year = {2024},
|
|
133
|
+
url = {https://github.com/bnsreenu/digitalsreeni-image-annotator}
|
|
134
|
+
}
|
|
135
|
+
```
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# DigitalSreeni Image Annotator
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
A powerful and user-friendly tool for annotating images with polygons and rectangles, built with PyQt5.
|
|
8
|
+
|
|
9
|
+
@DigitalSreeni
|
|
10
|
+
Dr. Sreenivas Bhattiprolu
|
|
11
|
+
|
|
12
|
+
## Features
|
|
13
|
+
|
|
14
|
+
- Load and annotate images with polygons and rectangles
|
|
15
|
+
- Save annotations in COCO-compatible JSON format
|
|
16
|
+
- Edit existing annotations
|
|
17
|
+
- Zoom and pan functionality for detailed annotations
|
|
18
|
+
- Support for multiple classes with customizable colors
|
|
19
|
+
- Import and export annotations
|
|
20
|
+
- User-friendly interface with intuitive controls
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
You can install the DigitalSreeni Image Annotator directly from PyPI:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install digitalsreeni-image-annotator
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
1. Run the DigitalSreeni Image Annotator application:
|
|
33
|
+
```bash
|
|
34
|
+
digitalsreeni-image-annotator
|
|
35
|
+
```
|
|
36
|
+
or
|
|
37
|
+
```bash
|
|
38
|
+
python -m digitalsreeni_image_annotator.main
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
2. Using the application:
|
|
42
|
+
- Click "Open New Image Set" to load a new set of images from your computer.
|
|
43
|
+
- Use "Add More Images" to append images to the current set.
|
|
44
|
+
- Add classes using the "Add Class" button.
|
|
45
|
+
- Select a class and use the Polygon or Rectangle tool to create annotations.
|
|
46
|
+
- Edit existing annotations by double-clicking on them.
|
|
47
|
+
- Save your annotations using the "Save Annotations" button.
|
|
48
|
+
- Use "Import Saved Annotations" to load previously created annotations.
|
|
49
|
+
- Access the help documentation by clicking the "Help" button.
|
|
50
|
+
|
|
51
|
+
3. Keyboard shortcuts:
|
|
52
|
+
- Use the mouse wheel or trackpad to zoom in/out
|
|
53
|
+
- Hold Ctrl and drag to pan the image
|
|
54
|
+
- Press 'Esc' to cancel the current annotation
|
|
55
|
+
- Press 'Enter' to finish the current polygon annotation
|
|
56
|
+
|
|
57
|
+
## Development
|
|
58
|
+
|
|
59
|
+
For development purposes, you can clone the repository and install it in editable mode:
|
|
60
|
+
|
|
61
|
+
1. Clone the repository:
|
|
62
|
+
```bash
|
|
63
|
+
git clone https://github.com/bnsreenu/digitalsreeni-image-annotator.git
|
|
64
|
+
cd digitalsreeni-image-annotator
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
2. Create a virtual environment (optional but recommended):
|
|
68
|
+
```bash
|
|
69
|
+
python -m venv venv
|
|
70
|
+
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
3. Install the package and its dependencies in editable mode:
|
|
74
|
+
```bash
|
|
75
|
+
pip install -e .
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Contributing
|
|
79
|
+
|
|
80
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
81
|
+
|
|
82
|
+
1. Fork the repository
|
|
83
|
+
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
|
|
84
|
+
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
|
|
85
|
+
4. Push to the branch (`git push origin feature/AmazingFeature`)
|
|
86
|
+
5. Open a Pull Request
|
|
87
|
+
|
|
88
|
+
## License
|
|
89
|
+
|
|
90
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
91
|
+
|
|
92
|
+
## Acknowledgments
|
|
93
|
+
|
|
94
|
+
- Thanks to all contributors who have helped shape this project
|
|
95
|
+
- Inspired by the need for efficient image annotation in computer vision tasks
|
|
96
|
+
|
|
97
|
+
## Contact
|
|
98
|
+
|
|
99
|
+
Dr. Sreenivas Bhattiprolu - [@DigitalSreeni](https://twitter.com/DigitalSreeni)
|
|
100
|
+
|
|
101
|
+
Project Link: [https://github.com/bnsreenu/digitalsreeni-image-annotator](https://github.com/bnsreenu/digitalsreeni-image-annotator)
|
|
102
|
+
|
|
103
|
+
## Citing
|
|
104
|
+
|
|
105
|
+
If you use this software in your research, please cite it as follows:
|
|
106
|
+
|
|
107
|
+
Bhattiprolu, S. (2024). DigitalSreeni Image Annotator [Computer software].
|
|
108
|
+
https://github.com/bnsreenu/digitalsreeni-image-annotator
|
|
109
|
+
|
|
110
|
+
```bibtex
|
|
111
|
+
@software{digitalsreeni_image_annotator,
|
|
112
|
+
author = {Bhattiprolu, Sreenivas},
|
|
113
|
+
title = {DigitalSreeni Image Annotator},
|
|
114
|
+
year = {2024},
|
|
115
|
+
url = {https://github.com/bnsreenu/digitalsreeni-image-annotator}
|
|
116
|
+
}
|
|
117
|
+
```
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Setup file for the DigitalSreeni Image Annotator package.
|
|
3
|
+
|
|
4
|
+
@DigitalSreeni
|
|
5
|
+
Dr. Sreenivas Bhattiprolu
|
|
6
|
+
"""
|
|
7
|
+
from setuptools import setup, find_packages
|
|
8
|
+
|
|
9
|
+
with open("README.md", "r", encoding="utf-8") as fh:
|
|
10
|
+
long_description = fh.read()
|
|
11
|
+
|
|
12
|
+
setup(
|
|
13
|
+
name="digitalsreeni-image-annotator",
|
|
14
|
+
version="0.1.3", # version number
|
|
15
|
+
author="Dr. Sreenivas Bhattiprolu",
|
|
16
|
+
author_email="digitalsreeni@gmail.com",
|
|
17
|
+
description="A tool for annotating images with polygons and rectangles",
|
|
18
|
+
long_description=long_description,
|
|
19
|
+
long_description_content_type="text/markdown",
|
|
20
|
+
url="https://github.com/bnsreenu/digitalsreeni-image-annotator",
|
|
21
|
+
packages=find_packages(where="src"),
|
|
22
|
+
package_dir={"": "src"},
|
|
23
|
+
classifiers=[
|
|
24
|
+
"Development Status :: 3 - Alpha",
|
|
25
|
+
"Intended Audience :: Science/Research",
|
|
26
|
+
"Intended Audience :: Developers",
|
|
27
|
+
"License :: OSI Approved :: MIT License",
|
|
28
|
+
"Operating System :: OS Independent",
|
|
29
|
+
"Programming Language :: Python :: 3.9",
|
|
30
|
+
],
|
|
31
|
+
python_requires=">=3.9",
|
|
32
|
+
install_requires=[
|
|
33
|
+
"PyQt5>=5.15.7",
|
|
34
|
+
],
|
|
35
|
+
entry_points={
|
|
36
|
+
"console_scripts": [
|
|
37
|
+
"digitalsreeni-image-annotator=digitalsreeni_image_annotator.main:main",
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Image Annotator
|
|
3
|
+
===============
|
|
4
|
+
|
|
5
|
+
A tool for annotating images with polygons and rectangles.
|
|
6
|
+
|
|
7
|
+
This package provides a GUI application for image annotation,
|
|
8
|
+
supporting polygon and rectangle annotations in a COCO-compatible format.
|
|
9
|
+
|
|
10
|
+
@DigitalSreeni
|
|
11
|
+
Dr. Sreenivas Bhattiprolu
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
__version__ = "0.1.0"
|
|
15
|
+
__author__ = "Dr. Sreenivas Bhattiprolu"
|
|
16
|
+
|
|
17
|
+
from .annotator_window import ImageAnnotator
|
|
18
|
+
from .image_label import ImageLabel
|
|
19
|
+
from .utils import calculate_area, calculate_bbox
|
|
20
|
+
|
|
21
|
+
__all__ = ['ImageAnnotator', 'ImageLabel', 'calculate_area', 'calculate_bbox']
|