Downloads · 30 days
0
cannj/2026-24679-water-image-automl-classifier
2026-24679-water-image-automl-classifier is a image classification model from cannj. Use it when you need a label for an image. It is set up for autogluon. The card lists the license as mit.
This repository contains the best image-classification model selected through a fixed-budget neural-network AutoML search.
Downloads · 30 days
0
Access
Public
Updated Sep 23, 2026
Repo size
11.6 MB
Likes
0
Public
Click a slice to open those files.
.zip5.7 MB · 96%
From the Hugging Face model README
This repository contains the best image-classification model selected through a fixed-budget neural-network AutoML search.
The model predicts whether a scene contains a visibly identifiable body of water.
no_waterwatermobilenetv3_adamw_lr1e4mobilenetv3_small_100This model was created for CMU 24-679 Homework 2 to demonstrate neural-network AutoML.
Appropriate uses include:
The model is not intended for:
The source dataset contains 34 independent original photographs. Parent-aware splitting prevents an original image and its augmented children from crossing splits.
| split | original_images | augmented_images | total_images |
|---|---|---|---|
| train | 23 | 368 | 391 |
| validation | 5 | 0 | 5 |
| test | 6 | 0 | 6 |
The complete set of original images is balanced:
no_waterwaterValidation and test contain only independent, unaugmented original photographs.
The source images were converted to RGB, square-cropped, and resized to 224 x 224 pixels.
The training split includes:
Augmentation was applied only to training parents. Validation and test contain original images only.
The model uses AutoGluon's resize_to_square transform. Backbone-specific normalization is handled by AutoGluon and TIMM.
The notebook verifies that parent_id values are disjoint across training, validation, and test.
This prevents an original photograph from appearing in one split while an augmented version appears in another.
The search compares:
The searched hyperparameters include:
Every trial receives the same:
The maximum planned search budget is 1800 seconds.
The measured total trial time was 218.1 seconds.
| trial_id | backbone | learning_rate | optimizer | weight_decay | validation_accuracy | validation_balanced_accuracy | fit_seconds |
|---|---|---|---|---|---|---|---|
| mobilenetv3_adamw_lr1e4 | mobilenetv3_small_100 | 0.0001 | adamw | 0.0001 | 1 | 1 | 16 |
| resnet18_sgd_lr1e3 | resnet18 | 0.001 | sgd | 0.0001 | 1 | 1 | 26.3 |
| resnet18_adamw_lr1e4 | resnet18 | 0.0001 | adamw | 0.0001 | 1 | 1 | 28.8 |
| mobilenetv3_adamw_lr3e5 | mobilenetv3_small_100 | 3e-05 | adamw | 0.0001 | 0.6 | 0.5 | 48.9 |
| resnet18_adamw_lr3e5 | resnet18 | 3e-05 | adamw | 0.0001 | 0.4 | 0.5 | 31.1 |
| efficientnetb0_adamw_lr3e5 | efficientnet_b0 | 3e-05 | adamw | 0.0001 | 0.4 | 0.5 | 67.1 |
Validation accuracy is the primary selection metric. Validation balanced accuracy is the first tie-breaker, followed by shorter fitting time.
{
"trial_id": "mobilenetv3_adamw_lr1e4",
"backbone": "mobilenetv3_small_100",
"learning_rate": 0.0001,
"optimizer": "adamw",
"weight_decay": 0.0001
}
Best validation accuracy:
1.0000
Best validation balanced accuracy:
1.0000
Training used a maximum of 20 epochs, early-stopping patience of 6 validation checks, and a per-trial limit of 300 seconds.
The repository includes best_model_training_curves.png, which was extracted from the selected trial's TensorBoard scalar logs.
The test split was used only after model selection.
| metric | score |
|---|---|
| Accuracy | 0.6667 |
| Balanced accuracy | 0.6667 |
| Precision | 0.6667 |
| Recall | 0.6667 |
| F1 score | 0.6667 |
The baseline always predicts the majority class among the independent training originals.
| method | accuracy | balanced_accuracy | precision | recall | f1 |
|---|---|---|---|---|---|
| Best AutoML neural network | 0.6667 | 0.6667 | 0.6667 | 0.6667 | 0.6667 |
| Majority-class baseline | 0.5 | 0.5 | 0 | 0 | 0 |
| Quantity | Count |
|---|---|
| True negatives | 2 |
| False positives | 1 |
| False negatives | 1 |
| True positives | 2 |
| source_id | actual_label | predicted_label | water_probability | correct |
|---|---|---|---|---|
| place_water_013 | water | water | 0.9895 | True |
| place_water_014 | water | water | 0.7013 | True |
| place_water_008 | water | no_water | 0 | False |
| place_no_water_015 | no_water | no_water | 0 | True |
| place_no_water_014 | no_water | water | 0.9999 | False |
| place_no_water_000 | no_water | no_water | 0 | True |
The test set contains only 6 independent images.
The reported metrics should be treated as preliminary coursework results because the test set is very small.
The selected model misclassified 2 of the 6 held-out images. Potential causes include small or distant water regions, reflections, blue sky, fountains, unusual lighting, and viewpoints that are not well represented in the training originals.
The model should not be used for safety-critical or high-impact decisions.
Some photographs may contain distant people in public places, but people are not the subject of the task. The model was not designed to identify people, locations, or private information.
The search space is stored in search_space.json. The selected configuration is stored in best_hyperparameters.json.
import zipfile
import pandas as pd
from autogluon.multimodal import MultiModalPredictor
from huggingface_hub import hf_hub_download
repo_id = "cannj/2026-24679-water-image-automl-classifier"
archive_path = hf_hub_download(
repo_id=repo_id,
filename="water_image_automm_predictor.zip",
)
with zipfile.ZipFile(
archive_path,
"r",
) as archive:
archive.extractall(
"water_image_predictor"
)
predictor = MultiModalPredictor.load(
"water_image_predictor"
)
example = pd.DataFrame(
dict(
image=[
"path/to/image.jpg"
]
)
)
prediction = predictor.predict(
example
)
print(prediction)
| File | Description |
|---|---|
water_image_automm_predictor.zip | Reload-tested AutoGluon predictor |
search_results.csv | Results from all search trials |
search_space.json | Complete search space |
best_hyperparameters.json | Selected configuration |
best_fit_summary.json | AutoGluon fit summary |
test_metrics.csv | Held-out test metrics |
baseline_comparison.csv | Model and baseline comparison |
test_predictions.csv | Held-out predictions |
automl_search_results.png | Validation comparison |
test_confusion_matrix.png | Test confusion matrix |
best_model_training_curves.png | Best-trial training curves |
requirements.txt | Reproduction dependencies |
Generative AI tools were used to assist with drafting, organizing, and debugging portions of the notebook code and documentation.
The source dataset is released under the MIT License. This coursework repository is also published under the MIT License. Users should additionally review the terms associated with the selected pretrained TIMM backbone.