ImagePRO-Python 1.4.0__tar.gz → 1.6.0__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 (63) hide show
  1. {imagepro_python-1.4.0/src/ImagePRO_Python.egg-info → imagepro_python-1.6.0}/PKG-INFO +16 -2
  2. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/pyproject.toml +1 -1
  3. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/readme.md +15 -1
  4. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/__init__.py +5 -2
  5. imagepro_python-1.6.0/src/ImagePRO/batch/__init__.py +14 -0
  6. imagepro_python-1.6.0/src/ImagePRO/batch/batch.py +529 -0
  7. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/human_analysis/body_analysis/body_pose_estimation.py +10 -4
  8. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/human_analysis/body_analysis/hand_tracking.py +13 -7
  9. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/human_analysis/face_analysis/eye_status_analysis.py +10 -5
  10. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/human_analysis/face_analysis/face_comparison.py +54 -61
  11. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/human_analysis/face_analysis/face_detection.py +3 -2
  12. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/human_analysis/face_analysis/face_mesh_analysis.py +20 -9
  13. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/human_analysis/face_analysis/head_pose_estimation.py +20 -7
  14. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/object_analysis/object_detection.py +12 -3
  15. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/pipeline/pipeline.py +3 -1
  16. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/pre_processing/blur.py +13 -6
  17. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/pre_processing/contrast.py +31 -13
  18. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/pre_processing/crop.py +6 -3
  19. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/pre_processing/dataset_generator.py +93 -26
  20. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/pre_processing/histogram.py +16 -11
  21. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/pre_processing/resize.py +4 -1
  22. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/pre_processing/rotate.py +2 -2
  23. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/pre_processing/sharpen.py +20 -21
  24. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/utils/image.py +11 -4
  25. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/utils/result.py +20 -13
  26. {imagepro_python-1.4.0 → imagepro_python-1.6.0/src/ImagePRO_Python.egg-info}/PKG-INFO +16 -2
  27. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO_Python.egg-info/SOURCES.txt +3 -0
  28. imagepro_python-1.6.0/tests/test_batch.py +378 -0
  29. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/tests/test_body_pose_estimation.py +9 -3
  30. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/tests/test_contrast.py +32 -0
  31. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/tests/test_crop.py +13 -0
  32. imagepro_python-1.6.0/tests/test_dataset_generator.py +190 -0
  33. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/tests/test_eye_status_analysis.py +20 -13
  34. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/tests/test_face_comparison.py +20 -5
  35. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/tests/test_face_mesh_analysis.py +29 -0
  36. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/tests/test_hand_tracking.py +7 -1
  37. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/tests/test_head_pose_estimation.py +3 -1
  38. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/tests/test_histogram.py +34 -0
  39. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/tests/test_image.py +32 -0
  40. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/tests/test_object_detection.py +4 -2
  41. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/tests/test_result.py +32 -0
  42. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/tests/test_sharpen.py +52 -0
  43. imagepro_python-1.4.0/tests/test_dataset_generator.py +0 -72
  44. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/LICENSE +0 -0
  45. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/setup.cfg +0 -0
  46. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/human_analysis/__init__.py +0 -0
  47. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/human_analysis/body_analysis/__init__.py +0 -0
  48. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/human_analysis/face_analysis/__init__.py +0 -0
  49. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/object_analysis/__init__.py +0 -0
  50. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/pipeline/__init__.py +0 -0
  51. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/pre_processing/__init__.py +0 -0
  52. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/pre_processing/grayscale.py +0 -0
  53. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO/utils/__init__.py +0 -0
  54. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO_Python.egg-info/dependency_links.txt +0 -0
  55. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO_Python.egg-info/requires.txt +0 -0
  56. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/src/ImagePRO_Python.egg-info/top_level.txt +0 -0
  57. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/tests/test_blur.py +0 -0
  58. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/tests/test_face_detection.py +0 -0
  59. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/tests/test_grayscale.py +0 -0
  60. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/tests/test_integration.py +0 -0
  61. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/tests/test_pipeline.py +0 -0
  62. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/tests/test_resize.py +0 -0
  63. {imagepro_python-1.4.0 → imagepro_python-1.6.0}/tests/test_rotate.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ImagePRO-Python
3
- Version: 1.4.0
3
+ Version: 1.6.0
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
@@ -81,6 +81,12 @@ Whether you're working on computer vision pipelines, preprocessing images for AI
81
81
  - **Flexible Steps**: Any ImagePRO function or custom callable; per-step keyword arguments via `Step`
