Skip to content

raimbekovm/research_paper_cv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


AirVision

Image-Based PM2.5 Estimation Using Urban Webcams

CI Python 3.8+ License: MIT Code style: black

Key Features β€’ Quick Start β€’ Architecture β€’ Usage β€’ Methodology β€’ Contributing


Overview

AirVision is a research project for estimating air pollution (PM2.5) levels in Bishkek, Kyrgyzstan using computer vision and multimodal machine learning. We develop a low-cost air quality monitoring system using publicly available urban webcams.

Target: Scopus Q4 publication in Environmental Monitoring / Computer Vision / Machine Learning

Key Innovation

Unlike traditional approaches requiring proximity between camera and sensor, we leverage the physical principle that atmospheric visibility integrates PM2.5 along the entire line of sight (5-10 km). During winter thermal inversion in Bishkek, PM2.5 is spatially homogeneous at city scale, enabling panoramic cameras to effectively measure city-average pollution regardless of sensor distance.


Key Features

  • Low-cost monitoring β€” Uses existing public webcam infrastructure
  • Multimodal ML β€” Combines visual features with meteorological data
  • Physics-based approach β€” Grounded in atmospheric visibility theory
  • Automated collection β€” Continuous data pipeline with quality filtering
  • Extensible β€” Easy to add new cameras and data sources

Quick Start

# Clone and setup
git clone https://github.com/raimbekovm/airvision.git
cd airvision

# Create virtual environment
python -m venv .venv
source .venv/bin/activate

# Install dependencies
make install-dev

# Configure API keys
cp .env.example .env
# Edit .env with your API keys (see docs/API_KEYS_GUIDE.md)

# Test single capture
python src/capture_frame.py

# Start data collection
make collect

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         AirVision Pipeline                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                   β”‚
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β–Ό                        β–Ό                        β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Data Sources   β”‚    β”‚   Data Sources   β”‚    β”‚   Data Sources   β”‚
β”‚    (Webcams)     β”‚    β”‚    (PM2.5 API)   β”‚    β”‚   (Weather API)  β”‚
β”‚                  β”‚    β”‚                  β”‚    β”‚                  β”‚
β”‚ β€’ bishkek_pano   β”‚    β”‚ β€’ IQAir          β”‚    β”‚ β€’ OpenWeatherMap β”‚
β”‚ β€’ sovmin         β”‚    β”‚ β€’ OpenAQ         β”‚    β”‚ β€’ Open-Meteo     β”‚
β”‚ β€’ kt_center      β”‚    β”‚                  β”‚    β”‚                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚                       β”‚                       β”‚
         β–Ό                       β–Ό                       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        Data Collection Layer                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚   Frame     β”‚  β”‚   Quality   β”‚  β”‚    PM2.5    β”‚  β”‚   Weather   β”‚ β”‚
β”‚  β”‚  Capture    β”‚  β”‚  Filtering  β”‚  β”‚   Fetcher   β”‚  β”‚   Fetcher   β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                   β”‚
                                   β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         Dataset (Synchronized)                       β”‚
β”‚                                                                      β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”‚
β”‚   β”‚  Image  β”‚ +  β”‚  PM2.5  β”‚ +  β”‚ Weather β”‚ +  β”‚Metadata β”‚         β”‚
β”‚   β”‚ (1080p) β”‚    β”‚ (Β΅g/mΒ³) β”‚    β”‚  (T,H,W)β”‚    β”‚  (time) β”‚         β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                   β”‚
                                   β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                           Model Training                             β”‚
β”‚                                                                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”‚
β”‚  β”‚   Baseline    β”‚  β”‚  Image-Only   β”‚  β”‚  Multimodal   β”‚           β”‚
β”‚  β”‚  (Weather β†’   β”‚  β”‚  (CNN β†’       β”‚  β”‚  (CNN+MLP β†’   β”‚           β”‚
β”‚  β”‚    PM2.5)     β”‚  β”‚    PM2.5)     β”‚  β”‚    PM2.5)     β”‚           β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                   β”‚
                                   β–Ό
                        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                        β”‚   PM2.5 Estimate β”‚
                        β”‚   + Uncertainty  β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Project Structure

