Skip to content

Repository files navigation

Erhu Annotator

A privacy-first, browser-only tool for cropping scanned music score PDFs/images into clean line-level snippets for music teaching workflows.

Live Demo

https://erhu-annotator.vercel.app

Why This Project Exists

Music teachers and traditional instrument educators often need to prepare score snippets for online lessons, slides, chat messages, practice materials, and course content. Full-page scanned scores are hard to share on small screens, and manual cropping is repetitive.

Erhu Annotator helps users upload PDF or image scores, automatically detect blank spaces between score lines, adjust cut lines manually, preview cropped snippets, and export the results as images.

The project is intentionally small and local-first. It runs in the browser and does not introduce a server upload flow.

Key Features

  • PDF and image score upload
  • Automatic blank-space detection between score lines
  • Manual cutline editing
  • Preview before export
  • Batch download as cropped images
  • Browser-only processing
  • No server upload by this app
  • Static frontend with native ES modules
  • Self-hosted pdf.js and JSZip

Who It Is For

  • Erhu teachers
  • Traditional instrument educators
  • Online music tutors
  • Students preparing practice materials
  • Music course creators
  • People digitizing scanned sheet music

Privacy Model

Files are processed locally in the user's browser by this app. The project does not upload score PDFs or images to a server.

For sensitive materials, users should still choose deployments they trust or self-host the static files, because a hosted web page can be modified by whoever controls that deployment.

Usage

  1. Open the live demo or serve the project locally.
  2. Upload a PDF, JPG, or PNG score file.
  3. Wait for automatic cutline detection.
  4. Adjust cut lines manually if needed.
  5. Preview cropped score snippets.
  6. Download the snippets as images.

Current Limits

  • Recommended: up to 20 PDF pages
  • Warning range: 20 to 40 pages
  • Hard limit: 40 PDF pages
  • Minimum image size: 400 x 400 pixels
  • Best results: clear scans with visible blank space between systems or score lines
  • Photographed, skewed, dark, or multi-column scores may require manual adjustment

Browser Compatibility Notes

The project is designed for modern desktop and mobile browsers. Safari and iOS download behavior still needs more real-world testing, especially for ZIP downloads and older iOS versions.

Screenshots

Screenshots are coming soon. Real demo captures will be added after the current UI is reviewed with representative score files.

Roadmap Summary

  • Add real-world score layout test cases
  • Improve Safari/iOS download fallback
  • Improve mobile cutline dragging
  • Add demo screenshots or GIFs
  • Add English and Chinese documentation
  • Explore skew correction for photographed scores
  • Add export filename templates

See ROADMAP.md for more detail.

Contributing

Contributions are welcome, especially focused bug reports, compatibility checks, UI feedback from music teaching workflows, and documentation improvements.

See CONTRIBUTING.md.

License

MIT. See LICENSE.

About

Privacy-first browser tool for cropping scanned music score PDFs/images into clean line-level snippets for music teaching.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

22 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages