-
Notifications
You must be signed in to change notification settings - Fork 0
Jm/init #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Jm/init #1
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
94ad0ba
Split vision API into standalone package
parkjinman98 291147f
transfer vision datasets benchmarks and compilation
parkjinman98 fe9fc49
transfer vision datasets benchmarks and compilation
parkjinman98 a04bfad
Implement standalone CLI for Mobilint Vision with predict, validate, …
parkjinman98 0fd14c2
Refactor OBB terminology and remove legacy aliases across documentati…
parkjinman98 8d3c699
Add target device support for vision compilation and CLI commands
parkjinman98 0f22682
Bump version of mblt-npu-python dependency to 0.0.0 and update packag…
parkjinman98 2943b1f
feat: Add chart, I/O, and summary utilities for benchmark results
parkjinman98 b2de8f2
feat: Update documentation for benchmark and compilation tooling, inc…
parkjinman98 424c0be
feat: Enhance mask processing with ROI prototype masking and add corr…
parkjinman98 1c33e9c
Refactor dataset organization and evaluation logic
parkjinman98 ee2d121
feat: Improve cache directory handling and validation across modules
parkjinman98 13da9a7
feat: Add validation step for package distributions before upload
parkjinman98 767b648
feat: Update semantic loader evaluation to include shape and padding …
parkjinman98 5526cd1
feat: Update Python version to 3.12 and add smoke test for built whee…
parkjinman98 b4e3451
feat: Enhance cache handling and validation; improve resize preproces…
parkjinman98 350dcf8
feat: Refactor evaluation and postprocessing logic; add validation fo…
parkjinman98 7852025
feat: Enhance framework model path resolution for ONNX compatibility …
parkjinman98 01a7dbf
feat: Improve error handling during model disposal and enhance valida…
parkjinman98 33b1218
feat: Enhance normalization logic to support both HWC and CHW formats…
parkjinman98 532cec2
feat: Enhance HTTP error handling in download functions; add validati…
parkjinman98 dcfad10
feat: Enhance core mode handling for NPU boards; update dataset downl…
parkjinman98 a75f8bb
feat: Update COCO dataset organization to use registry download URLs;…
parkjinman98 815f246
feat: Enhance compilation output path resolution and validation; impr…
parkjinman98 65bc705
feat: Enhance validation for DOTAv1 annotations and COCO class IDs; a…
parkjinman98 bbe2b11
fix: validate vision review edge cases
parkjinman98 7905e24
fix: harden validation inputs
parkjinman98 7d6866e
fix: validate vision artifacts and datasets
parkjinman98 09eefb0
fix: validate vision dataset integrity
parkjinman98 5d812bd
fix: update imports for consistency and clarity in postprocessing mod…
parkjinman98 e407cec
fix: validate vision evaluation inputs
parkjinman98 49deb50
fix: harden vision validation boundaries
parkjinman98 fe2ecf7
fix: import RatioPad from letterbox
parkjinman98 bf92255
fix: validate vision artifacts
parkjinman98 a7f87ed
fix: harden vision evaluation inputs
parkjinman98 e1846a1
fix: validate vision dataset evaluators
parkjinman98 7c53025
fix: validate vision evaluation inputs
parkjinman98 7bf6b25
fix: validate vision dataset payloads
parkjinman98 14c8724
fix: harden vision review validation
parkjinman98 89977ab
fix: validate vision evaluation payloads
parkjinman98 c150f2f
fix: harden vision dataset evaluation
parkjinman98 a58723d
fix: validate vision evaluation boundaries
parkjinman98 2ce00fb
fix: validate direct vision evaluation
parkjinman98 065bc47
fix: validate vision ground truth geometry
parkjinman98 ee9150b
fix: validate vision evaluation geometry
parkjinman98 a91d56d
fix: validate vision dataset geometry
parkjinman98 0fd5226
fix: validate cached vision datasets
parkjinman98 c1ff889
fix: harden vision dataset validation
parkjinman98 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| --- | ||
| name: mblt-vision-readme | ||
| description: >- | ||
| Write and maintain mblt-vision-python README documentation, API examples, model references, | ||
| and migration notes. | ||
| --- | ||
|
|
||
| # Mobilint Vision README Writing | ||
|
|
||
| ## Documentation Ownership | ||
|
|
||
| - Keep the root README concise: package purpose, installation, a minimal example, and a link to | ||
| mblt_vision/README.md. | ||
| - Keep the detailed Vision API reference in mblt_vision/README.md. It owns Python construction, | ||
| framework selection, model discovery, model-family tables, output taxonomy, and migration notes. | ||
| - Keep development-tool instructions in `benchmark/README.md` and `compile/README.md`; their | ||
| command scripts live directly in those directories. | ||
| - Document Model Zoo compatibility as migration context only. Do not present Model Zoo CLI, | ||
| validation, dataset organization, or compilation commands as features of this package. | ||
|
|
||
| ## Accuracy Rules | ||
|
|
||
| - Use the public mblt_vision namespace in every executable example. | ||
| - Use model_path for new local-artifact examples. Mention mxq_path and onnx_path only as | ||
| compatibility aliases. | ||
| - State that .mxq and .onnx paths select their framework automatically when framework is omitted. | ||
| Document the explicit-framework conflict error. | ||
| - Describe file_cfg.filename as the MXQ source artifact and same-stem ONNX derivation. Mention | ||
| onnx_filename only for a genuinely different published artifact. | ||
| - Keep post_cfg.dataset terminology precise: it identifies output taxonomy, not just a task. | ||
| - Use obb as the only oriented-bounding-box name in standalone documentation. | ||
|
|
||
| ## Style and Validation | ||
|
|
||
| - Use ATX headings, one blank line between blocks, hyphen lists, concise paragraphs, and | ||
| language-tagged code fences. | ||
| - Prefer generated discovery examples such as list_tasks() and list_models() over manually | ||
| maintained exhaustive name lists. | ||
| - When changing models, package metadata, dependencies, public APIs, or runtime behavior, update | ||
| the relevant README, `AGENTS.md`, and the canonical `mblt-vision` skill if the workflow changes. | ||
| - For documentation-only updates, run git diff --check and verify relative links and headings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| --- | ||
| name: mblt-vision | ||
| description: >- | ||
| Work on the standalone Mobilint Vision Python API, model registry, preprocessing, | ||
| postprocessing, results, runtime integration, and package compatibility contracts. | ||
| --- | ||
|
|
||
| # Mobilint Vision Python | ||
|
|
||
| ## Start Here | ||
|
|
||
| 1. Read AGENTS.md. | ||
| 2. Run git status --short before changing files. | ||
| 3. Read pyproject.toml, the affected package exports, matching model YAML, and relevant tests. | ||
| 4. For a compatibility migration, compare against | ||
| ../mblt-model-zoo/mblt_model_zoo/vision deliberately; do not make it a runtime dependency. | ||
|
|
||
| ## Public API and Model Registry | ||
|
|
||
| - Use mblt_vision.MBLT_Engine and task subpackages as the public surface. | ||
| - Keep mblt_vision as the sole intended import namespace. Use obb as the sole | ||
| oriented-bounding-box task name. | ||
| - Update a task package, top-level lazy exports, and list_models() discovery together. | ||
| - Preserve constructor arguments including model_path, mxq_path, onnx_path, | ||
| model_type, and core-selection options unless intentionally changing the API. | ||
| - Keep .mxq/.onnx suffix routing and explicit-framework conflict errors intact. | ||
| - Every model YAML must define stable file_cfg, pre_cfg, and post_cfg mappings. | ||
| Use file_cfg.filename for MXQ and derive the same-stem ONNX artifact unless | ||
| onnx_filename is required. | ||
| - Every post_cfg declares dataset; resolve output taxonomy from the dataset/task pair. | ||
|
|
||
| ## Processing and Results | ||
|
|
||
| - Reuse the shared letterbox geometry for both preprocessing and inverse coordinate restoration. | ||
| - Detection requires pre_cfg.LetterBox. Keep semantic metadata (img0_shape and | ||
| ratio_pad) through postprocessing so logits restore to the original geometry before | ||
| argmax. | ||
| - Preserve decoded-output layout provenance through NMS. For ambiguous tensors without | ||
| provenance, prioritize channels-first raw-output normalization. | ||
| - Normalize dense depth and semantic outputs before inverse letterboxing. Validate baked semantic | ||
| maps are finite, integral, and in-range before converting them to integer class IDs. | ||
| - Keep result shapes, ordering, coordinates, dtype, and empty-result behavior compatible with | ||
| the Model Zoo reference. | ||
|
|
||
| ## Runtime and Packaging | ||
|
|
||
| - Route NPU runtime access through mblt-npu-python; do not copy backend classes into Vision. | ||
| - Use the shared `ONNXBackend` for ONNX inference. Keep ONNX Runtime optional and lazy-imported; | ||
| raise a specific installation error when it is requested but unavailable. | ||
| - Normalize legacy `aries` and `regulus` target values through mblt-npu-python. MXQ artifacts and | ||
| compilation metadata must resolve only from the selected board folder, never a core-mode path or | ||
| a fallback board folder. | ||
| - Include model and dataset YAML files as package data. Build a wheel and inspect it after | ||
| changing metadata or assets. | ||
| - Do not require native bindings, GStreamer, hardware, downloaded models, or caches for normal | ||
| imports and unit tests. | ||
|
|
||
| ## Tooling Layout and Documentation | ||
|
|
||
| - Keep all executable benchmark scripts directly in `benchmark/`; reusable reporting helpers belong | ||
| in `mblt_vision.benchmark`. | ||
| - Keep all executable compile scripts and the compile guide directly in `compile/`. | ||
| - Use `~/.mblt_model_zoo` as the shared artifact and dataset cache root. Keep organizer defaults, | ||
| dataset registry YAMLs, compilation defaults, and documented commands aligned to it. | ||
| - Keep imports free of cache-directory creation, write probes, downloads, and temporary-directory | ||
| allocation; resolve a writable cache only when an artifact or compilation output needs it. | ||
| - Make fallback caches stable, private, and user-owned. Never use a new temporary directory per | ||
| process or trust a shared fallback cache without validating it. | ||
| - For every significant package change (public API, CLI, runtime/dependency, artifact layout, or | ||
| tooling structure), update `AGENTS.md`, this canonical skill, the Claude skill entry point when | ||
| its workflow changes, and the relevant README in the same change. | ||
|
|
||
| ## Validate Proportionately | ||
|
|
||
| - Begin with the smallest relevant test file or -k selection. | ||
| - Add deterministic differential tests for Model Zoo compatibility, including invalid inputs, | ||
| empty detections, threshold boundaries, task discovery, and image geometry. | ||
| - Run pre-commit run --files <touched files> when available. For docs, run | ||
| git diff --check. | ||
| - Report unavailable hardware, downloads, or optional dependencies rather than weakening tests. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| --- | ||
| name: mblt-vision-readme | ||
| description: Write and maintain documentation for the standalone Mobilint Vision Python package. | ||
| --- | ||
|
|
||
| # Mobilint Vision README Writing | ||
|
|
||
| Read and follow the canonical skill at | ||
| ../../../.agents/skills/mblt-vision-readme/SKILL.md. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| --- | ||
| name: mblt-vision | ||
| description: Work effectively on the standalone Mobilint Vision Python API and model registry. | ||
| --- | ||
|
|
||
| # Mobilint Vision Python | ||
|
|
||
| Read and follow the canonical skill at | ||
| ../../../.agents/skills/mblt-vision/SKILL.md. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| name: Publish to PyPI | ||
|
|
||
| on: | ||
| release: | ||
| types: [published] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build distribution 🛠️ | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: '3.12' | ||
|
|
||
| - name: Install build dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| python -m pip install build twine | ||
|
|
||
| - name: Build package | ||
| run: python -m build | ||
|
parkjinman98 marked this conversation as resolved.
parkjinman98 marked this conversation as resolved.
|
||
|
|
||
| - name: Validate distributions | ||
| run: python -m twine check dist/* | ||
|
|
||
| - name: Verify wheel package contents | ||
| run: | | ||
| python -c "from pathlib import Path; from zipfile import ZipFile; wheel, = Path('dist').glob('*.whl'); archive = ZipFile(wheel); assert 'mblt_vision/py.typed' in archive.namelist(), 'Wheel is missing mblt_vision/py.typed'" | ||
|
|
||
| - name: Upload built distributions | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: python-package-distributions | ||
| path: dist/ | ||
|
|
||
| publish-to-testpypi: | ||
| name: Publish to TestPyPI 🧪 | ||
| needs: [build] | ||
| runs-on: ubuntu-latest | ||
| environment: testpypi | ||
| permissions: | ||
| id-token: write | ||
| steps: | ||
| - name: Download distribution artifacts | ||
| uses: actions/download-artifact@v7 | ||
| with: | ||
| name: python-package-distributions | ||
| path: dist/ | ||
|
|
||
| - name: Publish to TestPyPI | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||
| with: | ||
| repository-url: https://test.pypi.org/legacy/ | ||
|
|
||
| publish-to-pypi: | ||
| name: Publish to PyPI 🚀 | ||
| needs: [build, publish-to-testpypi] | ||
| runs-on: ubuntu-latest | ||
| environment: pypi | ||
| permissions: | ||
| id-token: write | ||
| steps: | ||
| - name: Download distribution artifacts | ||
| uses: actions/download-artifact@v7 | ||
| with: | ||
| name: python-package-distributions | ||
| path: dist/ | ||
|
|
||
| - name: Publish to PyPI | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # Python | ||
| __pycache__/ | ||
| *.py[cod] | ||
| *$py.class | ||
| .Python | ||
| .venv/ | ||
| venv/ | ||
| env/ | ||
| .env | ||
| .pytest_cache/ | ||
| .mypy_cache/ | ||
| .ruff_cache/ | ||
| .coverage | ||
| coverage.xml | ||
| htmlcov/ | ||
| build/ | ||
| dist/ | ||
| *.egg-info/ | ||
|
|
||
| # C/C++ build artifacts | ||
| build/ | ||
| cmake-build-*/ | ||
| CMakeFiles/ | ||
| CMakeCache.txt | ||
| cmake_install.cmake | ||
| compile_commands.json | ||
| *.o | ||
| *.obj | ||
| *.a | ||
| *.lib | ||
| *.so | ||
| *.dylib | ||
| *.dll | ||
| *.exe | ||
| *.out | ||
|
|
||
| # IDE and OS files | ||
| .idea/ | ||
| .vscode/ | ||
| *.swp | ||
| *.swo | ||
| .DS_Store | ||
| Thumbs.db | ||
|
|
||
| *.zip | ||
| *.tar.gz | ||
| *.egg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| repos: | ||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| rev: v0.6.9 | ||
| hooks: | ||
| - id: ruff | ||
| args: [--fix] | ||
| - id: ruff-format | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.