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