Spatial Annotation Mapping Platform for Alignment & Heading
A general-purpose image annotation tool with support for directional labeling.
S.A.M.P.A.H. is a lightweight image labeling application built for annotating not just the presence of objects — but their orientation. It enables annotators to label an object's heading direction using an 8D compass-style system, in addition to bounding boxes or segmentation.
Whether you're labeling vehicles, humans, animals, or other directional objects, S.A.M.P.A.H. provides an intuitive interface to mark both position and direction with precision.
S.A.M.P.A.H. introduces a novel directional labeling system based on 8 compass directions:
N
NW NE
W ● E
SW SE
S
Each object annotation can be tagged with one of the following directions:
- N (North) back B
- NE (Northeast) Back-Right BR
- E (East) right R
- SE (Southeast) front-right FR
- S (South) front F
- SW (Southwest) front-left FL
- W (West) left L
- NW (Northwest) back-left BL
This is ideal for tasks involving:
- Object orientation (e.g., which way a person or vehicle is facing)
- Motion prediction
- Pose estimation (simplified)
- 📦 Label images with bounding boxes or masks
- 🧭 Add an 8-direction compass heading to each object
- 🧠 Supports class-based object labeling
- 💾 Saves annotations in Pascal VOC format (XML), with added direction tag
- 🌐 Simple Flask + HTML interface — run locally with no installation overhead
S.A.M.P.A.H. saves annotations in a modified Pascal VOC XML format, with an extra <direction> tag inside each object block:
<object>
<name>front</name>
<bndbox>
<xmin>123</xmin>
<ymin>85</ymin>
<xmax>200</xmax>
<ymax>160</ymax>
</bndbox>
</object>git clone https://github.com/yourname/sampah
cd sampah
pip install -r requirements.txt
python app.pyThen, open your browser to http://127.0.0.1:5000.
pip install sampah sampah
Then, open your browser to http://127.0.0.1:5000.
- Multi-object tracking
- Custom compass (16D ~ Deg)
- Export to COCO format with direction support
- Integrated model-assisted annotation (YOLO/ViT)
Built by [Your Name]
For questions, email [you@example.com]