Normalize all exported prediction JSON to original input-image coordinates for both legacy TF and PyTorch pipelines, including image size metadata and nulls for hidden keypoints. This also threads the source and annotated image sizes through the app, updates the Gradio SDK version, and removes the extra README demo examples.
Refresh the Gradio app with a DeepLabCut-themed UI, configurable keypoint colormaps and bounding-box colors, and a standalone HTML confidence legend instead of drawing it into the output image. This also improves example defaults for different image sizes, cleans up displayed bodypart names, and makes bbox labels more readable with contrast-aware text.
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.
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.