A cognitive AI simulation that mimics how humans visually explore a scene using saliency maps and fixation-based attention scanning. Upload an image and watch how a cognitive system prioritizes visual information.
NeuroVision is a Cognitive AI simulation system that demonstrates how human visual attention works when observing a scene.
Instead of processing images uniformly, humans naturally focus on regions of interest. This project simulates that behavior using saliency maps and fixation-based scanning, allowing users to observe how an artificial cognitive system prioritizes visual information.
The system works as follows:
- A user uploads an image representing a visual scene.
- The system generates a saliency map highlighting visually prominent regions.
- The algorithm simulates fixation points, mimicking how human eyes move across a scene.
- The results are visualized interactively through a Streamlit interface.
This provides a simple yet powerful demonstration of attention modeling in cognitive AI systems.
| Feature | Description |
|---|---|
| ๐ธ Image Upload Interface | Upload any PNG or JPG image for simulation |
| ๐ฏ Saliency Map Generation | Highlights visually prominent regions |
| ๐ Fixation Simulation | Simulates eye movement across salient regions |
| โ๏ธ Adjustable Parameters | Customize blur kernel size, threshold, and fixation count |
| ๐ Interactive Visualization | Real-time UI using Streamlit |
| ๐ง Cognitive AI Concepts | Demonstrates perception and attention modeling |
| ๐ Educational Tool | Ideal for AI and Cognitive Science coursework |
graph TD
A[๐ค User Uploads Image] --> B[Streamlit Web Interface]
B --> C[Image Preprocessing]
C --> D[OpenCV Saliency Detection]
D --> E[Saliency Map Generation]
E --> F[Threshold Filtering]
F --> G[Top Salient Regions Selection]
G --> H[Fixation Simulation]
H --> I[Fixation Points Overlay]
I --> J[Visualization Output]
The simulation replicates a simplified version of human visual attention:
1๏ธโฃ Scene Perception
- The uploaded image acts as a visual stimulus.
2๏ธโฃ Saliency Computation
-
OpenCV detects regions that visually stand out based on:
- color contrast
- edge intensity
- brightness variations
3๏ธโฃ Attention Filtering
- A threshold filter removes low-importance regions.
4๏ธโฃ Fixation Selection
- The system selects top N salient points.
- These points simulate human eye fixation behavior.
5๏ธโฃ Visualization
-
Displays:
- Original image
- Saliency heatmap
- Fixation points overlay
| Component | Technology |
|---|---|
| Programming Language | Python 3.9+ |
| Web Interface | Streamlit |
| Computer Vision | OpenCV |
| Numerical Processing | NumPy |
| Visualization | Matplotlib |
visual_attention_streamlit/
โ
โโโ app.py # Main Streamlit application
โโโ attention_model.py # Saliency and fixation logic
โโโ utils/
โ โโโ image_utils.py # Image preprocessing utilities
โ
โโโ requirements.txt # Project dependencies
โโโ README.md # Project documentation
- Python 3.9+
- pip
git clone https://github.com/your-username/visual_attention_streamlit.git
cd visual_attention_streamlitpython -m venv venvMac/Linux
source venv/bin/activateWindows
venv\Scripts\activatepip install -r requirements.txtLaunch the Streamlit application:
streamlit run app.pyThe application will start locally at:
http://localhost:8501
Upload a PNG or JPG image representing the visual scene.
Using the sidebar controls, configure:
- Blur kernel size
- Saliency threshold
- Maximum fixation points
The system processes the image and generates:
- Saliency heatmap
- Fixation simulation
The UI displays:
| Output | Description |
|---|---|
| Original Image | Input visual scene |
| Saliency Map | Regions attracting attention |
| Fixation Points | Simulated eye movement |
| Concept | Description |
|---|---|
| Saliency Map | Highlights visually important areas |
| Fixation | A point where the eye briefly focuses |
| Visual Attention | Prioritization of relevant visual stimuli |
| Thresholding | Filters out less important visual data |
| Cognitive AI | AI inspired by human perception and cognition |
Ensure:
- Images are not extremely low resolution
- Contrast between objects is sufficient
Verify the server started successfully:
http://localhost:8501
Restart the app if needed.
- ๐๏ธ Real eye-tracking dataset integration
- ๐ฅ Video attention simulation
- ๐ Temporal attention heatmaps
- ๐ค Deep learning attention models
- ๐ง Object detection + attention fusion
This project demonstrates key concepts from Cognitive Artificial Intelligence, including:
- perception modeling
- visual attention mechanisms
- cognitive psychology principles
- computational vision techniques
It serves as a lightweight educational simulation for understanding how cognitive systems prioritize information.
Kishore P CSE (AI & Robotics) โ VIT Chennai
This project is licensed under the MIT License.
Understanding how machines can perceive the world like humans.
NeuroVision โ modeling attention in artificial cognitive systems.