Skip to content

Real-time traffic congestion analysis and route optimization app for Singaporean drivers.

Notifications You must be signed in to change notification settings

ZhiXin18/Flowmotion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flowmotion Banner

Flowmotion

Real-time traffic congestion analysis and route optimization app for Singaporean drivers. Flowmotion uses computer vision to analyze traffic camera feeds for live traffic congestion rating and provide intelligent routing recommendations based on inferred congestion rating.

Features

  • 🚦 Real-time traffic congestion analysis using YOLOv8
  • 🗺️ Intelligent route optimization with OSRM
  • 📊 Historical traffic pattern visualization
  • 📍 Favorite locations management
  • 📱 Cross-platform mobile app (iOS & Android)

Architecture

---
title: "Flowmotion System Architecture"
---
block-beta
    columns 1
    block:present_layer
        columns 7
        space:3 present["Presentation Layer"] space:3
        space:2 app("Mobile App") space:1 email["Email"] space:2
    end

    block:logic_layer
        columns 7
        space:3 logic["Logic Layer"] space:3
        backend["Backend"] space osrm_c["OSRM\n(congestion)"] space pipeline["Pipeline"] space model["Model"]
        backend -- "Routes \n (congestion)" --> osrm_c
        pipeline -- "Rating" --> model
        osrm_c -- "Congestion \nrouting\nprofile" --> pipeline
    end

    space

    block:data_layer
        columns 7
        space:3 data["Data Layer"] space:3
         osrm(("OSRM API")) space db[("Firestore DB")] space auth["Firebase\nAuthentication"] space api(("Data.gov.sg\nAPI"))
    end

    app -- "User data" --> db
    app -- "User login" --> auth
    app -- "Routing,  Geocoding\n & Congestion" --> backend
    email -- "Receive OTP" --> auth
    app -- "Enter OTP" --> email
    pipeline -- "Traffic Images" --> api
    backend -- "Read congestion" --> db
    backend -- "Routes\n(no congestion)" --> osrm
    pipeline -- "Write congestion" --> db

classDef Routing fill:#696
class present,logic,data,external BT
classDef BT stroke:transparent,fill:transparent,font-size:1.2rem;
Loading

Tech Stack

  • Frontend: Flutter
  • Backend: Express.js, Firebase
  • ML Pipeline: YOLOv8, PyTorch
  • Infrastructure: Google Cloud Run, Docker

Getting Started

Prerequisites

  • Flutter >=3.24.1
  • Node.js >=18
  • Docker
  • Firebase CLI

Setup

  1. Clone the repository
git clone https://github.com/flowmotion/flowmotion.git
cd flowmotion
  1. Install dependencies
  • Backend
# Backend
cd backend
npm install

- Mobile App
```bash
# Mobile
flutter pub get
  1. Run Development builds
  • Backend
# Run backend locally
cd backend
npm run dev
  • Mobile App
# Run Flutter app
flutter run

Performance

  • Image Processing: ~124ms/image
  • ML Model Accuracy: 80% (vehicles)
  • Route Update Latency: <332s

Acknowledgments

  • data.gov.sg for traffic camera feeds
  • OSRM for route optimization engine
  • YOLOv8 for computer vision model
  • Singapore Land Transport Authority for traffic data