82
82
  - **Pipeline Metadata**: Every result lists the executed steps and each step's parameters
83
83
 
84
+ ### **Batch Processing**
85
+ - **Many Images at Once**: Run any function, `Step`, or `Pipeline` over a folder, a glob pattern, or a list of images
86
+ - **Ordered Results**: One result per input, in input order, with per-input failure reporting
87
+ - **Optional Output Saving**: Mirror results into an output directory with collision-safe names
88
+ - **Progress Reporting**: Optional progress callback; optional worker threads
89
+
84
90
  ## Installation
85
91
 
86
92
  ### From PyPI
@@ -175,6 +181,12 @@ pipeline = Pipeline([
175
181
  pipeline_result = pipeline.run("person_and_objects.jpg")
176
182
  pipeline_result.save_as_img("processed_output.jpg")
177
183
  print(pipeline_result.meta["steps"]) # Executed step names
184
+
185
+ # Or run the same pipeline over a whole folder at once
186
+ from ImagePRO.batch import batch_process
187
+
188
+ batch = batch_process("photos/", pipeline, output_dir="processed/")
189
+ print(batch.meta["succeeded"], "images processed")
178
190
  ```
179
191
 
180
192
  > **Note**: These are basic examples. Each module contains many more functions with extensive customization options. Explore the module-specific README files for detailed documentation.
@@ -189,6 +201,7 @@ Each module includes comprehensive documentation with detailed examples:
189
201
  - [Body Analysis](src/ImagePRO/human_analysis/body_analysis/README.md): Body pose and hand tracking
190
202
  - **[Object Analysis](src/ImagePRO/object_analysis/README.md)**: YOLO-based object detection
191
203
  - **[Pipeline](src/ImagePRO/pipeline/README.md)**: Reusable chains of image processing operations
204
+ - **[Batch Processing](src/ImagePRO/batch/README.md)**: Run any operation over many images at once
192
205
  - **[Utils](src/ImagePRO/utils/README.md)**: Shared utilities and I/O handling
193
206
 
194
207
  For detailed project structure and development guidelines, see [PROJECT_STRUCTURE.md](PROJECT_STRUCTURE.md).
@@ -201,13 +214,14 @@ ImagePRO is built with a modular architecture designed for extensibility and mai
201
214
  - **Consistent API Patterns**: All functions follow the same input/output conventions
202
215
  - **Shared Utilities**: Common `Image` and `Result` classes for unified I/O
203
216
  - **Reusable Pipelines**: Chain any operations into a `Pipeline` and run it on any input
217
+ - **Batch Processing**: Run any operation or pipeline over many images at once, with ordered per-input results
204
218
  - **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
205
219
  - **Professional Error Handling**: Comprehensive validation with clear error messages
206
220
  - **Type Safety**: Full type hints throughout the codebase
207
221
  - **Documentation**: Google-style docstrings for all functions
208
222
 
209
223
  ### Key Design Principles
210
- - **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)
224
+ - **Non-Destructive Operations**: Operations never write into the input image; they return results in new `Result` objects
211
225
  - **Functional Style**: Stateless functions that can be easily composed
212
226
  - **Result Objects**: Unified return type containing image, data, and metadata
213
227
  - **Keyword Arguments**: All optional parameters use keyword-only syntax
@@ -7,7 +7,7 @@ where = ["src"]
7
7
 
8
8
  [project]
9
9
  name = "ImagePRO-Python"
10
- version = "1.4.0"
10
+ version = "1.6.0"
11
11
  description = "Professional & modular image processing library with OpenCV, MediaPipe, and YOLO integration."
12
12
  readme = "readme.md"
13
13
  requires-python = ">=3.9,<3.13"
@@ -32,6 +32,12 @@ Whether you're working on computer vision pipelines, preprocessing images for AI
32
32
  - **Flexible Steps**: Any ImagePRO function or custom callable; per-step keyword arguments via `Step`
33
33
  - **Pipeline Metadata**: Every result lists the executed steps and each step's parameters
34
34
 
35
+ ### **Batch Processing**
36
+ - **Many Images at Once**: Run any function, `Step`, or `Pipeline` over a folder, a glob pattern, or a list of images
37
+ - **Ordered Results**: One result per input, in input order, with per-input failure reporting
38
+ - **Optional Output Saving**: Mirror results into an output directory with collision-safe names
39
+ - **Progress Reporting**: Optional progress callback; optional worker threads
40
+
35
41
  ## Installation
36
42
 
37
43
  ### From PyPI
@@ -126,6 +132,12 @@ pipeline = Pipeline([
126
132
  pipeline_result = pipeline.run("person_and_objects.jpg")
127
133
  pipeline_result.save_as_img("processed_output.jpg")
128
134
  print(pipeline_result.meta["steps"]) # Executed step names
135
+
136
+ # Or run the same pipeline over a whole folder at once
137
+ from ImagePRO.batch import batch_process
138
+
139
+ batch = batch_process("photos/", pipeline, output_dir="processed/")
140
+ print(batch.meta["succeeded"], "images processed")
129
141
  ```
130
142
 
131
143
  > **Note**: These are basic examples. Each module contains many more functions with extensive customization options. Explore the module-specific README files for detailed documentation.
@@ -140,6 +152,7 @@ Each module includes comprehensive documentation with detailed examples:
140
152
  - [Body Analysis](src/ImagePRO/human_analysis/body_analysis/README.md): Body pose and hand tracking
141
153
  - **[Object Analysis](src/ImagePRO/object_analysis/README.md)**: YOLO-based object detection
142
154
  - **[Pipeline](src/ImagePRO/pipeline/README.md)**: Reusable chains of image processing operations
155
+ - **[Batch Processing](src/ImagePRO/batch/README.md)**: Run any operation over many images at once
143
156
  - **[Utils](src/ImagePRO/utils/README.md)**: Shared utilities and I/O handling
144
157
 
145
158
  For detailed project structure and development guidelines, see [PROJECT_STRUCTURE.md](PROJECT_STRUCTURE.md).
@@ -152,13 +165,14 @@ ImagePRO is built with a modular architecture designed for extensibility and mai
152
165
  - **Consistent API Patterns**: All functions follow the same input/output conventions
153
166
  - **Shared Utilities**: Common `Image` and `Result` classes for unified I/O
154
167
  - **Reusable Pipelines**: Chain any operations into a `Pipeline` and run it on any input
168
+ - **Batch Processing**: Run any operation or pipeline over many images at once, with ordered per-input results
155
169
  - **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
156
170
  - **Professional Error Handling**: Comprehensive validation with clear error messages
157
171
  - **Type Safety**: Full type hints throughout the codebase
158
172
  - **Documentation**: Google-style docstrings for all functions
159
173
 
160
174
  ### Key Design Principles
161
- - **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)
175
+ - **Non-Destructive Operations**: Operations never write into the input image; they return results in new `Result` objects
162
176
  - **Functional Style**: Stateless functions that can be easily composed
163
177
  - **Result Objects**: Unified return type containing image, data, and metadata
164
178
  - **Keyword Arguments**: All optional parameters use keyword-only syntax
@@ -13,10 +13,11 @@ Features:
13
13
  - Human analysis: face mesh, pose estimation, hand tracking
14
14
  - Object detection with YOLO models
15
15
  - Reusable pipelines for chaining operations
16
+ - Batch processing: run any operation over many images at once
16
17
  - Real-time processing capabilities
17
18
  """
18
19
 
19
- __version__ = "1.4.0"
20
+ __version__ = "1.6.0"
20
21
  __author__ = "Parsa Safaie"
21
22
  __email__ = "parsasafaie.2568@proton.me"
22
23
 
@@ -26,11 +27,13 @@ from . import pre_processing
26
27
  from . import human_analysis
27
28
  from . import object_analysis
28
29
  from . import pipeline
30
+ from . import batch
29
31
 
30
32
  __all__ = [
31
33
  "utils",
32
34
  "pre_processing",
33
35
  "human_analysis",
34
36
  "object_analysis",
35
- "pipeline"
37
+ "pipeline",
38
+ "batch"
36
39
  ]
@@ -0,0 +1,14 @@
1
+ # Batch Module
2
+ # Runs a single operation over many inputs at once
3
+ #
4
+ # Uses only base dependencies (numpy); the operation handed to
5
+ # batch_process may come from any module, including those with optional
6
+ # backends (mediapipe, ultralytics, insightface).
7
+
8
+ from .batch import BatchFailure, BatchResult, batch_process
9
+
10
+ __all__ = [
11
+ "BatchFailure",
12
+ "BatchResult",
13
+ "batch_process"
14
+ ]