ImagePRO-Python 1.0.0__py3-none-any.whl → 1.0.2__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.
- ImagePRO/utils/__init__.py +3 -2
- ImagePRO/utils/result.py +15 -4
- {imagepro_python-1.0.0.dist-info → imagepro_python-1.0.2.dist-info}/METADATA +2 -1
- {imagepro_python-1.0.0.dist-info → imagepro_python-1.0.2.dist-info}/RECORD +7 -7
- {imagepro_python-1.0.0.dist-info → imagepro_python-1.0.2.dist-info}/WHEEL +0 -0
- {imagepro_python-1.0.0.dist-info → imagepro_python-1.0.2.dist-info}/licenses/LICENSE +0 -0
- {imagepro_python-1.0.0.dist-info → imagepro_python-1.0.2.dist-info}/top_level.txt +0 -0
ImagePRO/utils/__init__.py
CHANGED
ImagePRO/utils/result.py
CHANGED
|
@@ -135,12 +135,23 @@ class Result:
|
|
|
135
135
|
try:
|
|
136
136
|
with out_path.open("w", newline="", encoding="utf-8") as f:
|
|
137
137
|
writer = csv.writer(f)
|
|
138
|
-
if isinstance(payload,
|
|
139
|
-
writer.writerows(payload)
|
|
140
|
-
elif isinstance(payload, (list, tuple)):
|
|
141
|
-
writer.writerow(list(payload))
|
|
138
|
+
if isinstance(payload, (list, tuple)):
|
|
139
|
+
writer.writerows(flatten_rows(payload))
|
|
142
140
|
else:
|
|
143
141
|
writer.writerow([payload])
|
|
144
142
|
except Exception as exc:
|
|
145
143
|
raise IOError(f"Failed to write CSV to {out_path}: {exc}") from exc
|
|
146
144
|
return self
|
|
145
|
+
|
|
146
|
+
def flatten_rows(data):
|
|
147
|
+
"""Flatten any nested lists/tuples into rows suitable for CSV writing."""
|
|
148
|
+
rows = []
|
|
149
|
+
for item in data:
|
|
150
|
+
if isinstance(item, (list, tuple)):
|
|
151
|
+
if item and all(isinstance(x, (list, tuple)) for x in item):
|
|
152
|
+
rows.extend(flatten_rows(item))
|
|
153
|
+
else:
|
|
154
|
+
rows.append(list(item))
|
|
155
|
+
else:
|
|
156
|
+
rows.append([item])
|
|
157
|
+
return rows
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ImagePRO-Python
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
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
|
|
@@ -27,4 +27,5 @@ Requires-Dist: opencv-python<5.0,>=4.8
|
|
|
27
27
|
Requires-Dist: ultralytics<9.0,>=8.2.0
|
|
28
28
|
Requires-Dist: mediapipe<1.0,>=0.10.0
|
|
29
29
|
Requires-Dist: insightface<1.0,>=0.7
|
|
30
|
+
Requires-Dist: onnxruntime<2.0,>=1.16
|
|
30
31
|
Dynamic: license-file
|
|
@@ -20,11 +20,11 @@ ImagePRO/pre_processing/grayscale.py,sha256=IjMCvH7z4q1NCS8pm7S8A4hVigbLQbsjwvjf
|
|
|
20
20
|
ImagePRO/pre_processing/resize.py,sha256=BGGLGao_1uc8B1kZFa5MVYcTzaeeP1qkjFei6M_eIZc,1501
|
|
21
21
|
ImagePRO/pre_processing/rotate.py,sha256=kdauqCpn71Yube351o1tmQFyxcj2cjTs0ZJflxsoet8,3926
|
|
22
22
|
ImagePRO/pre_processing/sharpen.py,sha256=kW9KVXvQ77qezBfUWH7loqstQqJ2QvK7s0gtwoxR4EI,3285
|
|
23
|
-
ImagePRO/utils/__init__.py,sha256=
|
|
23
|
+
ImagePRO/utils/__init__.py,sha256=McVd-o9KtKOpAVYbLi19KxsatPPFFF-Qbt0gdgY3Ln8,170
|
|
24
24
|
ImagePRO/utils/image.py,sha256=ofzJ5TevUrq8pRwIW7i7zYR4a9IByWPwec1YT4xft3A,3550
|
|
25
|
-
ImagePRO/utils/result.py,sha256=
|
|
26
|
-
imagepro_python-1.0.
|
|
27
|
-
imagepro_python-1.0.
|
|
28
|
-
imagepro_python-1.0.
|
|
29
|
-
imagepro_python-1.0.
|
|
30
|
-
imagepro_python-1.0.
|
|
25
|
+
ImagePRO/utils/result.py,sha256=DAFaFZ5jZZ7C2YrhRs6h2PAei6Mbv1Mu8xX_2NQ7c6Y,5605
|
|
26
|
+
imagepro_python-1.0.2.dist-info/licenses/LICENSE,sha256=sehkHN7dbe5umrINZJyJjIf9VTemZSgTfJlq6iIsbJQ,1069
|
|
27
|
+
imagepro_python-1.0.2.dist-info/METADATA,sha256=JuEH1MNcg0bijHw68QKqkXSEPQa3C8xHL7uIAEcgUxI,1456
|
|
28
|
+
imagepro_python-1.0.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
29
|
+
imagepro_python-1.0.2.dist-info/top_level.txt,sha256=UOuPzsoWrVKXgUupOSI96shJ6wE8Fhz-8bm8oMlLC3s,9
|
|
30
|
+
imagepro_python-1.0.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|