SPAC3D represents a premium, full-stack artificial intelligence architecture designed to comprehensively transform two-dimensional room photography into actionable interior design data. By leveraging state-of-the-art open-vocabulary machine learning and computer vision methodologies, SPAC3D successfully localizes specific furniture elements, classifies holistic architectural styles, and establishes a direct transactional bridge to global e-commerce marketplaces via programmatic affiliate integrations. This initiative robustly formalizes the nexus between deep learning-based image analysis and practical, data-driven consumer retail applications.
The primary objective of the SPAC3D platform is to transcend traditional, pre-defined bounding box object detection paradigms. By utilizing dynamically generated embeddings, the platform enables nuanced detection and contextual understanding of interior environments. This facilitates three primary capabilities:
- Granular Instance Detection: Localizing complex, niche objects within an interior space without requiring explicit retraining on predetermined classes.
- Holistic Thematic Analysis: Aggregating localized instances and global spatial features to ascertain the overarching aesthetic design philosophy of a given space.
- Contextual E-Commerce Synchronization: Mapping extracted features into a vectorized semantic space to query and highly curated, aesthetically congruent product recommendations.
Unlike canonical object detection algorithms strictly bounded by datasets such as COCO, SPAC3D harnesses the advanced YOLO-World architecture. This zero-shot detection framework operates via open-vocabulary natural language prompts, allowing for highly sophisticated semantic localization of interior elements. The detection capabilities are strategically divided into the following strata:
- Primary Structural Furnishings: Comprehensive identification of sofas, dining consoles, bed frames, primary cabinetry, and structurally significant spatial anchors.
- Secondary Accents and Decorative Elements: Granular detection of micro-elements including ambient lighting fixtures (lamps), tactile additions (cushions, rugs), and reflective surfaces (mirrors).
- Fundamental Architectural Artifacts: Structural integrations such as built-in shelving units, wall-mounted drawer modules, and stationary sideboards.
By suppressing redundant bounding boxes through a proprietary Intersection over Area (IoA) algorithmic post-processing layer, SPAC3D strictly curates the detected entities, ensuring maximal precision for downstream recommendation algorithms.
The aesthetic classification engine heavily relies on a multi-stage pipeline designed to process both macro and micro spatial characteristics. The system classifies the input environment into one of six rigorously defined interior design taxonomy classes: Minimalist, Modern, Bohemian, Industrial, Scandinavian, and Traditional.
The methodological approach encompasses:
- Global Feature Extraction (ResNet50): A foundational ResNet50 convolutional neural network acts as the primary feature extractor. Through Global Average Pooling, the architectural input is translated into a dense, 2048-dimensional feature vector, encapsulating complex spatial geometries and textural gradients.
- Dimensionality Reduction (PCA): To optimize computational throughput and mitigate the "curse of dimensionality," Principal Component Analysis (PCA) maps the 2048-dimensional representation into a dense, 32-dimensional subspace, preserving maximum informational variance.
- Ensemble Classification (kNN and SVM): A bifurcated classification strategy utilizing both k-Nearest Neighbors (kNN) and Support Vector Machines (SVM). This hybrid configuration ensures a robust, probabilistic confidence interval when assigning the terminal stylistic label.
The output of the upstream visual intelligence pipeline serves directly as the input parameters for the recommendation engine.
- Semantic Vector Matching: When a specific furnishing is selected by the end-user, its distinct semantic payload is cross-referenced using optimized cosine similarity metrics against a heavily curated digital furniture catalog mathematically mapped to the same multi-dimensional subspace.
- Affiliate Network Bridging: Each generated recommendation embeds secure routing protocols for global e-commerce platforms. This ensures that abstract spatial analysis natively terminates in actionable, curated retail procurement loops structurally bound to the overarching design aesthetic.
The user interface layer is architected as a high-performance, single-page application utilizing React and Vite. It is strictly engineered to maintain zero-latency responsiveness while dynamically mapping the visual tone to the output of the machine learning backend.
- Algorithmic Thematic Synchronization: The application utilizes an event-driven architecture to dynamically inject CSS variables corresponding to the identified stylistic classification. This yields real-time state shifts in the application's glassmorphism UI components, establishing visual cohesion between the user interface and the analyzed image.
- Non-Blocking Spatial Interactions: Custom bounding box overlays act as interactive topographical layers over the analyzed image. By strictly managing the Document Object Model (DOM) rendering cycles, the system guarantees an instantaneous visual response upon user interaction, surfacing associated contextual recommendations asynchronously.
The project is structured according to stringent separation of concerns, maintaining a modular architecture suitable for CI/CD pipelines.
spac3d/
├── backend/
│ ├── main.py # FastAPI Layer: High-performance asynchronous endpoint definition
│ ├── models/
│ │ ├── fast_train.py # Algorithmic Training Module: High-throughput kNN/SVM hyperparameter optimization
│ │ └── *.pkl # Serialized Weights: Compiled models prepared for instantaneous inference load
│ ├── utils/
│ │ ├── detection.py # Inference Logic: YOLO-World execution and specialized geometric suppression (IoA)
│ │ └── pipeline.py # Recommendation Logic: Vector embeddings and localized aesthetic similarity analysis
│ └── data/
│ └── furniture.json # Datastore: Indexed product catalogue for vector-matching endpoints
├── frontend/
│ ├── src/
│ │ ├── App.tsx # Presentation Layer: Global state management and component rendering protocols
│ │ └── index.css # Styling Directives: Responsive, mathematical scaling frameworks
│ └── package.json # Dependency Management: Centralized Node.js package configurations and operational schema
├── add_decor.py # Pre-Processing Toolkit: Auxiliary script for synthetic, style-based data generation
├── docker-compose.yml # Orchestration Layer: Comprehensive container abstraction matrix
└── README.md # Structural DocumentationDependencies listed in backend/requirements.txt:
fastapiuvicorn[standard]python-multipartultralyticstorchtorchvisionscikit-learnnumpyPillowscipy
Core dependencies from frontend/package.json:
react(^19.2.4)react-dom(^19.2.4)vite(^8.0.4)typescript(~6.0.2)
To guarantee deterministic behavior across varied compute environments, containerized execution via Docker is prioritized.
Execution of the orchestrated container network will inherently resolve dependencies, initialize required communication ports, and mount corresponding volumes.
docker-compose up --build- Frontend Presentation Port: Accessible locally via
http://localhost:3000 - Backend Interface (FastAPI Swagger Docs): Accessible locally via
http://localhost:8000/docs
For deep analytical debugging or progressive development, the subsystems may be initialized locally.
cd backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reloadcd frontend
npm install
npm run dev- Initial Weight Acquisition Mechanism: Upon executing the initial inference sequence, the system relies on dynamic fetching routines to download non-distributed model artifacts, most notably
yolov8s-world.pt(circa 45MB payload size). - Hardware Execution Paradigms: The inference pipeline relies on localized multi-processing and executes robustly on conventional Central Processing Units (CPUs) via optimized parallelization. The architecture inherently supports offloading matrices to Tensor Cores or CUDA pipelines where deterministic GPU hardware is actively exposed to the Python runtime limits.
- Underlying Dataset Provenance: The multi-classifier model artifacts are heavily indebted to feature maps derived from the Massachusetts Institute of Technology (MIT) Indoor Scenes taxonomy dataset, algorithmically constrained into the six prioritized project styles to maintain the integrity of spatial classification boundary lines.
Proprietary Integration Framework — Developed exclusively for the technical advancement of SPAC3D Interior Intelligence Architectures. Restricted dissemination mapping applies to core logic controllers.