airvision/
β”œβ”€β”€ src/                          # Source code
β”‚   β”œβ”€β”€ __init__.py               # Package initialization
β”‚   β”œβ”€β”€ config.py                 # Configuration management
β”‚   β”œβ”€β”€ camera_config.py          # Camera configurations
β”‚   β”œβ”€β”€ capture_frame.py          # Frame capture
β”‚   β”œβ”€β”€ collect_data.py           # Data collection pipeline
β”‚   β”œβ”€β”€ frame_quality.py          # Quality assessment
β”‚   β”œβ”€β”€ fetch_pm25_data.py        # PM2.5 data fetching
β”‚   β”œβ”€β”€ baseline_model.py         # ML baseline models
β”‚   └── utils/                    # Utility functions
β”‚       β”œβ”€β”€ logging.py
β”‚       └── io.py
β”œβ”€β”€ configs/                      # Configuration files
β”‚   └── default.yaml
β”œβ”€β”€ data/                         # Data directory (gitignored)
β”‚   β”œβ”€β”€ images/                   # Captured frames
β”‚   β”œβ”€β”€ pm25/                     # PM2.5 measurements
β”‚   β”œβ”€β”€ weather/                  # Weather data
β”‚   └── metadata/                 # Collection metadata
β”œβ”€β”€ tests/                        # Test suite
β”‚   β”œβ”€β”€ conftest.py
β”‚   β”œβ”€β”€ test_config.py
β”‚   β”œβ”€β”€ test_frame_quality.py
β”‚   └── test_utils.py
β”œβ”€β”€ docs/                         # Documentation
β”œβ”€β”€ .github/workflows/            # CI/CD
β”œβ”€β”€ Makefile                      # Common commands
β”œβ”€β”€ pyproject.toml                # Project configuration
β”œβ”€β”€ requirements.txt              # Dependencies
└── README.md

Webcam Cameras

We use 3 webcams selected by visual quality criteria:

Camera Quality Depth Sky Coverage Status
bishkek_panorama 10/10 10+ km 50% Primary
sovmin 9/10 5+ km 40% Secondary
kt_center 7/10 varies 30% Supplementary

Source: Kyrgyztelekom Live Streams


Usage

Data Collection

# Start daylight collection (8:00-18:00)
make collect

# Start 24/7 collection
make collect-24h

# Background collection with logging
make collect-background

# Check collection status
make status

# Stop collection
make stop

Development

# Run tests
make test

# Run tests with coverage
make coverage

# Format code
make format

# Lint code
make lint

Methodology

Model Comparison

Model Input Architecture Purpose
Baseline Weather only Ridge/RF Lower bound
Image-Only Webcam frames ResNet-50 Visual features
Multimodal Image + Weather CNN + MLP Best performance

Evaluation Metrics

  • MAE β€” Mean Absolute Error (primary)
  • RMSE β€” Root Mean Squared Error
  • RΒ² β€” Coefficient of determination

Physical Basis

Atmospheric visibility follows the Beer-Lambert law:

I(d) = Iβ‚€ Β· exp(-Ξ²Β·d)

Where extinction coefficient β ∝ PM2.5 concentration. The camera measures integrated scattering along the entire line of sight (5-10 km), enabling city-scale pollution estimation.


Configuration

Configuration is managed via YAML files in configs/:

# configs/default.yaml
collection:
  interval_minutes: 30
  duration_hours: 12
  daylight_only: true

model:
  architecture: "resnet50"
  pretrained: true
  training:
    batch_size: 32
    learning_rate: 0.001

Override settings via environment variables:

export AIRVISION_INTERVAL=15
export AIRVISION_LOG_LEVEL=DEBUG

Current Status

Completed βœ“

  • Camera configuration (3 cameras)
  • Automated frame capture with quality filtering
  • PM2.5 data collection (IQAir, OpenWeatherMap APIs)
  • Physical justification documented
  • Project structure and CI/CD setup

In Progress ⏳

  • Continuous data collection (winter 2025-2026)

Pending ⏹

  • Model training (baseline, image-only, multimodal)
  • Ablation studies and interpretability
  • Paper writing for Scopus Q4 submission

API Rate Limits

API Free Tier Our Usage Status
OpenWeatherMap 1000/day ~30/day βœ“ OK
IQAir 1000/month ~900/month ⚠ Tight

Contributing

Contributions welcome! Please read CONTRIBUTING.md for guidelines.

# Setup development environment
make install-dev

# Run pre-commit hooks
pre-commit run --all-files

Citation

@article{raimbekov2026airvision,
  title={Image-Based PM2.5 Estimation for Bishkek Using Urban Webcams
         and Multimodal Deep Learning},
  author={Raimbekov, Murat},
  journal={TBD - Scopus Q4},
  year={2026}
}

License

This project is licensed under the MIT License β€” see LICENSE for details.


Contact

Murat Raimbekov


Acknowledgments

  • Kyrgyztelekom β€” Public webcam infrastructure
  • IQAir, OpenWeatherMap β€” Air quality and weather APIs
  • AUCA β€” Research support

Last updated: December 28, 2025

About

Image-based PM2.5 air pollution estimation for Bishkek using urban webcams and deep learning

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published