Automatic shelf bay detection and isolation for retail shelf photos. Upload a photo, detect the central bay, correct perspective, and mask surrounding products.
A trained EfficientNet-B0 model detects eight boundary points — four for left/right (x-axis) and four for top/bottom (y-axis). This defines the product region as a quadrilateral, which is then warped to a rectangle (perspective correction) and surrounding areas are masked. Works for regular shelves, endcap displays, and checkout displays.
Green lines show detected bay boundaries. Orange lines show top/bottom boundaries. Right side shows the result after perspective correction and blur masking.
Click or drag a shelf photo here
JPG or PNG, any size
Processing...
image file (required) ·
method blur|black|crop ·
correct_perspective true|false ·
correct_horizontal true|false ·
detector cnn|gemini
image file (required) ·
detector cnn|gemini
Process a shelf photo (returns image):
# Blur masking with perspective correction (default) curl -X POST -F "image=@photo.jpg" \ "https://shelfapi.wiggert.nl/api/process-shelf" \ -o result.jpg # Crop to detected bay only curl -X POST -F "image=@photo.jpg" \ "https://shelfapi.wiggert.nl/api/process-shelf?method=crop" \ -o cropped.jpg # Black masking + level shelves curl -X POST -F "image=@photo.jpg" \ "https://shelfapi.wiggert.nl/api/process-shelf?method=black&correct_horizontal=true" \ -o result.jpg # No perspective correction, PNG output curl -X POST -F "image=@photo.jpg" \ "https://shelfapi.wiggert.nl/api/process-shelf?correct_perspective=false&output_format=png" \ -o result.png
Detect boundaries only (returns JSON):
# CNN detector (fast, ~50ms) curl -X POST -F "image=@photo.jpg" \ "https://shelfapi.wiggert.nl/api/detect-meters" # Example response: { "left_top_pct": 12.3, "left_bottom_pct": 14.1, "right_top_pct": 87.5, "right_bottom_pct": 85.9, "left_boundary_pct": 13.2, "right_boundary_pct": 86.7, "top_boundary_pct": 0.0, "bottom_boundary_pct": 100.0, "source": "cnn" }
Dataset statistics:
curl "https://shelfapi.wiggert.nl/api/dataset/stats"
# Returns: {"total_images": 3814, "annotated": 3408, "verified": 880, ...}