Research Project - Crosswalk Detection and Timing Optimization using Computer Vision
This research addresses a critical pedestrian safety issue in South Korea: elderly pedestrians walk significantly slower (0.54 m/s) than the standard timing assumes (1.0 m/s), leading to dangerous situations at crosswalks.
Our solution uses overhead CCTV cameras to:
- Detect crosswalk mask regions in real-time
- Track pedestrian crossing speeds
- Dynamically adjust signal timing for safer crossing
| Phase | Objective | Status |
|---|---|---|
| Phase 1 β Crosswalk Segmentation | Build robust crosswalk detection from FPVβCCTV | β COMPLETE |
| Phase 2 β Pedestrian Tracking | Detect and track pedestrians, estimate walking speed | β³ Up Next |
| Phase 3 β Signal Control | Adaptive timing control and safety validation | β³ Planned |
| Phase 4 β Deployment | Implement Jetson-based prototype | β³ Planned |
We successfully adapted a first-person view (FPV) crosswalk segmentation model to overhead CCTV viewpoint using semi-supervised learning with minimal manual annotation.
β¨ Only 241 manually labeled CCTV images
β¨ Leveraged 5,926 unlabeled AI-Hub images via pseudo-labeling
β¨ 5Γ data efficiency compared to fully supervised approach
β¨ Realtime capable: 77 FPS on 512Γ512 resolution
- Model: U-Net with ResNet34 encoder
- Dataset: 3,300 FPV crosswalk images
- Performance: 93.05% IoU on FPV test set
- Status: β Complete
- Model: DeepLabV3 + ResNet50 (initialized from FPV weights)
- Dataset: 241 manually labeled CCTV images (201 train / 40 val)
- Training: 30 epochs, Dice+BCE loss, AdamW optimizer (lr=1e-4)
- Result: 88.9% IoU
- Approach: Confidence-based pseudo-labeling
- Pipeline:
- Generate predictions on 5,926 unlabeled AI-Hub images
- Score confidence (prediction certainty + geometric validation)
- Select top 1,000 high-confidence pseudo-labels (threshold: 0.7)
- Retrain on combined dataset (241 labeled + 1,000 pseudo)
- Training: 20 epochs, lower learning rate (lr=5e-5)
- Result: 98.5% IoU β
| Metric | Iteration 1 | Iteration 2 | Improvement |
|---|---|---|---|
| Val IoU | 88.9% | 98.5% | +9.6% |
| Train IoU | 97.0% | 98.8% | +1.8% |
| Dataset Size | 241 | 1,241 | 5Γ larger |
| Inference Speed | 77 FPS | 77 FPS | Maintained |
FPV Model (93% IoU)
β
Load Pre-trained Weights
β
Fine-tune on 241 CCTV images β Iteration 1 (88.9% IoU)
β
Generate Pseudo-Labels on 5,926 unlabeled images
β
Filter Top-1000 High-Confidence (Score > 0.7)
β
Retrain on Combined Dataset β Iteration 2 (98.5% IoU)
- Average confidence score: 0.976
- Geometric validation: 1.0 (perfect for top-1000)
- Top score: 0.988
- Model: DeepLabV3 with ResNet50 backbone
- Input: 512Γ512 RGB images
- Output: Binary segmentation mask
- Parameters: ~39M
- Inference speed: 77 FPS (exceeds 30 FPS requirement)
Key Observations:
- Stable convergence after 20 epochs
- Best validation IoU at epoch 28
- Minimal overfitting (train: 97.0%, val: 88.9%)
Key Observations:
- Rapid improvement with pseudo-labels
- Best validation IoU at epoch 19
- Strong generalization (train: 98.8%, val: 98.5%)
Visualization showing ground truth (green) vs. model predictions (red) on validation samples. The model achieves near-perfect alignment with manual annotations.
Top 9 pseudo-labeled samples showing high prediction confidence and accurate crosswalk detection across various weather conditions and camera angles.
crosswalk-cctv/
βββ notebooks/
β βββ 01_extract_frames.ipynb # Video to frames extraction
β βββ 02_prepare_fpv.ipynb # FPV dataset preparation
β βββ 03_train_stage1_fpv.ipynb # Stage 1: U-Net training on FPV
β βββ cctv_finetuning.ipynb # Stage 2: Transfer learning + pseudo-labeling
βββ outputs/
β βββ stage1_fpv/
β β βββ best_model.pth # FPV baseline weights
β β βββ results.json # Training metrics
β β βββ training_history.png # Loss/IoU curves
β βββ stage2_cctv/
β βββ best_model_cctv.pth # Iteration 1 weights
β βββ best_model_cctv_iter2.pth # Iteration 2 weights (final)
β βββ experiment_summary.json # Complete metrics
β βββ training_history.png # Iteration 1 curves
β βββ final_results.png # Both iterations comparison
β βββ predictions_visualization.png
β βββ pseudo_labels/
β βββ iteration_1/
β βββ images/ # 1,000 pseudo-labeled images
β βββ masks/ # Generated masks
β βββ metadata.json # Confidence scores
βββ data/ # (not in repo - too large)
β βββ fpv_processed/ # 3,300 FPV samples
β βββ finetuning/ # 241 labeled CCTV samples
β βββ AI-hub_dataset/ # 5,926 unlabeled CCTV images
βββ requirements.txt # Python dependencies
βββ environment.yml # Conda environment
βββ README.md # This file
# Create conda environment
conda env create -f environment.yml
conda activate crosswalk
# Or use pip
pip install -r requirements.txtStep 1: Train FPV Baseline (Stage 1)
jupyter notebook notebooks/03_train_stage1_fpv.ipynbStep 2: CCTV Adaptation (Stage 2)
jupyter notebook notebooks/cctv_finetuning.ipynbThis notebook runs the complete two-iteration pipeline:
- Iteration 1: Fine-tuning on 241 labeled CCTV images
- Pseudo-labeling: Generate and filter high-confidence labels
- Iteration 2: Retrain on combined dataset
{
"model": "U-Net + ResNet34",
"dataset_size": 3300,
"final_val_iou": 0.9305,
"best_epoch": 20,
"total_epochs": 30
}Iteration 1 (Fine-Tuning)
{
"model": "DeepLabV3 + ResNet50",
"labeled_samples": 241,
"train_samples": 201,
"val_samples": 40,
"epochs": 30,
"best_val_iou": 0.8891,
"final_train_iou": 0.9702
}Pseudo-Labeling
{
"total_unlabeled": 5926,
"generated_labels": 5926,
"high_confidence_labels": 1000,
"confidence_threshold": 0.7,
"top_score": 0.988,
"average_score": 0.976
}Iteration 2 (Semi-Supervised)
{
"combined_dataset": 1241,
"train_samples": 850,
"val_samples": 150,
"epochs": 20,
"best_val_iou": 0.9852,
"final_train_iou": 0.9884,
"improvement_over_iter1": 0.0961
}Inference Performance
{
"resolution": "512x512",
"inference_time_ms": 12.98,
"fps": 77.03,
"realtime_capable": true
}β¨ 98.5% IoU on CCTV - Excellent segmentation accuracy
β¨ 5Γ data efficiency - Only 241 manual labels needed (vs 1,200+ for fully supervised)
β¨ 77 FPS inference - Exceeds real-time requirement (30 FPS)
β¨ Robust pseudo-labeling - 98.8% top-1000 confidence score
β¨ Domain adaptation success - FPVβCCTV transfer works
β¨ Research novelty - Confidence-based filtering + geometric validation
- Demonstrated effective FPVβCCTV domain adaptation
- Achieved near-perfect performance with minimal manual annotation
- Validated semi-supervised learning for crosswalk detection
- Novel scoring: (Prediction Confidence + Geometric Validation) / 2
- Geometric validation: Checks crosswalk area ratio (5-40% of frame)
- Automatic quality filtering without human intervention
- 77 FPS on standard GPU (512Γ512 resolution)
- Suitable for edge deployment (Jetson platforms)
- Maintains accuracy while meeting speed requirements
Objectives:
- Multi-object tracking of pedestrians within crosswalk region
- Walking speed estimation for each tracked individual
- Elderly pedestrian detection (walking speed < 0.6 m/s)
Approach:
- Use Phase 1 model to extract crosswalk mask as ROI
- Apply YOLO + DeepSORT for pedestrian tracking
- Estimate speed using pixel-to-meter calibration
- Classify pedestrians by walking speed
Target Metrics:
- Tracking accuracy: MOTA > 70%
- Speed estimation error: < 0.1 m/s
- Real-time performance: 30+ FPS
- South Korean elderly walk at 0.54 m/s (vs assumed 1.0 m/s)
- Current crosswalk timing is insufficient
- Risk of accidents increases with aging population
- Real-time CCTV-based pedestrian tracking
- Dynamic signal timing adjustment
- Privacy-preserving (no facial recognition)
- Edge deployment on Jetson platforms
- β Phase 1: Crosswalk segmentation (98.5% IoU achieved)
- β³ Phase 2: Multi-object tracking & speed estimation
- β³ Phase 3: Signal control logic & SUMO simulation
- β³ Phase 4: Real-world Jetson deployment
@mastersthesis{omar2025crosswalk,
title={Adaptive Crosswalk Timing System for Elderly Pedestrians using Semi-Supervised Learning},
author={Omar Abdirashid},
year={2025},
school={Kookmin University},
type={Master's Thesis},
advisor={Prof. Jonghyuk Park},
note={Phase 1: 98.5\% IoU CCTV segmentation with 5x data efficiency}
}Researcher: Omar Abdirashid
Institution: Kookmin University
Advisor: Prof. Jonghyuk Park
GitHub: @rashiedomar
This project is part of academic research. Please contact for usage permissions.
Last Updated: November 2025
Status: Phase 1 Complete β
| Phase 2 Starting π
Performance: 98.5% IoU @ 77 FPS



