argus-cv 1.2.0__tar.gz → 1.4.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.

Potentially problematic release.


This version of argus-cv might be problematic. Click here for more details.

Files changed (38) hide show
  1. {argus_cv-1.2.0 → argus_cv-1.4.0}/.github/workflows/ci.yml +3 -14
  2. argus_cv-1.4.0/.pre-commit-config.yaml +7 -0
  3. {argus_cv-1.2.0 → argus_cv-1.4.0}/CHANGELOG.md +16 -0
  4. {argus_cv-1.2.0 → argus_cv-1.4.0}/PKG-INFO +9 -2
  5. {argus_cv-1.2.0 → argus_cv-1.4.0}/README.md +8 -1
  6. {argus_cv-1.2.0 → argus_cv-1.4.0}/docs/getting-started/installation.md +5 -5
  7. {argus_cv-1.2.0 → argus_cv-1.4.0}/docs/guides/datasets.md +56 -2
  8. {argus_cv-1.2.0 → argus_cv-1.4.0}/docs/guides/listing.md +1 -1
  9. {argus_cv-1.2.0 → argus_cv-1.4.0}/docs/guides/splitting.md +1 -7
  10. {argus_cv-1.2.0 → argus_cv-1.4.0}/docs/guides/stats.md +3 -0
  11. {argus_cv-1.2.0 → argus_cv-1.4.0}/docs/guides/viewer.md +9 -1
  12. {argus_cv-1.2.0 → argus_cv-1.4.0}/docs/index.md +5 -4
  13. {argus_cv-1.2.0 → argus_cv-1.4.0}/docs/reference/cli.md +2 -3
  14. {argus_cv-1.2.0 → argus_cv-1.4.0}/mkdocs.yml +1 -1
  15. {argus_cv-1.2.0 → argus_cv-1.4.0}/pyproject.toml +2 -1
  16. {argus_cv-1.2.0 → argus_cv-1.4.0}/src/argus/__init__.py +1 -1
  17. {argus_cv-1.2.0 → argus_cv-1.4.0}/src/argus/cli.py +448 -33
  18. {argus_cv-1.2.0 → argus_cv-1.4.0}/src/argus/core/__init__.py +3 -0
  19. {argus_cv-1.2.0 → argus_cv-1.4.0}/src/argus/core/base.py +1 -0
  20. {argus_cv-1.2.0 → argus_cv-1.4.0}/src/argus/core/coco.py +8 -6
  21. argus_cv-1.4.0/src/argus/core/mask.py +648 -0
  22. {argus_cv-1.2.0 → argus_cv-1.4.0}/src/argus/core/yolo.py +21 -12
  23. {argus_cv-1.2.0 → argus_cv-1.4.0}/tests/conftest.py +271 -3
  24. {argus_cv-1.2.0 → argus_cv-1.4.0}/tests/test_classification.py +2 -6
  25. argus_cv-1.4.0/tests/test_mask.py +400 -0
  26. {argus_cv-1.2.0 → argus_cv-1.4.0}/tests/test_split_command.py +1 -3
  27. {argus_cv-1.2.0 → argus_cv-1.4.0}/tests/test_stats_command.py +1 -1
  28. {argus_cv-1.2.0 → argus_cv-1.4.0}/uv.lock +27 -1
  29. {argus_cv-1.2.0 → argus_cv-1.4.0}/.github/workflows/docs.yml +0 -0
  30. {argus_cv-1.2.0 → argus_cv-1.4.0}/.github/workflows/release.yml +0 -0
  31. {argus_cv-1.2.0 → argus_cv-1.4.0}/.gitignore +0 -0
  32. {argus_cv-1.2.0 → argus_cv-1.4.0}/docs/assets/javascripts/extra.js +0 -0
  33. {argus_cv-1.2.0 → argus_cv-1.4.0}/docs/assets/stylesheets/extra.css +0 -0
  34. {argus_cv-1.2.0 → argus_cv-1.4.0}/docs/getting-started/quickstart.md +0 -0
  35. {argus_cv-1.2.0 → argus_cv-1.4.0}/src/argus/__main__.py +0 -0
  36. {argus_cv-1.2.0 → argus_cv-1.4.0}/src/argus/commands/__init__.py +0 -0
  37. {argus_cv-1.2.0 → argus_cv-1.4.0}/src/argus/core/split.py +0 -0
  38. {argus_cv-1.2.0 → argus_cv-1.4.0}/tests/test_list_command.py +0 -0
@@ -11,23 +11,12 @@ on:
11
11
  jobs:
12
12
  lint:
13
13
  runs-on: ubuntu-latest
14
-
14
+
15
15
  steps:
16
16
  - name: Checkout code
17
17
  uses: actions/checkout@v4
