Introduce a `pyproject.toml` with project metadata, runtime dependencies, and Ruff/pyproject-fmt settings, and add a matching `.pre-commit-config.yaml` to enforce basic file checks, pyproject validation, and formatting/linting. Also normalize `.gitignore` with a trailing newline.
Extend the app and UI to surface keypoint confidence more clearly. This adds optional confidence-based coloring with a legend, an annotated image download, and a confidence table sorted by lowest scores first. It also preloads the default SuperAnimal PyTorch model in a background thread so the first request is less likely to block on model download.
Switch the UI from `gr.Interface` to a `gr.Blocks` layout with an explicit Run button, lazy-cached examples, and serialized queueing to avoid startup/download issues and PyTorch concurrency problems. The MegaDetector selector is now shown only for non-PyTorch backends, display settings are grouped under an accordion, and the bundled examples were cleaned up and expanded.
Introduce a PyTorch inference path for SuperAnimal models, including backend selection in the UI, cached pose/detector runners, and JSON export of predictions. The legacy TensorFlow flow now maps model names separately from local directories, and MegaDetector device selection was corrected for yolov5 loading. The DeepLabCut dependency is also pinned to 3.0.2 to match the new backend integration.
Carry the filtered MegaDetector bounding boxes through cropping, visualization, and JSON export so pose results stay matched to the correct animal detections. This also removes the obsolete save_results module and hardens DLC inference by handling empty crop lists, converting crop channel order for DLCLive, and masking low-confidence keypoints with NaN.
Skip torch.hub GitHub API validation (fixes #10) (#12)β