ImagePRO-Python 1.2.2__py3-none-any.whl → 1.3.1__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.
Files changed (29) hide show
  1. ImagePRO/__init__.py +2 -2
  2. ImagePRO/human_analysis/body_analysis/__init__.py +4 -0
  3. ImagePRO/human_analysis/body_analysis/body_pose_estimation.py +26 -5
  4. ImagePRO/human_analysis/body_analysis/hand_tracking.py +28 -6
  5. ImagePRO/human_analysis/face_analysis/__init__.py +5 -1
  6. ImagePRO/human_analysis/face_analysis/eye_status_analysis.py +22 -4
  7. ImagePRO/human_analysis/face_analysis/face_comparison.py +15 -3
  8. ImagePRO/human_analysis/face_analysis/face_detection.py +5 -2
  9. ImagePRO/human_analysis/face_analysis/face_mesh_analysis.py +36 -18
  10. ImagePRO/human_analysis/face_analysis/head_pose_estimation.py +14 -4
  11. ImagePRO/object_analysis/__init__.py +3 -0
  12. ImagePRO/object_analysis/object_detection.py +24 -13
  13. ImagePRO/pre_processing/__init__.py +4 -1
  14. ImagePRO/pre_processing/blur.py +10 -10
  15. ImagePRO/pre_processing/contrast.py +4 -7
  16. ImagePRO/pre_processing/crop.py +4 -5
  17. ImagePRO/pre_processing/dataset_generator.py +16 -10
  18. ImagePRO/pre_processing/histogram.py +36 -48
  19. ImagePRO/pre_processing/resize.py +2 -2
  20. ImagePRO/pre_processing/rotate.py +6 -7
  21. ImagePRO/pre_processing/sharpen.py +16 -13
  22. ImagePRO/utils/image.py +7 -6
  23. ImagePRO/utils/result.py +10 -7
  24. {imagepro_python-1.2.2.dist-info → imagepro_python-1.3.1.dist-info}/METADATA +46 -18
  25. imagepro_python-1.3.1.dist-info/RECORD +31 -0
  26. {imagepro_python-1.2.2.dist-info → imagepro_python-1.3.1.dist-info}/WHEEL +1 -1
  27. imagepro_python-1.2.2.dist-info/RECORD +0 -31
  28. {imagepro_python-1.2.2.dist-info → imagepro_python-1.3.1.dist-info}/licenses/LICENSE +0 -0
  29. {imagepro_python-1.2.2.dist-info → imagepro_python-1.3.1.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ImagePRO-Python
3
- Version: 1.2.2
3
+ Version: 1.3.1
4
4
  Summary: Professional & modular image processing library with OpenCV, MediaPipe, and YOLO integration.
5
5
  Author-email: Parsa Safaie <parsasafaie.2568@proton.me>
6
6
  License: MIT
@@ -32,14 +32,19 @@ Provides-Extra: yolo
32
32
  Requires-Dist: ultralytics<9.0,>=8.2; extra == "yolo"
33
33
  Provides-Extra: mediapipe
34
34
  Requires-Dist: mediapipe<=0.10.11,>=0.10.0; extra == "mediapipe"
35
+ Requires-Dist: numpy<2.0,>=1.24; extra == "mediapipe"
35
36
  Provides-Extra: insightface
36
37
  Requires-Dist: insightface<0.8,>=0.7; extra == "insightface"
37
38
  Requires-Dist: onnxruntime<2.0,>=1.16; extra == "insightface"
39
+ Requires-Dist: numpy<2.0,>=1.24; extra == "insightface"
38
40
  Provides-Extra: full
39
41
  Requires-Dist: mediapipe<=0.10.11,>=0.10.0; extra == "full"
40
42
  Requires-Dist: ultralytics<9.0,>=8.2; extra == "full"
41
43
  Requires-Dist: insightface<0.8,>=0.7; extra == "full"
42
44
  Requires-Dist: onnxruntime<2.0,>=1.16; extra == "full"
45
+ Requires-Dist: numpy<2.0,>=1.24; extra == "full"
46
+ Provides-Extra: dev
47
+ Requires-Dist: pytest<9.0,>=8.0; extra == "dev"
43
48
  Dynamic: license-file
44
49
 
45
50
  # ImagePRO
@@ -50,11 +55,10 @@ Dynamic: license-file
50
55
 
51
56
  Whether you're working on computer vision pipelines, preprocessing images for AI models, or simply automating batch image edits — **ImagePRO** gives you powerful tools with minimal effort.
52
57
 
53
- ## ✨ Features
58
+ ## Features
54
59
 
55
60
  ### **Image I/O & Management**
56
61
  - Flexible input/output handling (file paths or numpy arrays)
57
- - Batch processing capabilities
58
62
  - Multiple format support (JPEG, PNG, CSV, etc.)
59
63
 
60
64
  ### **Pre-processing & Enhancement**
@@ -71,15 +75,23 @@ Whether you're working on computer vision pipelines, preprocessing images for AI
71
75
  ### **Object Detection**
72
76
  - **YOLO Integration**: Multiple accuracy levels (nano to extra-large)
73
77
  - **Flexible Models**: Pre-trained or custom model support
74
- - **Batch Processing**: Efficient handling of multiple images
75
78
 
76
- ## 🚀 Installation
79
+ ## Installation
77
80
 
78
81
  ### From PyPI
79
82
  ```bash
80
83
  pip install ImagePRO-Python
84
+
85
+ # Or with optional extras:
86
+ pip install "ImagePRO-Python[yolo]" # YOLO object detection
87
+ pip install "ImagePRO-Python[mediapipe]" # MediaPipe human analysis
88
+ pip install "ImagePRO-Python[insightface]" # InsightFace face comparison
89
+ pip install "ImagePRO-Python[full]" # Everything
90
+ pip install "ImagePRO-Python[dev]" # Test tooling (pytest)
81
91
  ```
82
92
 
93
+ > **Note**: The base install is lightweight — AI backends (MediaPipe, Ultralytics, InsightFace) are optional and imported lazily, only when you call a function that actually needs them. `import ImagePRO` never loads these dependencies. If a backend is missing, the function you call raises an `ImportError` telling you exactly which extra to install.
94
+
83
95
  ### From Source
84
96
  ```bash
85
97
  git clone https://github.com/parsasafaie/ImagePRO.git
@@ -109,7 +121,7 @@ pip install -r requirements/full.txt
109
121
 
110
122
  See the [Directory Structure](/PROJECT_STRUCTURE.md#directory-structure) section in [PROJECT_STRUCTURE.md](/PROJECT_STRUCTURE.md) for details on which modules need which requirements.
111
123
 
112
- ## 📖 Quick Start
124
+ ## Quick Start
113
125
 
114
126
  ```python
115
127
  from ImagePRO.pre_processing.blur import apply_average_blur
@@ -126,9 +138,9 @@ image = Image.from_path("person_and_objects.jpg")
126
138
  blur_result = apply_average_blur(image=image)
127
139
  blur_result.save_as_img("blurred_output.jpg")
128
140
 
129
- # Analyze face mesh (468 landmarks)
141
+ # Analyze face mesh (468 landmarks per detected face)
130
142
  face_mesh_result = analyze_face_mesh(image=image)
131
- print(f"Detected {len(face_mesh_result.data)} face landmarks")
143
+ print(f"Detected {len(face_mesh_result.data)} face(s)")
132
144
  face_mesh_result.save_as_csv("face_landmarks.csv")
133
145
 
134
146
  # Detect body pose (33 landmarks)
@@ -138,8 +150,7 @@ print(f"Body pose data: {body_pose_result.data}")
138
150
  # Detect objects with YOLO
139
151
  object_detection_result = detect_objects(
140
152
  image=image,
141
- accuracy_level=3, # 1=nano, 2=small, 3=medium, 4=large, 5=extra-large
142
- confidence=0.5
153
+ accuracy_level=3 # 1=nano, 2=small, 3=medium, 4=large, 5=extra-large
143
154
  )
144
155
  print(f"Detected {len(object_detection_result.data)} objects")
145
156
  object_detection_result.save_as_img("detections.jpg")
@@ -147,7 +158,7 @@ object_detection_result.save_as_img("detections.jpg")
147
158
 
148
159
  > **Note**: These are basic examples. Each module contains many more functions with extensive customization options. Explore the module-specific README files for detailed documentation.
149
160
 
150
- ## 📚 Documentation
161
+ ## Documentation
151
162
 
152
163
  Each module includes comprehensive documentation with detailed examples:
153
164
 
@@ -160,24 +171,40 @@ Each module includes comprehensive documentation with detailed examples:
160
171
 
161
172
  For detailed project structure and development guidelines, see [PROJECT_STRUCTURE.md](PROJECT_STRUCTURE.md).
162
173
 
163
- ## 🏗️ Architecture
174
+ ## Architecture
164
175
 
165
176
  ImagePRO is built with a modular architecture designed for extensibility and maintainability:
166
177
 
167
178
  - **Clean Separation of Concerns**: Each module handles a specific domain
168
179
  - **Consistent API Patterns**: All functions follow the same input/output conventions
169
180
  - **Shared Utilities**: Common `Image` and `Result` classes for unified I/O
181
+ - **Lazy Optional Imports**: Heavy AI dependencies (MediaPipe, Ultralytics, InsightFace) are only imported inside the functions that use them, keeping `import ImagePRO` fast and independent of installed extras
170
182
  - **Professional Error Handling**: Comprehensive validation with clear error messages
171
183
  - **Type Safety**: Full type hints throughout the codebase
172
184
  - **Documentation**: Google-style docstrings for all functions
173
185
 
174
186
  ### Key Design Principles
175
- - **Immutable Design**: Image objects are immutable, operations return new instances
187
+ - **Non-Destructive Operations**: Operations never write into the input image; they return results in new `Result` objects (note: `crop_image` returns a view into the source array)
176
188
  - **Functional Style**: Stateless functions that can be easily composed
177
189
  - **Result Objects**: Unified return type containing image, data, and metadata
178
190
  - **Keyword Arguments**: All optional parameters use keyword-only syntax
179
191
 
180
- ## 🤝 Contributing
192
+ ## Testing
193
+
194
+ The test suite uses pytest:
195
+
196
+ ```bash
197
+ # Install with test tooling (editable install + dev extra)
198
+ pip install -e ".[dev]"
199
+
200
+ # Run the suite (optional heavy dependencies are mocked; base deps are enough)
201
+ pytest
202
+
203
+ # Include performance smoke guards
204
+ pytest --run-performance
205
+ ```
206
+
207
+ ## Contributing
181
208
 
182
209
  Contributions are welcome! Please feel free to submit a Pull Request.
183
210
 
@@ -185,9 +212,10 @@ Contributions are welcome! Please feel free to submit a Pull Request.
185
212
  1. Fork the repository
186
213
  2. Create a virtual environment: `python -m venv .venv`
187
214
  3. Install dependencies: `pip install -r requirements/full.txt`
188
- 4. Follow the coding standards outlined in [PROJECT_STRUCTURE.md](PROJECT_STRUCTURE.md)
189
- 5. Add tests for new features
190
- 6. Update documentation as needed
215
+ 4. Install for development with test tooling: `pip install -e ".[dev]"`
216
+ 5. Follow the coding standards outlined in [PROJECT_STRUCTURE.md](PROJECT_STRUCTURE.md)
217
+ 6. Add tests for new features and run `pytest`
218
+ 7. Update documentation as needed
191
219
 
192
220
  ### Reporting Issues
193
221
  If you encounter any bugs or have feature requests, please open an issue on the GitHub repository with:
@@ -196,5 +224,5 @@ If you encounter any bugs or have feature requests, please open an issue on the
196
224
  - Expected vs. actual behavior
197
225
  - Environment details (OS, Python version, etc.)
198
226
 
199
- ## 📄 License
227
+ ## License
200
228
  This project is licensed under the MIT License – see the [LICENSE](LICENSE) file for details.
@@ -0,0 +1,31 @@
1
+ ImagePRO/__init__.py,sha256=pLFmqiQTtz76qzrm8r1jES8RHxXWZlnn9vILHBAKVVY,997
2
+ ImagePRO/human_analysis/__init__.py,sha256=uSU0lM1p1HM6TNGv6u0nPHWy9QY505v43lqTkhClddM,190
3
+ ImagePRO/human_analysis/body_analysis/__init__.py,sha256=uUWG5eOxLQjZoYddmNkRlF66l6vSVyJpUFz1wDddXkk,374
4
+ ImagePRO/human_analysis/body_analysis/body_pose_estimation.py,sha256=yqEV18ZEZwV__Oqt1Hi72EGmbTNes-mrY068SBT9RbU,6245
5
+ ImagePRO/human_analysis/body_analysis/hand_tracking.py,sha256=SpdIZNgvaHzINpWu7rgNawSHvuuawzFtQ7JiHHQ0fqA,7578
6
+ ImagePRO/human_analysis/face_analysis/__init__.py,sha256=297IQuoO2Wb_PyigS_2NOuVnM7FpNPceu5jhJp6YdG0,604
7
+ ImagePRO/human_analysis/face_analysis/eye_status_analysis.py,sha256=Q_EUNPpXoF7Vi-Kd0gURNxs9X3U5J4Yi3coL_6lkeb8,7773
8
+ ImagePRO/human_analysis/face_analysis/face_comparison.py,sha256=lIr490PAf8R6C_Zhv-zBN1Un1EPiwxi4W7ahgkqXAVc,4724
9
+ ImagePRO/human_analysis/face_analysis/face_detection.py,sha256=F3Bq_0rAcQklmNAu-JvxGBIxUnWmyM-SHuZawHXJeac,4009
10
+ ImagePRO/human_analysis/face_analysis/face_mesh_analysis.py,sha256=rv08Mx_IBB-hjTh09bFaaPjaOm0tFbBs0brc4mE66mg,8723
11
+ ImagePRO/human_analysis/face_analysis/head_pose_estimation.py,sha256=2_ZVpwavyIzCIH4x3d2bvCPvv-X5gpmSYxtk5jlgCYw,7688
12
+ ImagePRO/object_analysis/__init__.py,sha256=eVQpYlHO89RYKT0CHjPfJjjif5X_Jx3AtAUpR5m0Yms,292
13
+ ImagePRO/object_analysis/object_detection.py,sha256=1qPd3Xfo2Vi4JnBs5wD8-k3WR6ZkYNdT9tco2Ze1ICQ,3385
14
+ ImagePRO/pre_processing/__init__.py,sha256=pw6-J5sdbkdBG4RlTxOzQKaspGnlPIGo3m_NXH2bVCE,559
15
+ ImagePRO/pre_processing/blur.py,sha256=3zNTNpvLZPdrtRtBziB6X8ys8M7cIvyPDhojTqR63jo,7950
16
+ ImagePRO/pre_processing/contrast.py,sha256=4UT78ggW1rh_iaEI8FObDB4kpEmRRFWjdJES60SnHDM,5064
17
+ ImagePRO/pre_processing/crop.py,sha256=3Nwerzo57kx1sZPr9m355P-qf1NuZSZEA5iUn2Q1704,2406
18
+ ImagePRO/pre_processing/dataset_generator.py,sha256=i7UM4o8hznFUfUgbYI6H01EkQJOqt4IsI9IrjzzN8gQ,7921
19
+ ImagePRO/pre_processing/grayscale.py,sha256=MRCsFRIaL45sYVHzhuNyZBXsP7PF-yorn0Wt7xONvpY,1781
20
+ ImagePRO/pre_processing/histogram.py,sha256=sNTWWZXr5VLpOrF_PTTJ6TD8yv1zR1l9cMyXHe7JFIM,2596
21
+ ImagePRO/pre_processing/resize.py,sha256=Rnde8l_PXck5OWQBEMOHgLeW2YkTz9Xfr6fGmz0sdm8,1760
22
+ ImagePRO/pre_processing/rotate.py,sha256=wQj3nQpN-ilM0HHwovN--UdGEJkPCY0BJ0zAdyBxv-o,4174
23
+ ImagePRO/pre_processing/sharpen.py,sha256=hOkY7QhzgMp9LXQwt56AP4enn24ntXlmFLe57Bxssvw,3682
24
+ ImagePRO/utils/__init__.py,sha256=McVd-o9KtKOpAVYbLi19KxsatPPFFF-Qbt0gdgY3Ln8,170
25
+ ImagePRO/utils/image.py,sha256=Y64mD97rTiJb8_uNYlyG227VZodeb4U1aGezMkj7MnM,4025
26
+ ImagePRO/utils/result.py,sha256=ToQaOmUlTtobJkC65BG0YO_6BkBleMBn-0Qydko7cZc,6138
27
+ imagepro_python-1.3.1.dist-info/licenses/LICENSE,sha256=sehkHN7dbe5umrINZJyJjIf9VTemZSgTfJlq6iIsbJQ,1069
28
+ imagepro_python-1.3.1.dist-info/METADATA,sha256=-eudLbiwZ6DNW8smB4CwEXdeh-i7EtCvRQH_KS8dLqY,9999
29
+ imagepro_python-1.3.1.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
30
+ imagepro_python-1.3.1.dist-info/top_level.txt,sha256=UOuPzsoWrVKXgUupOSI96shJ6wE8Fhz-8bm8oMlLC3s,9
31
+ imagepro_python-1.3.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (82.0.1)
2
+ Generator: setuptools (84.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,31 +0,0 @@
1
- ImagePRO/__init__.py,sha256=LUqZaUWVUISpR6bm5K2cO6KjiVP3ZDPADZGZW051xGk,998
2
- ImagePRO/human_analysis/__init__.py,sha256=uSU0lM1p1HM6TNGv6u0nPHWy9QY505v43lqTkhClddM,190
3
- ImagePRO/human_analysis/body_analysis/__init__.py,sha256=czQoJJIrDAWz0UUY0h0mwxymSQ6L6CaZYYHhYFHyf4U,203
4
- ImagePRO/human_analysis/body_analysis/body_pose_estimation.py,sha256=69ybYkrbFl9EkuAc4ejCu2TW4m9TFLTn2Ae5fm_92lE,5549
5
- ImagePRO/human_analysis/body_analysis/hand_tracking.py,sha256=T7yM_VZN6mBZsDFJV6C-amCVzgklatvsZrtgcBrzVSg,6869
6
- ImagePRO/human_analysis/face_analysis/__init__.py,sha256=dKVZ6pq-0aQHL9vhMSt0BHs3WV_cTW65QPLJGnSiUgM,405
7
- ImagePRO/human_analysis/face_analysis/eye_status_analysis.py,sha256=9ydxEj4EhVCNf954gdFBQemS1uRNA-XGCMzyliI2AsQ,7126
8
- ImagePRO/human_analysis/face_analysis/face_comparison.py,sha256=RU-eSjFwpRIrV-QX8po8Mr-RhGwYEsCo3_Nt-IiA5Us,4315
9
- ImagePRO/human_analysis/face_analysis/face_detection.py,sha256=__s-lI6Egf-JgruncL_MfAkmwCq8Oe3F5Vvk9x9S_2Q,3897
10
- ImagePRO/human_analysis/face_analysis/face_mesh_analysis.py,sha256=8kLyEEnhMfdEALteltSHu2L2zbiFSNfzC73EuV0I5iQ,7964
11
- ImagePRO/human_analysis/face_analysis/head_pose_estimation.py,sha256=IidB4U0lQryw9T4J4_T-QmC-DgANUEgueto06RkKi2Q,7336
12
- ImagePRO/object_analysis/__init__.py,sha256=pj1vjY8uVUqeVONpaCacWufUzHF7rS5-nmy_C5IfI2w,148
13
- ImagePRO/object_analysis/object_detection.py,sha256=ZhxOpX5Zkiu-gq-2CRYPNzSo7ai1PRFZ3qopQeODIkQ,2890
14
- ImagePRO/pre_processing/__init__.py,sha256=nXUhE8RnDyW7T93fKsSDPfqzGHIW50OvgQvznY5UH0E,417
15
- ImagePRO/pre_processing/blur.py,sha256=zPWUKLEoKiL6kYwnZOtGRWBHM-dgEQ8WWdDt8_wGc0s,7961
16
- ImagePRO/pre_processing/contrast.py,sha256=XG69VsX3EKWIPDcQYm4D9qT7sA_BSP-sppSAa8qRUhA,5247
17
- ImagePRO/pre_processing/crop.py,sha256=p0esuZcn4-YsqcniDUmsVfPoWasxVH1OqzNBra8Pw4M,2442
18
- ImagePRO/pre_processing/dataset_generator.py,sha256=ekd_TnyflWKjJ6sYCiWc3vN2Q14cKiwZ1InOCslxoFM,7653
19
- ImagePRO/pre_processing/grayscale.py,sha256=MRCsFRIaL45sYVHzhuNyZBXsP7PF-yorn0Wt7xONvpY,1781
20
- ImagePRO/pre_processing/histogram.py,sha256=t1ykGUwB9ZbvO6J3bGPh4fDvrk4AJua1dN2BWzHIRIQ,2888
21
- ImagePRO/pre_processing/resize.py,sha256=GH3ObPe67ypPQG3a7ncrNR5WNDqGibXebAiuRXr6L10,1760
22
- ImagePRO/pre_processing/rotate.py,sha256=wqV2Qm7mIyvKTSFdwzr1tNAGnMG7rl5M3BRqC5m2oZE,4185
23
- ImagePRO/pre_processing/sharpen.py,sha256=C5AOxQNBL80JenkztlyRBV7yuCHqxG5dTGbRhtVRT9M,3544
24
- ImagePRO/utils/__init__.py,sha256=McVd-o9KtKOpAVYbLi19KxsatPPFFF-Qbt0gdgY3Ln8,170
25
- ImagePRO/utils/image.py,sha256=x93cBNycNOgET20a__TxZ9ZQo_2G84uB7QjXjBo9f8M,3973
26
- ImagePRO/utils/result.py,sha256=rGZX0FJ-dpA4v_m_GUO6ni0kCfcNJRnOjztbyRX9d88,6065
27
- imagepro_python-1.2.2.dist-info/licenses/LICENSE,sha256=sehkHN7dbe5umrINZJyJjIf9VTemZSgTfJlq6iIsbJQ,1069
28
- imagepro_python-1.2.2.dist-info/METADATA,sha256=52iKwYAOFwjFavR0bvGF4ESCX-1NPdQb_kSRtv5TLuY,8513
29
- imagepro_python-1.2.2.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
30
- imagepro_python-1.2.2.dist-info/top_level.txt,sha256=UOuPzsoWrVKXgUupOSI96shJ6wE8Fhz-8bm8oMlLC3s,9
31
- imagepro_python-1.2.2.dist-info/RECORD,,