Views
No views yet
ccm/2025-24679-image-dataset to predict survey-derived image labels. Metrics are reported on a held-out test portion of the augmented split and evaluated via external validation on the original split. Artifacts include (1) a zipped native AutoGluon predictor directory (recommended) and (2) a cloudpickled predictor (for convenience).labelautogluon.multimodalautogluon_image_predictor_dir.zip (zipped native predictor directory)autogluon_image_predictor.pkl (cloudpickled predictor)1import pathlib, shutil, zipfile
2import huggingface_hub as hf
3from autogluon.multimodal import MultiModalPredictor
4
5REPO = "ccm/2025-24679-image-autogluon-predictor"
6ZIPNAME = "autogluon_image_predictor_dir.zip"
7
8dest = pathlib.Path("hf_download")
9dest.mkdir(exist_ok=True)
10
11# Download predictor zip
12zip_path = hf.hf_hub_download(
13 repo_id=REPO,
14 filename=ZIPNAME,
15 repo_type="model",
16 local_dir=str(dest),
17 local_dir_use_symlinks=False,
18)
19
20# Extract
21extract_dir = dest / "predictor_dir"
22if extract_dir.exists():
23 shutil.rmtree(extract_dir)
24extract_dir.mkdir(parents=True, exist_ok=True)
25
26with zipfile.ZipFile(zip_path, "r") as zf:
27 zf.extractall(str(extract_dir))
28
29# Load predictor
30predictor = MultiModalPredictor.load(str(extract_dir))
31
32# Example inference
33preds = predictor.predict(test_df[["image"]])