← back to Watches

THIBAUT-ROOM-SETTINGS-SUMMARY.md

161 lines

# Thibaut Room Settings Scraper - Summary Report

## Overview
Successfully scraped and cataloged room setting images from Thibaut Design website, with automated matching to product SKUs in the catalog.

## Execution Details
- **Script**: `/root/Projects/watches/thibaut-room-settings-scraper.js`
- **Database**: PostgreSQL `dw_unified.thibaut_room_settings`
- **Run Date**: 2026-02-09
- **Collections Processed**: 30 collections
- **Total Images Found**: 2,889 room setting images

## Overall Statistics
| Metric | Count | Percentage |
|--------|-------|------------|
| Total Images | 2,885 | 100% |
| Matched to Products | 971 | 33.66% |
| Unmatched | 1,914 | 66.34% |

## Matching Strategy
1. **Pattern Name Matching**: Extracted pattern names from filenames and matched against `thibaut_catalog.pattern_name`
2. **SKU Matching**: Identified SKU codes (T##### or AT#####) in filenames and matched directly to `thibaut_catalog.mfr_sku`

### Results by Strategy
- Pattern name matching: 45 images (1.56%)
- SKU matching: 926 additional images (32.1%)
- **Combined**: 971 images (33.66%)

## Top Collections by Match Rate

### Highest Match Rates
| Collection | Total Images | Matched | Match % |
|------------|--------------|---------|---------|
| Grasscloth Resource 6 | 179 | 169 | 94.4% |
| Grasscloth Resource 7 | 118 | 107 | 90.7% |
| Stripes & Checks Resource | 107 | 95 | 88.8% |
| Islander | 100 | 84 | 84.0% |
| Bristol by Anna French | 155 | 75 | 48.4% |
| Belvedere by Anna French | 142 | 67 | 47.2% |
| Texture Resource 9 | 258 | 121 | 46.9% |

### Lowest Match Rates (Collections with 0% match)
| Collection | Total Images | Reason |
|------------|--------------|--------|
| Tapes & Trims Volume 5 | 94 | No SKUs in filenames |
| Soleil Textures | 77 | No SKUs in filenames |
| Camelot by Anna French | 76 | No SKUs in filenames |
| Locale Wide Width | 74 | No SKUs in filenames |
| Woven Essentials | 70 | No SKUs in filenames |
| AREAS | 64 | No SKUs in filenames |
| Vegan Leathers | 61 | No SKUs in filenames |
| Companions | 58 | No SKUs in filenames |

## Database Schema

```sql
CREATE TABLE thibaut_room_settings (
  id SERIAL PRIMARY KEY,
  collection_name VARCHAR(255),
  collection_url TEXT,
  image_url TEXT NOT NULL UNIQUE,
  image_filename VARCHAR(500),
  pattern_names TEXT[],              -- Extracted from filename
  mfr_skus TEXT[],                   -- Matched product SKUs
  description TEXT,
  sort_order INTEGER,
  crawled_at TIMESTAMP DEFAULT NOW()
);
```

## Sample Matched Records

### High SKU Count Matches
These room settings show multiple products:

1. **Coraggio-Spring2025-Manilo-Linen-black-Astratto-grey-black.jpg**
   - SKUs: 81 products matched
   - Collection: Coraggio Spring 2025

2. **Graphic-Elements-Yakushima-Metallic-Gold-on-Light-Blue.jpg**
   - SKUs: 73 products matched
   - Collection: Graphic Elements by Armani/Casa

3. **Sojourn-ClaireWP-yellow-navy.jpg**
   - SKUs: 60 products matched
   - Collection: Sojourn

### Direct SKU Matches
Most images have direct SKU matches (1:1):

```
T10382.jpg → {T10382}
T15844.jpg → {T15844}
AT57874.jpg → {AT57874}
```

## Usage Examples

### Query room settings by collection:
```sql
SELECT * FROM thibaut_room_settings
WHERE collection_name = 'Grasscloth Resource 7'
ORDER BY sort_order;
```

### Find all room settings for a specific product:
```sql
SELECT * FROM thibaut_room_settings
WHERE 'T10382' = ANY(mfr_skus);
```

### Get collections with high match rates:
```sql
SELECT
  collection_name,
  COUNT(*) as total,
  COUNT(CASE WHEN array_length(mfr_skus, 1) > 0 THEN 1 END) as matched
FROM thibaut_room_settings
GROUP BY collection_name
HAVING COUNT(CASE WHEN array_length(mfr_skus, 1) > 0 THEN 1 END) > 50
ORDER BY matched DESC;
```

## Recommendations for Improvement

### 1. Improve Unmatched Image Matching
For the 1,914 unmatched images (66%), consider:
- Manual pattern name mapping for collections with descriptive filenames
- OCR on images to extract product SKUs visible in photos
- Collection-level metadata to associate all images in a collection with products in that collection

### 2. Add Image Analysis
Integrate Gemini 3.0 vision to:
- Identify products visible in room settings
- Extract SKUs from wallpaper labels/corners in photos
- Detect patterns and match to catalog images

### 3. Enhanced Metadata
Add fields to `thibaut_room_settings`:
- `room_type` (bedroom, living room, etc.)
- `style_tags` (coastal, traditional, modern, etc.)
- `color_palette` (dominant colors in scene)
- `analyzed_at` (timestamp of AI analysis)

### 4. Automation
Set up cron job to re-scrape monthly for new collections/images:
```bash
0 2 1 * * cd /root/Projects/watches && node thibaut-room-settings-scraper.js >> /var/log/thibaut-scraper.log 2>&1
```

## Files Created
- **Script**: `/root/Projects/watches/thibaut-room-settings-scraper.js`
- **Log**: `/tmp/thibaut-scraper.log`
- **Summary**: `/root/Projects/watches/THIBAUT-ROOM-SETTINGS-SUMMARY.md` (this file)

## Next Steps
1. Review unmatched images to identify additional matching patterns
2. Add API endpoint to serve room settings for Thibaut products
3. Integrate room settings into product display pages
4. Consider implementing image similarity search for "find similar rooms"