CoolFace
Modelpublic

msaid1976/SmolVLM-Instruct-Navigation-FineTuned

sourceHugging Faceapache-2.0updated 8mo agoView on Hugging Face
0likes
Model Card

SmolVLM Navigation Assistant ๐Ÿฆฏ

<div align="center">

![Model](https://huggingface.co/HuggingFaceTB/SmolVLM-500M-Instruct) ![License](https://www.apache.org/licenses/LICENSE-2.0) ![BERTScore](https://huggingface.co/metrics/bertscore)

Fine-tuned vision-language model for blind navigation assistance

Quick Start โ€ข Performance โ€ข Usage โ€ข Training โ€ข Citation

</div>


๐Ÿ“‹ Overview

Fine-tuned SmolVLM-500M-Instruct for vision-based navigation assistance for blind and visually impaired users. Developed as a Master's thesis project at Asia Pacific University.

Key Results:

  • โ€”๐ŸŽฏ 91.6% BERTScore (semantic accuracy)
  • โ€”๐Ÿš€ +3483% BLEU-1 improvement over baseline
  • โ€”โšก 0.5-1s inference time
  • โ€”๐Ÿ’พ 2-4GB VRAM requirement
  • โ€”๐Ÿ“Š p < 0.001 statistical significance

Author: Mohammad Mohamed Said Aly Amin Supervisor: Dr. Raheem Mafas Institution: Asia Pacific University Program: Master's in Data Science & Business Analytics


โœจ Features

Three Navigation Modes

ModePurposeResponse LengthExample Query
๐ŸŽฏ FOCUSEDSpatial relationships5-15 words"Is there a chair to my left?"
๐ŸŒ SCENEEnvironment description30-50 words"Describe what's in front of me"
๐Ÿ“ OCRText recognitionVariable"What does the sign say?"

Technical Highlights

  • โ€”โœ… Real-time inference on consumer GPUs
  • โ€”โœ… Low memory footprint (2-4GB VRAM)
  • โ€”โœ… Statistically validated improvements
  • โ€”โœ… Production-ready deployment
  • โ€”โœ… QLoRA efficient fine-tuning (1.84% parameters)

๐Ÿ“Š Performance

Evaluation Results (500 samples)

MetricFine-tunedBaselineImprovement
BLEU0.234--
BLEU-124.890.69+3483% ๐Ÿš€
ROUGE-155.7213.66+308%
ROUGE-232.462.69+1105%
ROUGE-L48.2711.82+308%
BERTScore91.6385.60+7.04%
Length Ratio0.93-Nearly perfect

Statistical Validation: All improvements significant at p < 0.001 (paired t-test, n=500)

Loss Convergence

  • โ€”Initial Training Loss: 0.29 โ†’ Final: 0.12 (58% reduction)
  • โ€”Initial Val Loss: 0.24 โ†’ Final: 0.13 (46% reduction)

๐Ÿš€ Quick Start

Installation

bash
pip install transformers torch pillow accelerate

Basic Usage

python
from transformers import Idefics3ForConditionalGeneration, AutoProcessor
from PIL import Image
import torch

# Load model
model = Idefics3ForConditionalGeneration.from_pretrained(
    "msaid1976/SmolVLM-Instruct-Navigation-FineTuned",
    torch_dtype=torch.float16,
    device_map="auto",
    trust_remote_code=True
)
processor = AutoProcessor.from_pretrained(
    "msaid1976/SmolVLM-Instruct-Navigation-FineTuned",
    trust_remote_code=True
)

# Prepare input
image = Image.open("scene.jpg")
messages = [{
    "role": "user",
    "content": [
        {"type": "image"},
        {"type": "text", "text": "What do you see?"}
    ]
}]

# Generate
prompt = processor.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)
inputs = processor(text=prompt, images=[image], return_tensors="pt")
inputs = {k: v.to("cuda") for k, v in inputs.items()}

with torch.no_grad():
    outputs = model.generate(
        **inputs,
        max_new_tokens=150,
        do_sample=False,
        pad_token_id=processor.tokenizer.eos_token_id,
        eos_token_id=processor.tokenizer.eos_token_id
    )

response = processor.decode(outputs[0][inputs['input_ids'].shape[1]:], skip_special_tokens=True)
print(response)

๐Ÿ’ก Usage Examples

FOCUSED: Spatial Queries

python
messages = [{
    "role": "user",
    "content": [
        {"type": "image"},
        {"type": "text", "text": "Is there a chair to the left of the table?"}
    ]
}]
# Output: "Yes, there is a chair to the left of the table."

SCENE: Environment Description

python
messages = [{
    "role": "user",
    "content": [
        {"type": "image"},
        {"type": "text", "text": "Describe the scene in front of me."}
    ]
}]
# Output: "The scene shows a living room with a brown sofa on the left, 
# a wooden coffee table in the center, and a TV on the wall..."

OCR: Text Reading

python
messages = [{
    "role": "user",
    "content": [
        {"type": "image"},
        {"type": "text", "text": "What text is on the sign?"}
    ]
}]
# Output: "The sign says 'EXIT' in red letters."

