Originally published at amansinghnp.com .
LiPi is a web app that reads the postcode on a handwritten postcard. You upload a photo or hold a card up to a webcam, and LiPi straightens the image, works out which way up it is, finds the ten regions of a postcard with a fine-tuned YOLO11s detector, reads the postcode with OCR and looks up the matching NSW suburb. We connected it to a robotic arm, so the card can go from photograph to tray.
Real mail is full of personal details, so we didn't train on it. The training set is 1,200 synthetic postcards generated in Python, plus 110 real handwritten ones written by volunteers.
1. A handwritten card photographed through the app's camera tab.
2. The same card found, straightened and boxed region by region, with the postcode read as 2450.
3. With the arm connected, the postcode decides which tray the card goes in (section 9).
On validation, the detector reached an mAP50 of 0.995 and an mAP50-95 of about 0.88.…