dataflow-cv 1.6.0__tar.gz → 1.6.2__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 (52) hide show
  1. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/PKG-INFO +2 -2
  2. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/README.md +1 -1
  3. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/__init__.py +1 -1
  4. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/cli/commands/convert.py +0 -20
  5. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/cli/commands/evaluate.py +8 -12
  6. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/cli/commands/utils.py +6 -6
  7. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/convert/coco_and_labelme.py +6 -3
  8. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/convert/yolo_and_coco.py +6 -3
  9. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/evaluate/metrics.py +2 -5
  10. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow_cv.egg-info/PKG-INFO +2 -2
  11. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/pyproject.toml +1 -1
  12. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/LICENSE +0 -0
  13. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/cli/__init__.py +0 -0
  14. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/cli/commands/__init__.py +0 -0
  15. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/cli/commands/visualize.py +0 -0
  16. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/cli/exceptions.py +0 -0
  17. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/cli/main.py +0 -0
  18. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/convert/__init__.py +0 -0
  19. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/convert/base.py +0 -0
  20. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/convert/labelme_and_yolo.py +0 -0
  21. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/convert/log_templates.py +0 -0
  22. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/convert/rle_converter.py +0 -0
  23. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/convert/utils.py +0 -0
  24. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/evaluate/__init__.py +0 -0
  25. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/evaluate/base.py +0 -0
  26. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/evaluate/evaluator.py +0 -0
  27. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/evaluate/log_templates.py +0 -0
  28. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/evaluate/result.py +0 -0
  29. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/evaluate/utils.py +0 -0
  30. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/label/__init__.py +0 -0
  31. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/label/base.py +0 -0
  32. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/label/coco_handler.py +0 -0
  33. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/label/labelme_handler.py +0 -0
  34. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/label/models.py +0 -0
  35. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/label/utils.py +0 -0
  36. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/label/yolo_handler.py +0 -0
  37. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/util/__init__.py +0 -0
  38. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/util/logging.py +0 -0
  39. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/visualize/__init__.py +0 -0
  40. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/visualize/base.py +0 -0
  41. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/visualize/coco_visualizer.py +0 -0
  42. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/visualize/labelme_visualizer.py +0 -0
  43. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/visualize/log_templates.py +0 -0
  44. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/visualize/utils.py +0 -0
  45. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow/visualize/yolo_visualizer.py +0 -0
  46. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow_cv.egg-info/SOURCES.txt +0 -0
  47. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow_cv.egg-info/dependency_links.txt +0 -0
  48. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow_cv.egg-info/entry_points.txt +0 -0
  49. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow_cv.egg-info/not-zip-safe +0 -0
  50. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow_cv.egg-info/requires.txt +0 -0
  51. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/dataflow_cv.egg-info/top_level.txt +0 -0
  52. {dataflow_cv-1.6.0 → dataflow_cv-1.6.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dataflow-cv
3
- Version: 1.6.0
3
+ Version: 1.6.2
4
4
  Summary: A computer vision dataset processing library
5
5
  Author: DataFlow-CV Team
6
6
  License: MIT
@@ -266,7 +266,7 @@ print(f"Segm F1: {prf1.overall.f1_score:.3f}")
266
266
 
267
267
  ## 🔧 Development
268
268
 
269
- For detailed developer guidance including advanced test commands, debugging, and architecture overview, see [CLAUDE.md](CLAUDE.md).
269
+ For detailed developer guidance including advanced test commands, debugging, and architecture overview, see [CLAUDE.md](CLAUDE.md). The project also includes [Claude Code skills](.claude/skills/) for common tasks: `/commit`, `/release`, `/dev`, `/spec`, and `/claude`.
270
270
 
271
271
  ### 🧪 Testing
272
272
 
@@ -227,7 +227,7 @@ print(f"Segm F1: {prf1.overall.f1_score:.3f}")
227
227
 
228
228
  ## 🔧 Development
229
229
 
230
- For detailed developer guidance including advanced test commands, debugging, and architecture overview, see [CLAUDE.md](CLAUDE.md).
230
+ For detailed developer guidance including advanced test commands, debugging, and architecture overview, see [CLAUDE.md](CLAUDE.md). The project also includes [Claude Code skills](.claude/skills/) for common tasks: `/commit`, `/release`, `/dev`, `/spec`, and `/claude`.
231
231
 
232
232
  ### 🧪 Testing
233
233
 
@@ -1,4 +1,4 @@
1
1
  """DataFlow-CV: A computer vision dataset processing library."""
2
2
 
3
- __version__ = "1.6.0"
3
+ __version__ = "1.6.2"
4
4
  __author__ = "DataFlow-CV Team"
@@ -55,16 +55,6 @@ def yolo2coco(
55
55
  # Parameter validation
56
56
  validate_convert_params("yolo", "coco", label_dir, output_file, image_dir, class_file)
57
57
 
58
- # Validate pycocotools availability if RLE is requested
59
- if do_rle:
60
- try:
61
- from pycocotools import mask as coco_mask # noqa: F401
62
- except ImportError:
63
- raise RuntimeCLIError(
64
- "RLE encoding requested (--do-rle) but pycocotools is not available. "
65
- "Install with: pip install pycocotools"
66
- )
67
-
68
58
  # Call existing API
69
59
  converter = YoloAndCocoConverter(
70
60
  source_to_target=True, prediction=prediction, log_config=log_config, strict_mode=strict
@@ -215,16 +205,6 @@ def labelme2coco(
215
205
  # Parameter validation
216
206
  validate_convert_params("labelme", "coco", labelme_dir, output_file, None, class_file)
217
207
 
218
- # Validate pycocotools availability if RLE is requested
219
- if do_rle:
220
- try:
221
- from pycocotools import mask as coco_mask # noqa: F401
222
- except ImportError:
223
- raise RuntimeCLIError(
224
- "RLE encoding requested (--do-rle) but pycocotools is not available. "
225
- "Install with: pip install pycocotools"
226
- )
227
-
228
208
  # Call existing API
229
209
  converter = CocoAndLabelMeConverter(source_to_target=False, log_config=log_config, strict_mode=strict)
230
210
  result = converter.convert(
@@ -126,13 +126,11 @@ def detection(ctx, gt_json, dt_json, verbose, prf1, prf1_iou, prf1_conf, prf1_me
126
126
  validate_path_exists(dt_json, "DT JSON")
127
127
 
128
128
  # Check pycocotools availability
129
+ from dataflow.evaluate.utils import _validate_coco_available
129
130
  try:
130
- from pycocotools.coco import COCO # noqa: F401
131
- except ImportError:
132
- raise SystemError(
133
- "pycocotools is required for evaluation. "
134
- "Install with: pip install pycocotools"
135
- )
131
+ _validate_coco_available()
132
+ except ImportError as e:
133
+ raise SystemError(str(e))
136
134
 
137
135
  if prf1:
138
136
  # Path B: P/R/F1 only — skip COCOeval entirely
@@ -210,13 +208,11 @@ def segmentation(ctx, gt_json, dt_json, verbose, prf1, prf1_iou, prf1_conf, prf1
210
208
  validate_path_exists(dt_json, "DT JSON")
211
209
 
212
210
  # Check pycocotools availability
211
+ from dataflow.evaluate.utils import _validate_coco_available
213
212
  try:
214
- from pycocotools.coco import COCO # noqa: F401
215
- except ImportError:
216
- raise SystemError(
217
- "pycocotools is required for evaluation. "
218
- "Install with: pip install pycocotools"
219
- )
213
+ _validate_coco_available()
214
+ except ImportError as e:
215
+ raise SystemError(str(e))
220
216
 
221
217
  if prf1:
222
218
  # Path B: P/R/F1 only — skip COCOeval entirely
@@ -92,20 +92,20 @@ def validate_convert_params(
92
92
  # Check required parameters based on conversion direction
93
93
  if source_format == "yolo" and target_format == "coco":
94
94
  if not image_dir:
95
- raise InputError("--image-dir is required for YOLO→COCO conversion")
95
+ raise InputError("IMAGE_DIR is required for YOLO→COCO conversion")
96
96
  if not class_file:
97
- raise InputError("--class-file is required for YOLO→COCO conversion")
97
+ raise InputError("CLASS_FILE is required for YOLO→COCO conversion")
98
98
  elif source_format == "yolo" and target_format == "labelme":
99
99
  if not image_dir:
100
- raise InputError("--image-dir is required for YOLO→LabelMe conversion")
100
+ raise InputError("IMAGE_DIR is required for YOLO→LabelMe conversion")
101
101
  if not class_file:
102
- raise InputError("--class-file is required for YOLO→LabelMe conversion")
102
+ raise InputError("CLASS_FILE is required for YOLO→LabelMe conversion")
103
103
  elif source_format == "labelme" and target_format == "coco":
104
104
  if not class_file:
105
- raise InputError("--class-file is required for LabelMe→COCO conversion")
105
+ raise InputError("CLASS_FILE is required for LabelMe→COCO conversion")
106
106
  elif source_format == "labelme" and target_format == "yolo":
107
107
  if not class_file:
108
- raise InputError("--class-file is required for LabelMe→YOLO conversion")
108
+ raise InputError("CLASS_FILE is required for LabelMe→YOLO conversion")
109
109
  # For coco→yolo: both optional
110
110
  # For coco→labelme: both optional
111
111
 
@@ -92,10 +92,13 @@ class CocoAndLabelMeConverter(BaseConverter):
92
92
  # Check if RLE conversion is requested but pycocotools is not available
93
93
  do_rle = kwargs.get("do_rle", False)
94
94
  if do_rle:
95
- # Import HAS_COCO_MASK from coco_handler
96
- from ..label.coco_handler import HAS_COCO_MASK
95
+ try:
96
+ from pycocotools import mask as coco_mask # noqa: F401
97
+ _has_coco = True
98
+ except ImportError:
99
+ _has_coco = False
97
100
 
98
- if not HAS_COCO_MASK:
101
+ if not _has_coco:
99
102
  error_msg = (
100
103
  "RLE conversion requested (do_rle=True) but pycocotools is not available. "
101
104
  "Install with: pip install pycocotools"
@@ -110,10 +110,13 @@ class YoloAndCocoConverter(BaseConverter):
110
110
  # Check if RLE conversion is requested but pycocotools is not available
111
111
  do_rle = kwargs.get("do_rle", False)
112
112
  if do_rle:
113
- # Import HAS_COCO_MASK from coco_handler
114
- from ..label.coco_handler import HAS_COCO_MASK
113
+ try:
114
+ from pycocotools import mask as coco_mask # noqa: F401
115
+ _has_coco = True
116
+ except ImportError:
117
+ _has_coco = False
115
118
 
116
- if not HAS_COCO_MASK:
119
+ if not _has_coco:
117
120
  error_msg = (
118
121
  "RLE conversion requested (do_rle=True) but pycocotools is not available. "
119
122
  "Install with: pip install pycocotools"
@@ -28,7 +28,6 @@ def compute_pr_f1(
28
28
  iou_type: str = "bbox",
29
29
  method: str = "macro",
30
30
  log_config: Optional[Any] = None,
31
- logger: Optional[logging.Logger] = None,
32
31
  ) -> PRF1Result:
33
32
  """Compute Precision / Recall / F1-score at a single IoU threshold.
34
33
 
@@ -53,8 +52,6 @@ def compute_pr_f1(
53
52
  ``"micro"`` — computed from summed TP/FP/FN across all
54
53
  categories.
55
54
  log_config: Optional ``LogConfig`` for logging configuration.
56
- logger: Optional logger instance (backward-compatible, may be
57
- removed in the future).
58
55
 
59
56
  Returns:
60
57
  PRF1Result with per-class and overall P/R/F1.
@@ -76,11 +73,11 @@ def compute_pr_f1(
76
73
  "Expected 'macro' or 'micro'."
77
74
  )
78
75
 
79
- # Logger setup (prefer log_config, fallback to legacy logger param)
76
+ # Logger setup
80
77
  if log_config is not None:
81
78
  from dataflow.util.logging import LogManager
82
79
  logger = LogManager(log_config).logger
83
- elif logger is None:
80
+ else:
84
81
  logger = logging.getLogger(__name__)
85
82
 
86
83
  result = PRF1Result(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dataflow-cv
3
- Version: 1.6.0
3
+ Version: 1.6.2
4
4
  Summary: A computer vision dataset processing library
5
5
  Author: DataFlow-CV Team
6
6
  License: MIT
@@ -266,7 +266,7 @@ print(f"Segm F1: {prf1.overall.f1_score:.3f}")
266
266
 
267
267
  ## 🔧 Development
268
268
 
269
- For detailed developer guidance including advanced test commands, debugging, and architecture overview, see [CLAUDE.md](CLAUDE.md).
269
+ For detailed developer guidance including advanced test commands, debugging, and architecture overview, see [CLAUDE.md](CLAUDE.md). The project also includes [Claude Code skills](.claude/skills/) for common tasks: `/commit`, `/release`, `/dev`, `/spec`, and `/claude`.
270
270
 
271
271
  ### 🧪 Testing
272
272
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "dataflow-cv"
7
- version = "1.6.0"
7
+ version = "1.6.2"
8
8
  description = "A computer vision dataset processing library"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
File without changes
File without changes