Mykyta3/shelf-spine-web
Shelf Spine Web
Shelf Spine Web is a simple Flask application that performs automatic segmentation and alignment of book spines from a single shelf photo. It uses a pre‑trained EAST model to localise text on each detected spine and generates cropped images and overlay visualisations as output. The web interface accepts a single image and returns annotated results.
How it works
- Upload a photo of a bookshelf via the web form.
- The server segments and straightens each spine using OpenCV.
- A text localisation model (EAST) runs on each spine to detect text regions.
- The results are saved into the
results/andtext_localization_result/directories and displayed on the web page.
Deployment details
This Space is built as a Docker application. The provided Dockerfile clones the upstream Library Inventory Management System repository during the Docker build, installs its dependencies, and applies a small patch to support HEIC/HEIF uploads via the `pillow‑heif` plugin. Cloning the source at build time avoids storing the entire codebase in this repository and ensures you are running the latest version of the application.
Usage
- Open the Space’s App tab.
- Click Upload and choose a JPG/PNG/HEIC image of your bookshelf.
- Wait for processing to finish — this may take a few seconds.
- View the cropped spines and overlayed detections in the results area.
HEIC images are supported via the pillow‑heif plug‑in that is registered automatically at start‑up.
License
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
