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 tests/test_vendor.py from camstack/camstack-trainer: direct link, hf CLI and curl.
- Browser
- Download file 854 Bytes
-
https://huggingface.co/camstack/camstack-trainer/resolve/main/tests/test_vendor.py
- Command line
-
hf download hf://camstack/camstack-trainer/tests/test_vendor.py
-
curl -L -o test_vendor.py https://huggingface.co/camstack/camstack-trainer/resolve/main/tests/test_vendor.py
854 Bytes
| """The vendored harness imports the vendored inference pool, not a repo path.""" | |
| from __future__ import annotations | |
| from pathlib import Path | |
| from camstack_train._vendor import PIPELINE_PYTHON, ensure_pipeline_on_path | |
| def test_harness_resolves_the_vendored_pool(): | |
| ensure_pipeline_on_path() | |
| from camstack_train._vendor.camstack_eval.pipeline import _pipeline | |
| pool, postprocessors = _pipeline() | |
| assert Path(pool.__file__).resolve().parent == PIPELINE_PYTHON | |
| assert "yolo" in postprocessors | |
| def test_pool_letterbox_is_grey_114(): | |
| ensure_pipeline_on_path() | |
| import inference_pool | |
| from PIL import Image | |
| arr, scale, pad = inference_pool.letterbox(Image.new("RGB", (64, 32), (0, 0, 0)), 64) | |
| assert arr.shape == (64, 64, 3) and pad == (0, 16) and scale == 1.0 | |
| assert abs(float(arr[0, 0, 0]) - 114 / 255) < 1e-6 | |