Instructions to use camstack/camstack-trainer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use camstack/camstack-trainer with ultralytics:
from huggingface_hub import hf_hub_download from ultralytics import YOLO # pick the weights file from this repo's "Files and versions" tab weights = hf_hub_download("camstack/camstack-trainer", "<weights>.pt") model = YOLO(weights) source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
camstack-train 0.1.0: YOLOv9 root detector fine-tune (job.json in, result.json + bundle.tar out)
ebeed67 verified Download camstack_train/_vendor/__init__.py from camstack/camstack-trainer: direct link, hf CLI and curl.
- Browser
- Download file 1.27 kB
-
https://huggingface.co/camstack/camstack-trainer/resolve/main/camstack_train/_vendor/__init__.py
- Command line
-
hf download hf://camstack/camstack-trainer/camstack_train/_vendor/__init__.py
-
curl -L -o __init__.py https://huggingface.co/camstack/camstack-trainer/resolve/main/camstack_train/_vendor/__init__.py
1.27 kB
| """Byte-identical copies of CamStack code the trainer reuses, never edited here. | |
| - ``camstack_eval/`` is ``scripts/eval/camstack_eval/`` (the P5 evaluation | |
| harness): the letterbox + decode + metrics + D739 floor rule the hub's own | |
| measurements use. | |
| - ``pipeline_python/`` is ``packages/addon-pipeline/python/`` (the inference | |
| pool and its postprocessors, tests excluded): the harness imports the pool's | |
| preprocess and decode from it, so the trainer evaluates exactly as a node runs. | |
| ``scripts/check-trainer-vendor.ts`` in camstack/server fails when either copy | |
| drifts from its source. Change the source, then re-copy. | |
| """ | |
| from __future__ import annotations | |
| import sys | |
| from pathlib import Path | |
| #: The folder holding ``inference_pool.py`` and ``postprocessors/``. | |
| PIPELINE_PYTHON = Path(__file__).resolve().parent / "pipeline_python" | |
| def ensure_pipeline_on_path() -> None: | |
| """Put the vendored pool first on ``sys.path``. | |
| The harness's ``pipeline._pipeline()`` imports ``inference_pool`` and | |
| ``postprocessors`` as top-level modules from the repository path; with this | |
| folder already on the path those imports resolve to the vendored copy. | |
| """ | |
| entry = str(PIPELINE_PYTHON) | |
| if entry not in sys.path: | |
| sys.path.insert(0, entry) | |