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
| 12 |
+
- vijayawada
|
| 13 |
+
- india
|
| 14 |
+
- urban-mobility
|
| 15 |
+
- visually-impaired
|
| 16 |
+
- assistive-technology
|
| 17 |
+
- computer-vision
|
| 18 |
+
- andhra-pradesh
|
| 19 |
+
datasets:
|
| 20 |
+
- custom
|
| 21 |
+
metrics:
|
| 22 |
+
- bleu
|
| 23 |
+
- rouge
|
| 24 |
+
pipeline_tag: image-to-text
|
| 25 |
+
widget:
|
| 26 |
+
- src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/tiger.jpg
|
| 27 |
+
example_title: Sample Traffic Scene
|
| 28 |
+
base_model: Salesforce/blip-image-captioning-base
|
| 29 |
+
model-index:
|
| 30 |
+
- name: vijayawada-traffic-accessibility-v2
|
| 31 |
+
results:
|
| 32 |
+
- task:
|
| 33 |
+
type: image-to-text
|
| 34 |
+
name: Image Captioning
|
| 35 |
+
dataset:
|
| 36 |
+
type: custom
|
| 37 |
+
name: Vijayawada Traffic Scenes
|
| 38 |
+
metrics:
|
| 39 |
+
- type: prediction_success_rate
|
| 40 |
+
value: 100.0
|
| 41 |
+
name: Prediction Success Rate
|
| 42 |
+
- type: traffic_vocabulary_coverage
|
| 43 |
+
value: 50.0
|
| 44 |
+
name: Traffic Vocabulary Coverage
|
| 45 |
+
---
|
| 46 |
+
|
| 47 |
+
# Model Card for Vijayawada Traffic Accessibility Navigation Model
|
| 48 |
+
|
| 49 |
+
This model is a specialized BLIP (Bootstrapping Language-Image Pre-training) model fine-tuned specifically for traffic scene understanding in Vijayawada, Andhra Pradesh, India. It generates accessibility-focused captions to assist visually impaired users with safe navigation through urban traffic environments.
|
| 50 |
+
|
| 51 |
+
## Model Details
|
| 52 |
+
|
| 53 |
+
### Model Description
|
| 54 |
+
|
| 55 |
+
This model addresses the critical need for localized accessibility technology in Indian urban environments. Fine-tuned on curated traffic scenes from Vijayawada, it understands local traffic patterns, vehicle types, and infrastructure to provide navigation-appropriate descriptions for visually impaired users.
|
| 56 |
+
|
| 57 |
+
The model specializes in recognizing motorcycles, auto-rickshaws, cars, trucks, and pedestrians while understanding Vijayawada-specific locations like Benz Circle, Railway Station Junction, Eluru Road, and Governorpet areas.
|
| 58 |
+
|
| 59 |
+
- **Developed by:** Charan Sai Ponnada
|
| 60 |
+
- **Funded by [optional]:** Independent research project
|
| 61 |
+
- **Shared by [optional]:** Community contribution for accessibility
|
| 62 |
+
- **Model type:** Vision-Language Model (Image-to-Text)
|
| 63 |
+
- **Language(s) (NLP):** English
|
| 64 |
+
- **License:** Apache 2.0
|
| 65 |
+
- **Finetuned from model [optional]:** Salesforce/blip-image-captioning-base
|
| 66 |
+
|
| 67 |
+
### Model Sources [optional]
|
| 68 |
+
|
| 69 |
+
- **Repository:** https://huggingface.co/Charansaiponnada/vijayawada-traffic-accessibility-v2
|
| 70 |
+
- **Paper [optional]:** [Model documentation available in repository]
|
| 71 |
+
- **Demo [optional]:** Interactive widget available on model page
|
| 72 |
+
|
| 73 |
+
## Uses
|
| 74 |
+
|
| 75 |
+
### Direct Use
|
| 76 |
+
|
| 77 |
+
This model is designed for direct integration into accessibility navigation applications for visually impaired users in Vijayawada. It can process real-time camera feeds from mobile devices to provide spoken traffic scene descriptions.
|
| 78 |
+
|
| 79 |
+
**Primary use cases:**
|
| 80 |
+
- Mobile navigation apps with voice guidance
|
| 81 |
+
- Real-time traffic scene description for pedestrian navigation
|
| 82 |
+
- Integration with existing accessibility tools and screen readers
|
| 83 |
+
- Educational tools for traffic awareness training
|
| 84 |
+
|
| 85 |
+
### Downstream Use [optional]
|
| 86 |
+
|
| 87 |
+
The model can be fine-tuned further for:
|
| 88 |
+
- Extension to other Andhra Pradesh cities
|
| 89 |
+
- Integration with GPS and mapping services
|
| 90 |
+
- Multilingual caption generation (Telugu language support)
|
| 91 |
+
- Enhanced safety features with risk assessment
|
| 92 |
+
|
| 93 |
+
### Out-of-Scope Use
|
| 94 |
+
|
| 95 |
+
**This model should NOT be used for:**
|
| 96 |
+
- Autonomous vehicle decision-making or control systems
|
| 97 |
+
- Medical diagnosis or health-related assessments
|
| 98 |
+
- Financial or legal decision-making
|
| 99 |
+
- General-purpose image captioning outside of traffic contexts
|
| 100 |
+
- Critical safety decisions without human oversight
|
| 101 |
+
- Traffic management or control systems
|
| 102 |
+
|
| 103 |
+
## Bias, Risks, and Limitations
|
| 104 |
+
|
| 105 |
+
**Geographic Bias:** The model is specifically trained on Vijayawada traffic patterns and may not generalize well to other cities or countries.
|
| 106 |
+
|
| 107 |
+
**Weather Limitations:** Primarily trained on daylight, clear weather conditions. Performance may degrade in rain, fog, or night conditions.
|
| 108 |
+
|
| 109 |
+
**Cultural Context:** Optimized for Indian traffic scenarios with specific vehicle types (auto-rickshaws, motorcycles) that may not be common elsewhere.
|
| 110 |
+
|
| 111 |
+
**Language Limitation:** Currently generates only English descriptions, which may not be the primary language for all Vijayawada users.
|
| 112 |
+
|
| 113 |
+
**Safety Dependency:** Should never be the sole navigation aid - must be used alongside traditional mobility aids, GPS systems, and human judgment.
|
| 114 |
+
|
| 115 |
+
### Recommendations
|
| 116 |
+
|
| 117 |
+
Users should be made aware that:
|
| 118 |
+
- This model provides supplementary navigation assistance, not replacement for traditional mobility aids
|
| 119 |
+
- Descriptions should be verified with environmental audio cues and other senses
|
| 120 |
+
- The model works best in familiar traffic scenarios similar to training data
|
| 121 |
+
- Regular updates and retraining may be needed as traffic patterns change
|
| 122 |
+
- Integration with local emergency services and support systems is recommended
|
| 123 |
+
|
| 124 |
+
## How to Get Started with the Model
|
| 125 |
+
from transformers import BlipProcessor, BlipForConditionalGeneration
|
| 126 |
+
from PIL import Image
|
| 127 |
+
|
| 128 |
+
Load the model
|
| 129 |
+
processor = BlipProcessor.from_pretrained("Charansaiponnada/vijayawada-traffic-accessibility-v2")
|
| 130 |
+
model = BlipForConditionalGeneration.from_pretrained("Charansaiponnada/vijayawada-traffic-accessibility-v2")
|
| 131 |
+
|
| 132 |
+
Process a traffic image
|
| 133 |
+
image = Image.open("vijayawada_traffic_scene.jpg")
|
| 134 |
+
inputs = processor(images=image, return_tensors="pt")
|
| 135 |
+
generated_ids = model.generate(**inputs, max_length=128, num_beams=5)
|
| 136 |
+
caption = processor.decode(generated_ids, skip_special_tokens=True)
|
| 137 |
+
|
| 138 |
+
print(f"Traffic description: {caption}")
|
| 139 |
+
|
| 140 |
+
## Training Details
|
| 141 |
+
|
| 142 |
+
### Training Data
|
| 143 |
+
|
| 144 |
+
The model was trained on a carefully curated dataset of 101 traffic scene images from Vijayawada, covering:
|
| 145 |
+
- **Geographic Areas:** Benz Circle, Railway Station Junction, Eluru Road, Governorpet, One Town Signal, Patamata Bridge
|
| 146 |
+
- **Traffic Elements:** Motorcycles, cars, trucks, auto-rickshaws, pedestrians, road infrastructure
|
| 147 |
+
- **Conditions:** Daylight scenes with various traffic densities and road conditions
|
| 148 |
+
|
| 149 |
+
**Data Quality Control:**
|
| 150 |
+
- Manual verification of all images for clarity and relevance
|
| 151 |
+
- Traffic-specific keyword filtering and scoring
|
| 152 |
+
- Accessibility-focused caption enhancement
|
| 153 |
+
- Location-specific context addition
|
| 154 |
+
|
| 155 |
+
### Training Procedure
|
| 156 |
+
|
| 157 |
+
#### Preprocessing [optional]
|
| 158 |
+
|
| 159 |
+
- Image resizing to 384×384 pixels for consistency
|
| 160 |
+
- Caption cleaning and validation
|
| 161 |
+
- Location context enhancement (adding area-specific information)
|
| 162 |
+
- Traffic vocabulary verification and optimization
|
| 163 |
+
- Data augmentation with brightness and contrast adjustments (±20%)
|
| 164 |
+
|
| 165 |
+
#### Training Hyperparameters
|
| 166 |
+
|
| 167 |
+
- **Training regime:** FP32 precision for stability
|
| 168 |
+
- **Optimizer:** AdamW
|
| 169 |
+
- **Learning Rate:** 1e-5 (reduced for stability)
|
| 170 |
+
- **Batch Size:** 1 (with gradient accumulation of 8 steps)
|
| 171 |
+
- **Epochs:** 10 with early stopping
|
| 172 |
+
- **Total Training Steps:** 50
|
| 173 |
+
- **Warmup Steps:** 10
|
| 174 |
+
- **Weight Decay:** 0.01
|
| 175 |
+
- **Scheduler:** Cosine annealing
|
| 176 |
+
|
| 177 |
+
#### Speeds, Sizes, Times [optional]
|
| 178 |
+
|
| 179 |
+
- **Training Time:** 6.63 minutes (emergency configuration)
|
| 180 |
+
- **Model Size:** 990MB
|
| 181 |
+
- **Inference Time:** ~2-3 seconds per image on mobile GPU
|
| 182 |
+
- **Memory Usage:** ~1.2GB during inference
|
| 183 |
+
- **Training Hardware:** Google Colab with NVIDIA GPU
|
| 184 |
+
|
| 185 |
+
## Evaluation
|
| 186 |
+
|
| 187 |
+
### Testing Data, Factors & Metrics
|
| 188 |
+
|
| 189 |
+
#### Testing Data
|
| 190 |
+
|
| 191 |
+
Test set comprised 10% of the curated Vijayawada traffic dataset (approximately 10 images) representing diverse traffic scenarios across different areas of the city.
|
| 192 |
+
|
| 193 |
+
#### Factors
|
| 194 |
+
|
| 195 |
+
Evaluation considered:
|
| 196 |
+
- **Geographic Coverage:** Performance across different Vijayawada areas
|
| 197 |
+
- **Vehicle Types:** Recognition accuracy for motorcycles, cars, trucks, auto-rickshaws
|
| 198 |
+
- **Traffic Density:** Performance in light to heavy traffic conditions
|
| 199 |
+
- **Infrastructure Elements:** Recognition of roads, junctions, signals, bridges
|
| 200 |
+
|
| 201 |
+
#### Metrics
|
| 202 |
+
|
| 203 |
+
- **Prediction Success Rate:** Percentage of test samples generating valid captions
|
| 204 |
+
- **Traffic Vocabulary Coverage:** Proportion of traffic-relevant terms in generated captions
|
| 205 |
+
- **Caption Length Consistency:** Average word count for accessibility optimization
|
| 206 |
+
- **Quality Assessment:** Manual evaluation using word overlap and context relevance
|
| 207 |
+
|
| 208 |
+
### Results
|
| 209 |
+
|
| 210 |
+
| Metric | Value | Interpretation |
|
| 211 |
+
|--------|-------|----------------|
|
| 212 |
+
| **Prediction Success Rate** | 100% | All test samples generated valid captions |
|
| 213 |
+
| **Traffic Vocabulary Coverage** | 50% | Strong understanding of traffic terminology |
|
| 214 |
+
| **Average Caption Length** | 5 words | Appropriate for text-to-speech applications |
|
| 215 |
+
| **Quality Rating** | 62.5% Good+ | Manual evaluation of caption relevance |
|
| 216 |
+
|
| 217 |
+
#### Summary
|
| 218 |
+
|
| 219 |
+
The model demonstrated excellent reliability with 100% prediction success rate and consistent generation of traffic-relevant captions. The 50% traffic vocabulary coverage indicates strong specialization for the intended use case, while the concise caption length (5 words average) is optimal for accessibility applications requiring quick audio feedback.
|
| 220 |
+
|
| 221 |
+
## Model Examination [optional]
|
| 222 |
+
|
| 223 |
+
**Sample Predictions Analysis:**
|
| 224 |
+
|
| 225 |
+
| Input Scene | Generated Caption | Quality Assessment |
|
| 226 |
+
|-------------|-------------------|-------------------|
|
| 227 |
+
| Governorpet Junction | "motorcycles parked on the road" | Excellent - Accurate vehicle identification and spatial understanding |
|
| 228 |
+
| Eluru Road | "the road is dirty" | Excellent - Correct infrastructure condition assessment |
|
| 229 |
+
| Railway Station | "the car is yellow in color" | Excellent - Accurate vehicle and color recognition |
|
| 230 |
+
| One Town Signal | "three people riding motorcycles on the road" | Good - Correct count and activity recognition |
|
| 231 |
+
|
| 232 |
+
The model shows strong performance in vehicle recognition and spatial relationship understanding, with particular strength in identifying motorcycles (dominant in Vijayawada traffic).
|
| 233 |
+
|
| 234 |
+
## Environmental Impact
|
| 235 |
+
|
| 236 |
+
Carbon emissions were minimized through efficient training on Google Colab infrastructure:
|
| 237 |
+
|
| 238 |
+
- **Hardware Type:** NVIDIA GPU (Google Colab)
|
| 239 |
+
- **Hours used:** 0.11 hours (6.63 minutes)
|
| 240 |
+
- **Cloud Provider:** Google Cloud Platform
|
| 241 |
+
- **Compute Region:** Global (Google Colab)
|
| 242 |
+
- **Carbon Emitted:** Minimal due to short training time and existing infrastructure
|
| 243 |
+
|
| 244 |
+
## Technical Specifications [optional]
|
| 245 |
+
|
| 246 |
+
### Model Architecture and Objective
|
| 247 |
+
|
| 248 |
+
- **Base Architecture:** BLIP (Bootstrapping Language-Image Pre-training)
|
| 249 |
+
- **Vision Encoder:** Vision Transformer (ViT)
|
| 250 |
+
- **Text Decoder:** BERT-based transformer
|
| 251 |
+
- **Fine-tuning Method:** Full model fine-tuning (all parameters updated)
|
| 252 |
+
- **Objective:** Cross-entropy loss for caption generation with accessibility focus
|
| 253 |
+
|
| 254 |
+
### Compute Infrastructure
|
| 255 |
+
|
| 256 |
+
#### Hardware
|
| 257 |
+
|
| 258 |
+
- **Training:** Google Colab Pro with NVIDIA GPU
|
| 259 |
+
- **Memory:** ~12GB GPU memory available
|
| 260 |
+
- **Storage:** Google Drive integration for dataset access
|
| 261 |
+
|
| 262 |
+
#### Software
|
| 263 |
+
|
| 264 |
+
- **Framework:** PyTorch with Transformers library
|
| 265 |
+
- **Key Dependencies:**
|
| 266 |
+
- transformers==4.36.0
|
| 267 |
+
- torch==2.1.0
|
| 268 |
+
- datasets==2.15.0
|
| 269 |
+
- accelerate==0.25.0
|
| 270 |
+
- **Development Environment:** Google Colab with Python 3.11
|
| 271 |
+
|
| 272 |
+
|
| 273 |
+
**APA:**
|
| 274 |
+
|
| 275 |
+
Ponnada, C. S. (2025). *Vijayawada Traffic Accessibility Navigation Model*. Hugging Face Model Hub. https://huggingface.co/Charansaiponnada/vijayawada-traffic-accessibility-v2
|
| 276 |
+
|
| 277 |
+
## Glossary [optional]
|
| 278 |
+
|
| 279 |
+
- **BLIP:** Bootstrapping Language-Image Pre-training - A vision-language model architecture
|
| 280 |
+
- **Traffic Vocabulary Coverage:** Percentage of generated captions containing traffic-specific terminology
|
| 281 |
+
- **Accessibility Navigation:** Technology designed to assist visually impaired users with spatial orientation and mobility
|
| 282 |
+
- **Auto-rickshaw:** Three-wheeled motorized vehicle common in Indian cities for public transport
|
| 283 |
+
- **Fine-tuning:** Process of adapting a pre-trained model to a specific domain or task
|
| 284 |
+
|
| 285 |
+
## More Information [optional]
|
| 286 |
+
|
| 287 |
+
This model is part of a broader initiative to create inclusive AI technology for Indian urban environments. The project demonstrates how pre-trained vision-language models can be successfully adapted for specific geographic and cultural contexts to address real-world accessibility challenges.
|
| 288 |
+
|
| 289 |
+
**Future Development Plans:**
|
| 290 |
+
- Extension to other Andhra Pradesh cities
|
| 291 |
+
- Telugu language support
|
| 292 |
+
- Night and weather condition training data
|
| 293 |
+
- Integration with local emergency services
|
| 294 |
+
- Community feedback incorporation
|
| 295 |
+
|
| 296 |
+
## Model Card Authors [optional]
|
| 297 |
+
|
| 298 |
+
Charan Sai Ponnada - Model development, training, and evaluation
|
| 299 |
+
|
| 300 |
+
## Model Card Contact
|
| 301 |
+
|
| 302 |
+
For questions about model integration, accessibility applications, or collaboration opportunities:
|
| 303 |
+
- **Repository Issues:** https://huggingface.co/Charansaiponnada/vijayawada-traffic-accessibility-v2/discussions
|
| 304 |
+
- **Purpose:** Supporting visually impaired navigation in Vijayawada, Andhra Pradesh
|
| 305 |
+
- **Community:** Open to collaboration with accessibility organizations and app developers
|
| 306 |
+
|