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/errors.py from camstack/camstack-trainer: direct link, hf CLI and curl.
- Browser
- Download file 1.02 kB
-
https://huggingface.co/camstack/camstack-trainer/resolve/main/camstack_train/errors.py
- Command line
-
hf download hf://camstack/camstack-trainer/camstack_train/errors.py
-
curl -L -o errors.py https://huggingface.co/camstack/camstack-trainer/resolve/main/camstack_train/errors.py
1.02 kB
| """The trainer's one failure type and its exit codes.""" | |
| from __future__ import annotations | |
| #: Process exit codes the hub reads. | |
| EXIT_OK = 0 | |
| EXIT_BAD_SPEC = 64 | |
| EXIT_DATASET = 65 | |
| EXIT_INTERNAL = 70 | |
| class TrainerError(Exception): | |
| """A failure with a stage, a stable code and an exit code. | |
| ``message`` is shown to the operator: it never names a frame path or a | |
| camera, only counts and codes. | |
| """ | |
| def __init__(self, stage: str, code: str, message: str, exit_code: int) -> None: | |
| super().__init__(message) | |
| self.stage = stage | |
| self.code = code | |
| self.message = message | |
| self.exit_code = exit_code | |
| def as_dict(self) -> dict[str, str]: | |
| return {"stage": self.stage, "code": self.code, "message": self.message} | |
| def spec_error(code: str, message: str) -> TrainerError: | |
| return TrainerError("prepare", code, message, EXIT_BAD_SPEC) | |
| def dataset_error(code: str, message: str) -> TrainerError: | |
| return TrainerError("prepare", code, message, EXIT_DATASET) | |