Downloads · 30 days
0
OmarK211/2026-24679-image-autogluon-stair-predictor
2026-24679-image-autogluon-stair-predictor is a image classification model from OmarK211. Use it when you need a label for an image. It is set up for autogluon.
This model classifies photographs as non-stairs (0) or stairs (1). It fine-tunes a pretrained ResNet-18 with AutoGluon MultiModal. This is a homework assignment.
Downloads · 30 days
0
Access
Public
Updated Sep 23, 2026
Repo size
86.5 MB
Likes
0
Public
Click a slice to open those files.
.pkl44.9 MB · 52%
From the Hugging Face model README
This model classifies photographs as non-stairs (0) or stairs (1). It fine-tunes a pretrained ResNet-18 with AutoGluon MultiModal. This is a homework assignment.
Supply a pandas DataFrame with an image column containing local image-file paths. The predictor reads the pixels; labels and provenance fields are not inputs. predict() returns 0 or 1, and predict_proba() returns class probabilities.
| Label | Meaning |
|---|---|
0 | No Stairs |
1 | Stairs |
The dataset provides 224 × 224 RGB images, with EXIF orientation applied, aspect ratio preserved, and gray padding. The saved model then applies its own shorter-side resize, center crop, and ImageNet normalization. Use the same preparation for comparable results on new photographs.
Source: Stairs Dataset.
| Partition | Original photos | Stored variants | Total | No Stairs / Stairs |
|---|---|---|---|---|
| Training | 22 | 352 | 374 | 337 / 337 |
| Validation | 5 | 0 | 5 | 2 / 3 |
| Test | 5 | 0 | 5 | 3 / 2 |
Original photos were split with class stratification before augmentation. Each training original contributes four separately generated variants: brightness, rotation, contrast, and Gaussian blur. The dataset card documents the actual transform strengths. Related variants stay in training.
Labels come from the survey's upload question/folder and were not independently verified from pixels.
| Training setting | Recorded value |
|---|---|
| Framework | AutoGluon MultiModal 1.6.1 |
| Image backbone | timm resnet18, pretrained, fine-tuned for two classes |
| Parameters | Approximately 11.2 million; all trainable |
| Preset and branch | medium_quality; model.names = ["timm_image"] |
| Selection metric | Validation accuracy |
| Fit budget and seed | 300 seconds; 24679 |
| Optimizer | AdamW; learning rate 0.0004; weight decay 0.001 |
| Learning-rate schedule | Cosine decay with layerwise decay |
| Training image processing | Resize, center crop, and TrivialAugment |
| Checkpoint selection | Up to three checkpoints, greedy-soup averaging |
| Recorded environment | Linux; Python 3.13.15; |
The notebook reports 57.38 seconds of training and final validation accuracy 0.6 (3/5). The 300 seconds above is the configured budget, not the measured duration. The saved configuration uses mixed precision and does not enable deterministic execution; a seed alone does not guarantee an identical rerun.
| Test metric | Value |
|---|---|
| Accuracy | 0.8 (4/5) |
| F1 | 0.781 |
Confusion matrix: rows are actual labels; columns are predicted labels.
| Actual / predicted | No Stairs | Stairs |
|---|---|---|
| No Stairs | 3 | 0 |
| Stairs | 1 | 1 |
One staircase photograph was classified as no stairs. Each changed prediction moves accuracy by about 20 percentage points.
Use a compatible AutoGluon environment, preferably matching the recorded Python and library versions. Download the full native archive to restore the configuration, preprocessing, and checkpoint together. Both the native loader and the separate pickle use serialized Python objects, so load only trusted artifacts. See the AutoGluon loading documentation.
python -m pip install "autogluon.multimodal==1.6.1" "datasets==5.0.1" huggingface_hub
from pathlib import Path
import zipfile
import pandas as pd
from huggingface_hub import hf_hub_download
from datasets import load_dataset
from autogluon.multimodal import MultiModalPredictor
archive = hf_hub_download(
"OmarK211/2026-24679-image-autogluon-stair-predictor",
"autogluon_image_predictor_dir.zip",
revision=MODEL_REVISION,
)
# Load the complete native directory, including model.ckpt and preprocessing.
model_dir = Path(f"bin_model_{MODEL_REVISION[:8]}")
model_dir.mkdir(exist_ok=True)
with zipfile.ZipFile(archive) as bundle:
bundle.extractall(model_dir)
predictor = MultiModalPredictor.load(str(model_dir))
# Materialize one already-prepared test image for a reproducible demonstration.
test = load_dataset(
"OmarK211/2026-24679-image-autogluon-stair-predictor", revision=DATA_REVISION, split="test"
)
image_path = model_dir / "example_stair.png"
test[0]["image"].convert("RGB").save(image_path)
inputs = pd.DataFrame({"image": [str(image_path.resolve())]})
# Classify the pixels without providing the true label to the predictor.
labels = predictor.predict(inputs)
print(labels.map({0: "no_stairs", 1: "stairs"}))
print(predictor.predict_proba(inputs)) # Columns 0 and 1 correspond to the labels above.
Maintainer: OmarK211. The repository had no model license specified when this card was added; this card does not assign one. Refer to the dataset card for image collection, consent, and reuse limitations. Removing camera metadata does not remove identifying details visible in an image.