Memory Optimization

python
# 8-bit quantization (reduces to ~2GB VRAM)
model = Idefics3ForConditionalGeneration.from_pretrained(
    "msaid1976/SmolVLM-Instruct-Navigation-FineTuned",
    load_in_8bit=True,
    device_map="auto"
)

# Batch processing
inputs = processor(
    text=[prompt1, prompt2, prompt3],
    images=[[img1], [img2], [img3]],
    return_tensors="pt",
    padding=True
)

๐Ÿ› ๏ธ Training Details

Configuration

ParameterValueDescription
Base ModelSmolVLM-500M-Instruct500M parameters
MethodQLoRA4-bit quantization
Trainable Params42M (1.84%)LoRA adapters only
LoRA Rank32Adapter dimension
LoRA Alpha64Scaling factor
Epochs3Full data passes
Batch Size1 (effective: 16)With gradient accumulation
Learning Rate2e-5AdamW optimizer
PrecisionBF16Mixed precision
GPURTX 5070 Ti 16GBTraining hardware
Training Time~20 hoursTotal duration
Peak VRAM7-9GBDuring training

Dataset

Size: 10,000+ samples across three modes

Sources:

  • โ€”GQA Enhanced (spatial reasoning)
  • โ€”Localized Narratives (scene descriptions)
  • โ€”Visual Genome (object relationships)
  • โ€”TextCaps (text-in-image)
  • โ€”VizWiz (accessibility focus)

๐Ÿ’ป Hardware Requirements

Use CaseGPURAMStorage
Inference4GB+ VRAM8GB5GB
Training16GB VRAM32GB50GB

Recommended for Inference: RTX 3060+ or equivalent


โš ๏ธ Limitations

  1. 1.Scope: Optimized for navigation; may underperform on general VQA
  2. 2.Image Quality: Best with well-lit, clear images
  3. 3.OCR: Works best with printed text; struggles with handwriting
  4. 4.Speed: Requires GPU for real-time use (CPU: 10-20s/image)
  5. 5.Language: English only

Safety Notice

โš ๏ธ This is an assistive tool, not a replacement for traditional navigation aids. Users should:

  • โ€”Combine with cane, guide dog, or other mobility aids
  • โ€”Exercise human judgment
  • โ€”Test in safe environments first
  • โ€”Be aware of potential errors

๐ŸŽ“ Model Card

Model Details

  • โ€”Type: Vision-Language Model (Idefics3)
  • โ€”Parameters: 500M total, 42M trainable (1.84%)
  • โ€”Input: Image + Text
  • โ€”Output: Text
  • โ€”License: Apache 2.0

Intended Use

Primary:

  • โ€”Navigation assistance for blind/visually impaired
  • โ€”Spatial reasoning and object localization
  • โ€”Scene understanding and description
  • โ€”Text recognition in natural environments
  • โ€”Accessibility research

Out of Scope:

  • โ€”Medical diagnosis
  • โ€”Autonomous navigation without human oversight
  • โ€”Real-time video processing
  • โ€”General-purpose VQA (use base model)

Ethical Considerations

  • โ€”Designed to enhance independence, not replace human judgment
  • โ€”May have biases from English-only training data
  • โ€”Requires validation in real-world scenarios
  • โ€”Processes images locally (no data collection)

๐Ÿ“– Citation

bibtex
@misc{alqahtani2025smolvlm_navigation,
  author = {Alqahtani, Muhammad Said},
  title = {SmolVLM Navigation Assistant: Fine-tuned for Blind Navigation},
  year = {2025},
  publisher = {HuggingFace},
  howpublished = {\url{https://huggingface.co/msaid1976/SmolVLM-Instruct-Navigation-FineTuned}}
}

@mastersthesis{alqahtani2025thesis,
  author = {Alqahtani, Muhammad Said},
  title = {An Efficient Multi-Object Detection and Smart Navigation Using Vision Language Models for Visually Impaired},
  school = {Asia Pacific University of Technology and Innovation},
  year = {2025},
  address = {Kuala Lumpur, Malaysia}
}

๐Ÿ™ Acknowledgments

Supervision:

  • โ€”Dr. Raheem Mafas (Research Supervisor)
  • โ€”Asia Pacific University

Technical:

  • โ€”HuggingFace Team (base model & libraries)
  • โ€”Unsloth (training framework)
  • โ€”NVIDIA (GPU hardware)

Datasets:

  • โ€”Stanford Visual Genome
  • โ€”GQA, VizWiz, TextCaps
  • โ€”Localized Narratives

๐Ÿ“ซ Contact

Author: Mohammad Mohamed Said Aly Amin Institution: Asia Pacific University Issues: Model Discussions


<div align="center">

Made with โค๏ธ for accessibility and inclusion

![HuggingFace](https://huggingface.co/msaid1976/SmolVLM-Instruct-Navigation-FineTuned) ![License](LICENSE)

Empowering independence through AI-powered vision assistance

</div>