Pre-downloads the default models used by Image.Classification,
Image.Segmentation, Image.Detection, Image.Background,
Image.Captioning, and Image.ZeroShot so that first-call latency
is eliminated and the application can run fully offline.
By default, every category's models are fetched. Pass one or more
of --classify, --segment, --detect, --background,
--caption, --zero-shot to limit the scope. Any category whose
optional dependency is not loaded is skipped with a notice rather
than treated as an error.
ONNX weights for segmentation and detection are stored under the
ImageVision.ModelCache cache root (see that module for cache
configuration). Bumblebee classifier and embedder weights are
stored under Bumblebee's own HuggingFace cache (controlled by
BUMBLEBEE_CACHE_DIR / the standard HF cache env vars).
Usage
mix image_vision.download_models
mix image_vision.download_models --classify
mix image_vision.download_models --segment --detect
mix image_vision.download_models --background --caption --zero-shotConfiguration
The task respects user overrides for the Bumblebee classifier and embedder:
config :image_vision, :classifier,
model: {:hf, "facebook/convnext-large-224-22k-1k"},
featurizer: {:hf, "facebook/convnext-large-224-22k-1k"}Configured values are downloaded; unset values fall back to the library defaults.
Options
--classifydownloads the classifier and embedder Bumblebee models. Requires:bumblebeeand:nx.--segmentdownloads the SAM 2 and DETR-panoptic ONNX weights. Requires:ortex.--detectdownloads the RT-DETR ONNX weights. Requires:ortex.--backgrounddownloads the BiRefNet lite ONNX weights for background removal. Requires:ortex.--captiondownloads the BLIP image-captioning model, featurizer, tokenizer, and generation config. Requires:bumblebee.--zero-shotdownloads the CLIP model, featurizer, and tokenizer for zero-shot classification. Requires:bumblebee.