filnow/furniture-synthetic-dataset-30k
Viewer β’ Updated β’ 31k β’ 16
A lightweight custom CNN that classifies indoor furniture images into 4 categories: bed, chair, sofa, table.
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)
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)})
| 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) |
| 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)
Atara Hadad