18
-
19
- - name: Install uv
20
- uses: astral-sh/setup-uv@v4
21
- with:
22
- enable-cache: true
23
-
24
- - name: Set up Python
25
- run: uv python install 3.12
26
-
27
- - name: Run linting
28
- run: |
29
- uv sync --only-group dev
30
- uv run ruff check .
18
+
19
+ - uses: j178/prek-action@v1
31
20
 
32
21
  test:
33
22
  runs-on: ubuntu-latest
@@ -0,0 +1,7 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.11.13
4
+ hooks:
5
+ - id: ruff
6
+ args: [--fix]
7
+ - id: ruff-format
@@ -2,6 +2,22 @@
2
2
 
3
3
  <!-- version list -->
4
4
 
5
+ ## v1.4.0 (2026-01-26)
6
+
7
+ ### Features
8
+
9
+ - **view**: Show polygon vertices and hide bbox for segmentation
10
+ ([`03b34f7`](https://github.com/pirnerjonas/argus/commit/03b34f78fdafefd35a8b2594bf1296007716d6c9))
11
+
12
+
13
+ ## v1.3.0 (2026-01-24)
14
+
15
+ ### Features
16
+
17
+ - Add MaskDataset class for semantic segmentation masks
18
+ ([`bbba4f2`](https://github.com/pirnerjonas/argus/commit/bbba4f2c9d476d426b6c805ad2120eca9c38c855))
19
+
20
+
5
21
  ## v1.2.0 (2026-01-15)
6
22
 
7
23
  ### Code Style
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: argus-cv
3
- Version: 1.2.0
3
+ Version: 1.4.0
4
4
  Summary: CLI tool for working with vision AI datasets
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: numpy>=1.24.0
@@ -12,7 +12,7 @@ Description-Content-Type: text/markdown
12
12
 
13
13
  # argus-cv
14
14
 
15
- Vision AI dataset toolkit for working with YOLO and COCO datasets.
15
+ Vision AI dataset toolkit for working with YOLO, COCO, and semantic mask datasets.
16
16
 
17
17
  **[Documentation](https://pirnerjonas.github.io/argus/)**
18
18
 
@@ -22,6 +22,13 @@ Vision AI dataset toolkit for working with YOLO and COCO datasets.
22
22
  uvx argus-cv
23
23
  ```
24
24
 
25
+ ## Highlights
26
+
27
+ - Detects YOLO, COCO, and folder-based semantic mask datasets.
28
+ - Reports per-class stats (pixel coverage for mask datasets).
29
+ - Interactive viewer with bounding boxes, polygons, or mask overlays.
30
+ - Split unsplit YOLO/COCO datasets into train/val/test.
31
+
25
32
  ## Usage
26
33
 
27
34
  ```bash
@@ -1,6 +1,6 @@
1
1
  # argus-cv
2
2
 
3
- Vision AI dataset toolkit for working with YOLO and COCO datasets.
3
+ Vision AI dataset toolkit for working with YOLO, COCO, and semantic mask datasets.
4
4
 
5
5
  **[Documentation](https://pirnerjonas.github.io/argus/)**
6
6
 
@@ -10,6 +10,13 @@ Vision AI dataset toolkit for working with YOLO and COCO datasets.
10
10
  uvx argus-cv
11
11
  ```
12
12
 
13
+ ## Highlights
14
+
15
+ - Detects YOLO, COCO, and folder-based semantic mask datasets.
16
+ - Reports per-class stats (pixel coverage for mask datasets).
17
+ - Interactive viewer with bounding boxes, polygons, or mask overlays.
18
+ - Split unsplit YOLO/COCO datasets into train/val/test.
19
+
13
20
  ## Usage
14
21
 
15
22
  ```bash
@@ -6,7 +6,7 @@ workflow.
6
6
  ## Quick install with uv
7
7
 
8
8
  ```bash
9
- uvx argus
9
+ uvx argus-cv
10
10
  ```
11
11
 
12
12
  `uvx` runs the package in an isolated environment and keeps it up to date.
@@ -14,19 +14,19 @@ uvx argus
14
14
  Verify it works:
15
15
 
16
16
  ```bash
17
- argus --help
17
+ argus-cv --help
18
18
  ```
19
19
 
20
20
  ## pipx
21
21
 
22
22
  ```bash
23
- pipx install argus
23
+ pipx install argus-cv
24
24
  ```
25
25
 
26
26
  Verify it works:
27
27
 
28
28
  ```bash
29
- argus --help
29
+ argus-cv --help
30
30
  ```
31
31
 
32
32
  ## From source
@@ -40,7 +40,7 @@ pip install -e .
40
40
  Verify it works:
41
41
 
42
42
  ```bash
43
- argus --help
43
+ argus-cv --help
44
44
  ```
45
45
 
46
46
  ## Requirements
@@ -1,7 +1,7 @@
1
1
  # Dataset formats
2
2
 
3
- Argus supports YOLO and COCO datasets. Detection and segmentation are handled
4
- out of the box.
3
+ Argus supports YOLO, COCO, and folder-based semantic mask datasets. Detection
4
+ and segmentation are handled out of the box.
5
5
 
6
6
  ## YOLO
7
7
 
@@ -59,6 +59,60 @@ dataset/
59
59
  If your annotation filenames include `train`, `val`, or `test`, Argus will treat
60
60
  those as splits. Otherwise it defaults to `train`.
61
61
 
62
+ ## Mask (semantic segmentation)
63
+
64
+ Mask datasets are simple image + mask folders. Argus detects a few common
65
+ patterns:
66
+
67
+ - `images/` + `masks/`
68
+ - `img/` + `gt/`
69
+ - `leftImg8bit/` + `gtFine/` (Cityscapes-style)
70
+
71
+ Split-aware layout:
72
+
73
+ ```text
74
+ dataset/
75
+ ├── images/
76
+ │ ├── train/
77
+ │ └── val/
78
+ ├── masks/
79
+ │ ├── train/
80
+ │ └── val/
81
+ └── classes.yaml # Optional for grayscale, required for RGB palette masks
82
+ ```
83
+
84
+ Unsplit layout:
85
+
86
+ ```text
87
+ dataset/
88
+ ├── images/
89
+ ├── masks/
90
+ └── classes.yaml
91
+ ```
92
+
93
+ ### Mask encoding
94
+
95
+ - Grayscale masks: each pixel value is the class ID. Argus will auto-detect
96
+ class IDs if no `classes.yaml` is provided.
97
+ - RGB palette masks: each class maps to a color. A `classes.yaml` is required.
98
+ - Mask files should be `.png` and match the image stem (e.g., `frame.png`), or
99
+ use common suffixes like `_mask`, `_gt`, or `_label`.
100
+
101
+ Example `classes.yaml`:
102
+
103
+ ```yaml
104
+ names:
105
+ - background
106
+ - road
107
+ - sidewalk
108
+ ignore_index: 255
109
+ palette:
110
+ - id: 0
111
+ name: background
112
+ - id: 1
113
+ name: road
114
+ ```
115
+
62
116
  ## Detection heuristics
63
117
 
64
118
  If Argus does not detect your dataset, check the following:
@@ -11,7 +11,7 @@ argus-cv list --path /datasets
11
11
  This prints a table showing:
12
12
 
13
13
  - Dataset path
14
- - Format (yolo or coco)
14
+ - Format (yolo, coco, or mask)
15
15
  - Task (detection or segmentation)
16
16
  - Number of classes
17
17
  - Detected splits
@@ -8,7 +8,7 @@ Use `argus-cv split` to create train/val/test splits from an unsplit dataset.
8
8
  argus-cv split -d /datasets/animals -o /datasets/animals_splits
9
9
  ```
10
10
 
11
- By default, Argus uses a 0.8/0.1/0.1 ratio and stratified sampling.
11
+ Argus uses a 0.8/0.1/0.1 ratio and stratified sampling by default.
12
12
 
13
13
  ## Custom ratio
14
14
 
@@ -18,12 +18,6 @@ argus-cv split -d /datasets/animals -o /datasets/animals_splits -r 0.7,0.2,0.1
18
18
 
19
19
  Ratios can sum to 1.0 or 100.
20
20
 
21
- ## Disable stratification
22
-
23
- ```bash
24
- argus-cv split -d /datasets/animals -o /datasets/animals_splits --no-stratify
25
- ```
26
-
27
21
  ## Set a seed for determinism
28
22
 
29
23
  ```bash
@@ -1,6 +1,8 @@
1
1
  # Stats and counts
2
2
 
3
3
  `argus-cv stats` provides per-class instance counts and image totals by split.
4
+ For mask datasets, it reports pixel coverage and how many images contain each
5
+ class.
4
6
 
5
7
  ## Example
6
8
 
@@ -25,3 +27,4 @@ If Argus prints "No annotations found", check:
25
27
 
26
28
  - YOLO: `labels/` exists and matches `images/`.
27
29
  - COCO: annotation JSON files are valid and contain `annotations`.
30
+ - Mask: masks are `.png` files and match the image file names.
@@ -1,6 +1,7 @@
1
1
  # Visual inspection
2
2
 
3
- The viewer overlays boxes and masks for quick spot checks.
3
+ The viewer overlays boxes and masks for quick spot checks. For mask datasets,
4
+ it blends the segmentation mask over the image.
4
5
 
5
6
  ## Launching the viewer
6
7
 
@@ -14,6 +15,12 @@ argus-cv view -d /datasets/retail
14
15
  argus-cv view -d /datasets/retail --split val
15
16
  ```
16
17
 
18
+ ### Adjust mask opacity
19
+
20
+ ```bash
21
+ argus-cv view -d /datasets/roads --opacity 0.3
22
+ ```
23
+
17
24
  ## Controls
18
25
 
19
26
  - Right arrow or `N`: next image
@@ -22,6 +29,7 @@ argus-cv view -d /datasets/retail --split val
22
29
  - Drag: pan while zoomed
23
30
  - `R`: reset zoom
24
31
  - `Q` or `Esc`: quit
32
+ - `T`: toggle annotations or mask overlay
25
33
 
26
34
  ## Notes
27
35
 
@@ -3,8 +3,9 @@
3
3
  <p class="hero__eyebrow">Argus</p>
4
4
  <h1>Vision AI dataset work, without the friction.</h1>
5
5
  <p>
6
- Argus is a focused CLI for YOLO and COCO datasets. List datasets, inspect
7
- class balance, view annotations, and split cleanly for training.
6
+ Argus is a focused CLI for YOLO, COCO, and semantic mask datasets. List
7
+ datasets, inspect class balance, view annotations, and split cleanly for
8
+ training.
8
9
  </p>
9
10
  <div class="hero__actions">
10
11
  <a class="md-button md-button--primary" href="getting-started/quickstart/">Get started</a>
@@ -30,7 +31,7 @@ argus-cv view -d /data/animals --split val
30
31
  <div class="grid cards">
31
32
  <div class="card">
32
33
  <h3>Format-aware</h3>
33
- <p>Detects YOLO and COCO by structure and metadata, not guesses.</p>
34
+ <p>Detects YOLO, COCO, and mask datasets by structure and metadata.</p>
34
35
  </div>
35
36
  <div class="card">
36
37
  <h3>Readable statistics</h3>
@@ -38,7 +39,7 @@ argus-cv view -d /data/animals --split val
38
39
  </div>
39
40
  <div class="card">
40
41
  <h3>Annotation viewer</h3>
41
- <p>Browse images with boxes and masks overlayed. Pan and zoom included.</p>
42
+ <p>Browse images with boxes, polygons, and mask overlays. Pan and zoom included.</p>
42
43
  </div>
43
44
  <div class="card">
44
45
  <h3>Clean splits</h3>
@@ -3,7 +3,7 @@
3
3
  ## Global
4
4
 
5
5
  ```bash
6
- argus --help
6
+ argus-cv --help
7
7
  ```
8
8
 
9
9
  Argus uses subcommands: `list`, `stats`, `view`, and `split`.
@@ -45,6 +45,7 @@ Options:
45
45
 
46
46
  - `--dataset-path`, `-d`: dataset root path
47
47
  - `--split`, `-s`: split to view (train, val, test)
48
+ - `--opacity`, `-o`: mask overlay opacity (mask datasets only)
48
49
 
49
50
  ## split
50
51
 
@@ -54,7 +55,6 @@ Create train/val/test splits from an unsplit dataset.
54
55
  argus-cv split --dataset-path /datasets/animals \
55
56
  --output-path /datasets/animals_splits \
56
57
  --ratio 0.8,0.1,0.1 \
57
- --stratify \
58
58
  --seed 42
59
59
  ```
60
60
 
@@ -63,5 +63,4 @@ Options:
63
63
  - `--dataset-path`, `-d`: dataset root path
64
64
  - `--output-path`, `-o`: output directory (default: "splits" inside dataset path)
65
65
  - `--ratio`, `-r`: train/val/test ratio (default: 0.8,0.1,0.1)
66
- - `--stratify/--no-stratify`: enable or disable stratified splitting (default: enabled)
67
66
  - `--seed`: random seed (default: 42)
@@ -1,5 +1,5 @@
1
1
  site_name: Argus
2
- site_description: Vision AI dataset toolkit for YOLO and COCO datasets.
2
+ site_description: Vision AI dataset toolkit for YOLO, COCO, and mask datasets.
3
3
  site_author: Argus
4
4
  site_url: https://pirnerjonas.github.io/argus/
5
5
  repo_name: pirnerjonas/argus
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "argus-cv"
3
- version = "1.2.0"
3
+ version = "1.4.0"
4
4
  description = "CLI tool for working with vision AI datasets"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -19,6 +19,7 @@ dev = [
19
19
  "ruff>=0.9.9",
20
20
  "python-semantic-release>=9.0.0",
21
21
  "build>=1.0.0",
22
+ "prek>=0.2.30",
22
23
  ]
23
24
  docs = [
24
25
  "mkdocs-material>=9.5.0",
@@ -1,3 +1,3 @@
1
1
  """Argus - Vision AI dataset toolkit."""
2
2
 
3
- __version__ = "1.2.0"
3
+ __version__ = "1.4.0"