source/data/write_signs_to_json.py
source-code data processing json
File Path: src/data/write-signs-to-json.py
Purpose: Utility script to convert Excel labels to JSON format.
Overview
Reads the raw Excel file containing Arabic and English sign labels and exports them to a structured JSON file. This JSON file is then consumed by the application to load class labels.
Process
- Load Excel: Reads
KARSL-502_Labels.xlsxfrom the input directory. - Extract Columns: Selects
Sign-ArabicandSign-English. - Format: Converts to dictionary format.
- Save: Writes to
labels.json. - Verify: Reloads the JSON to verify integrity.
Variables
LABELS_JSON_PATH: Output destination.LOCAL_INPUT_DATA_DIR: Input directory containing the Excel file.
Related Documentation
- constants.py - Defines paths.
- dataloader.py - Uses the generated JSON.
File Location: src/data/write-signs-to-json.py