Русская версия: README_ru.md
Image classification project for room-type recognition. Case: Avito, predicting one of 19 room or property photo categories from an image. Primary quality metric: Macro F1. Best single model: ConvNeXt Nano. Final submission solution: an ensemble of ConvNeXt Nano, ResNet50, and ResNet18.
- preprocessing for train, validation, and test splits
- removal of an extra train-only class that is not part of the task or validation set
- class ids normalized to the 0-18 range
- several CNN models trained and compared
- experiments logged to MLflow through DagsHub
- final three-model ensemble assembled
- test submission generated
- Streamlit prototype for checking images interactively
Raw data is expected in this layout:
data/raw/
train_df.csv
val_df.csv
test_df.csv
train_images/
val_images/
test_images/
Preprocessing:
just prepare-data-with-heuristicsProcessed files are saved to:
data/processed/
The project expects Python 3.12, uv, and just.
pip install uv
uv tool install rust-justInstall dependencies:
just install-allInstall Streamlit dependencies:
just install-streamlitExample commands:
just train-resnet18 30
just train-resnet50 30 32
just train-efficientnet-b0 30 32
just train-efficientnet-b1 30 32
just train-densenet121 2 8 5 32
just train-convnext-nano 25 32
just train-convnext-tinyCompare models through MLflow:
just compare-modelsEvaluate the final ensemble:
just eval-ensembleGenerate the submission:
just make-submissionThe file is saved locally:
data/submissions/submission_ensemble.csv
Run the Streamlit interface:
just run-streamlitThe interface lets you upload an image and compare predictions from selected models. It includes the final ensemble as well as individual models.
Experiments are logged to MLflow through DagsHub.
Link:
https://dagshub.com/YashinSergey/room_type_classifier/experiments
Main metrics:
- best_macro_f1
- best_accuracy
- best_train_loss
- best_val_loss
- best_epoch
src/
dataset.py
dataloaders.py
preprocess_data.py
transforms.py
infer_ensemble.py
evaluate_ensemble.py
models/
convnext_nano/
convnext_tiny/
densenet121/
efficientNet/
resnet18/
resnet50/
yolo/
streamlit/
app.py
reports/metrics/
outputs/models/
data/
Model checkpoints are saved to outputs/models/.
Metrics are saved to reports/metrics/.