Furniture Classifier

A lightweight custom CNN that classifies indoor furniture images into 4 categories: bed, chair, sofa, table.

Model Details

  • Developed by: Atara Hadad
  • Model type: Custom CNN (image classification)
  • Framework: PyTorch
  • Input: RGB image (resized to 64×64)
  • Output: 4-class probability distribution

Architecture

Block 1: Conv(3→60)   → ReLU → Conv(60→120, s=2) → ReLU → MaxPool(2)
Block 2: Conv(120→80) → ReLU → Conv(80→120)       → ReLU → MaxPool(2)
Block 3: Conv(120→80) → ReLU → Conv(80→10)        → ReLU → MaxPool(2)
Head:    Flatten → Linear(160 → 4)

How to Get Started

import torch
from huggingface_hub import hf_hub_download
from torchvision import transforms
from PIL import Image

weights_path = hf_hub_download(
    repo_id="ArtInSoul/furniture-classifier",
    filename="furniture_classifier.pth"
)

from src.model import FurnitureClassifier
model = FurnitureClassifier(num_classes=4)
model.load_state_dict(torch.load(weights_path, map_location="cpu", weights_only=True))
model.eval()

CLASS_NAMES = ["bed", "chair", "sofa", "table"]
transform = transforms.Compose([transforms.Resize((64, 64)), transforms.ToTensor()])

image = Image.open("your_image.jpg").convert("RGB")
with torch.inference_mode():
    probs = torch.softmax(model(transform(image).unsqueeze(0)).squeeze(), dim=0)

print({CLASS_NAMES[i]: f"{probs[i]:.2%}" for i in range(4)})

Training

Parameter Value
Dataset filnow/furniture-synthetic-dataset-30k (24k train / 6k test)
Optimizer Adam — lr 0.001, weight decay 1e-4
Epochs 10
Batch size 32
Hardware NVIDIA T4 GPU (Google Colab)

Results

Epoch Train Acc Test Acc
1 86.1% 94.4%
5 98.2% 97.6%
6 98.1% 98.5%
10 98.8% 96.8%

Best test accuracy: 98.5% (epoch 6)

Limitations

  • Trained on synthetic images — may perform worse on real-world photos
  • Only covers 4 furniture classes (bed, chair, sofa, table)

Model Card Author

Atara Hadad

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train ArtInSoul/furniture-classifier

Free AI Image Generator No sign-up. Instant results. Open Now