A minimal pipeline to classify rendered views of simple 3D meshes. Includes a Gradio app for uploading a mesh, rendering multiple views, and running a trained classifier.
- Windows 10/11 or macOS/Linux
- Python 3.10+
- GPU optional (PyTorch supports CPU)
python -m venv .venv
# Windows PowerShell
. .venv/Scripts/Activate.ps1
# macOS/Linux
# source .venv/bin/activate
pip install -r requirements.txtpython -m src.appWhat you get:
- Image tab: test the trained model on a single image.
- Image → 3D tab: convert image(s) to 3D mesh.
- Single mode: depth estimation (MiDaS) → mesh (fast).
- Multi-view mode: Open3D point cloud fusion → mesh (better quality, no external deps).
- 3D Model tab: upload
.obj/.ply/.stl/.glb/.gltf, see live preview, render N views, classify.
This repo includes simple classifiers (CNN or ViT-tiny) trained on renderings. Adjust to your data as needed.
# CNN (image size 128)
python -m src.train --data_dir data --out_dir outputs --epochs 5 --model cnn
# ViT-tiny (image size 224)
python -m src.train --data_dir data --out_dir outputs --epochs 5 --model vit_tinyUse the Active Learning tab in the UI:
- Score Unlabeled: point to mesh folder, choose acquisition (entropy/margin), click Score.
- Edit labels in the table.
- Apply Labels: renders meshes into
data/images/<label>/and logs toannotations/labeled.csv. - Retrain with the updated dataset.
If you use this work, please cite:
@software{ReLoop3D,
title={ReLoop3D: 3D Active Learning with Feedback for Machine Learning},
author={Abaryan},
year={2025},
url={https://github.com/r-abaryan/ReLoop-3D}
}