Breaking the Red Tape of Congestion and Inefficiency
|Signal-X is an AI-driven smart traffic management system that uses advanced computer vision, Arduino-controlled signals, and MapmyIndiaโs geospatial analytics to optimize traffic flow in real-time. It prioritizes emergency vehicles, prevents congestion, and enhances road safety through dynamic signal adjustments using live video feeds. Scalable and future-ready, Signal-X is adaptable for cities of all sizes, making urban commuting smarter and more efficient.
With rapid urbanization and an ever-increasing number of vehicles, cities are choking under intense traffic congestion. What should be smooth commutes turn into daily nightmares, leading to:
- โฑ๏ธ Wasted Time stuck in endless queues
- โฝ Higher Fuel Consumption and rising transportation costs
- ๐ซ๏ธ Increased Pollution and carbon emissions
- ๐จ Delayed Emergency Responses for ambulances, fire trucks, and police
- ๐ Driver Frustration and rising road rage incidents
Traditional traffic systems follow fixed-timer logic, blindly rotating signals without considering real-time traffic flow. This outdated mechanism leads to:
- ๐ข Green lights on empty roads, wasting valuable intersection time
- ๐ด Vehicle pile-ups in busy lanes, creating bottlenecks
- ๐ Emergency vehicles stuck, unable to move swiftly through intersections
- ๐งโโ๏ธ Manual control dependency, requiring more manpower
- ๐ง No AI, No Adaptability, making systems unresponsive and inefficient
Itโs time to move beyond timers and take the smart route to traffic management.
Signal-X is an AI-driven Smart Traffic Management System that transforms urban mobility using the power of computer vision, IoT, and geospatial intelligence. Designed to be scalable, real-time, and intelligent, Signal-X optimizes traffic flow, reduces congestion, and ensures faster emergency response through dynamic signal control.
-
๐ง AI-Powered Traffic Analysis
YOLOv8-based object detection continuously monitors vehicle flow across all junction lanes. -
โฑ๏ธ Dynamic Signal Adjustment
Adaptive signal control based on real-time congestion and traffic density patterns. -
๐ IoT Integration
Raspberry Pi/Arduino-based controllers ensure seamless traffic light control and emergency detection. -
๐บ๏ธ Geospatial Intelligence
Integration with MapMyIndia's API offers live congestion updates and smart rerouting. -
๐ Emergency Vehicle Prioritization
Automatically detects emergency vehicles (ambulance, fire brigade, police) and gives them green-light priority. -
๐ฎ Congestion Prediction
AI models analyze historical + real-time data to predict and prevent traffic bottlenecks.
Signal-X operates through a seamless, AI-driven pipeline that integrates video processing, intelligent decision-making, and hardware-level execution.
![]() |
![]() |
-
๐ฅ Live Data Collection
- RTSP streams from CCTV cameras and drones provide real-time traffic video feeds.
-
๐บ๏ธ Traffic API Integration
- Feeds are passed to MapMyIndia Traffic API for real-time congestion data enrichment.
-
๐ง Vehicle Detection using YOLOv8
- Vehicles are identified and classified into 5 categories:
๐ Ambulance, ๐งฌ Organ Transport, ๐ Fire Brigade, ๐ Police, ๐ Disaster Units
- Vehicles are identified and classified into 5 categories:
-
๐ Real-Time Multiprocessing
- Uses Pythonโs multiprocessing to analyze all four lanes at a junction simultaneously for accurate density analysis.
-
๐งฎ Smart Signal Optimization
- A custom AI model determines the optimal green-light timing using:
- ๐ Vehicle Density
- ๐ Historical Traffic Patterns (via Reinforcement Learning)
- ๐ก Live API Congestion Data
- A custom AI model determines the optimal green-light timing using:
-
๐ IoT-Based Hardware Integration
- Arduino module integrated into the junction system.
- If an emergency vehicle is detected, immediate green signal is activated and maintained until it passes.
-
๐ฅ๏ธ Real-Time Dashboard (React)
- Officers monitor and visualize traffic flow and system decisions via a React-based dashboard in real-time.
Unlike traditional fixed-timer systems, Signal-X uses real-time intelligence and automation to enhance traffic efficiency, reduce delays, and save lives.
โ
Smart
โ
Scalable
โ
Emergency-Ready
โ
Real-Time
โ
AI-Optimized
-
Data Collection Layer
- CCTV cameras & drones capture live video feeds
- Microphone sensors detect emergency vehicle sirens
- IoT devices (Raspberry Pi & Arduino) process sensor inputs
-
AI Processing Layer
- YOLOv8 for vehicle detection and classification
- DeepSORT for vehicle tracking
- OpenCV for image processing
- Flask for API management
-
Backend Processing
- MongoDB for data storage
- WebSocket for real-time communication
- Traffic analysis algorithms
-
Frontend Dashboard
- React-based responsive interface
- Real-time traffic analytics visualization
- MapMyIndia integration for geospatial display
-
Signal Control System
- Priority-based signal switching for emergency vehicles
- Adaptive traffic light control based on congestion analysis
Signal-X is built using a powerful blend of AI, hardware, geospatial analytics, real-time systems, and scalable web technologies. Here's everything under the hood:
Tech | Purpose |
---|---|
โ๏ธ React.js | Dynamic, component-based UI |
๐บ๏ธ MapMyIndia SDK | Interactive maps & live traffic visualization |
๐ Tailwind CSS | Modern utility-first styling |
๐ก WebSocket | Real-time UI updates & traffic stats |
๐ Axios | API requests and data fetching |
๐ฑ React Native (Expo) | Mobile traffic monitor app (optional extension) |
Tech | Purpose |
---|---|
๐ง YOLOv8 | High-speed vehicle detection & classification |
๐ฅ OpenCV (cv2) | Image & video stream processing |
๐ NumPy, SciPy | Traffic data analytics |
๐ Matplotlib | Data visualization and graphs |
๐ฌ Ultralytics | YOLOv8 training and inference |
๐ง Reinforcement Learning | Intelligent signal timing optimization |
Tech | Purpose |
---|---|
๐ Flask | RESTful API backend (Python) |
๐ WebSocket (Flask-SocketIO) | Real-time data sync with frontend |
๐ MongoDB | NoSQL database for storing traffic history & logs |
โ๏ธ Express.js + Node.js | API support for mobile & hardware integrations |
Component | Role |
---|---|
๐ก Arduino UNO | Signal & sensor control unit |
๐ CZN15E Sound Sensor | Detects approaching emergency sirens |
๐ฅ OV7670 Camera Module | Captures live video for CV analysis |
๐ HC-SR04 Ultrasonic Sensor | Measures distance & lane occupancy |
๐ก LEDs, ๐งฒ Buzzer, ๐ Jumper Wires, ๐ณ Breadboard | Circuit components for signal light system |
๐ง Arduino IDE + Embedded C/C++ | Logic programming and testing |
๐ฅ๏ธ Serial Monitor | Debugging and communication with PC |
Tool | Use |
---|---|
๐งฉ Pygame | Simulating traffic flow for testing |
๐ Scikit-learn | Optional ML utilities |
๐งช Matplotlib | Data analysis visualization |
๐ง Gemini API | Optional AI assistance (integration idea) |
๐ Signal-X combines real-world sensors, cutting-edge AI, and cloud-based data pipelines to create a future-ready traffic management solution.
- Python 3.8+
- Node.js and npm
- MongoDB
- MapmyIndia API key
- Gemini API key
- Arduino IDE
- Clone the repository
git clone https://github.com/ArshTiwari2004/Signal-X.git cd Signal-X
- Setup Frontend
cd traffic-monitoring/frontend/web/signalx-web npm install
- Create a .env file in the root of the frontend directory with:
VITE_MAPPLS_SDK_KEY=your_mapmy_india_sdk_key
- Start the development server:
npm run dev
- Setup Backend - Create and activate a virtual environment:
python -m venv venv venv\Scripts\activate # Windows source venv/bin/activate # Linux/Mac
- Install the required packages:
pip install -r requirements.txt
- Start the Flask server:
python backend/flask_api.py
- For running the Expo project on mobile
cd mobile-app/signalx-mobile npm i
- Set up your GEMINI_API_KEY in .env
VITE_GEMINI_API_KEY=your_gemini_api_key
- Run the app
npx expo start
- Setting up the expo backend
cd mobile-app/mobile-backend
npm i
-
Set up env variables for expo backend
TWILIO_ACCOUNT_SID=your_twilio_account_sid_here TWILIO_AUTH_TOKEN=your_twilio_auth_token_here TWILIO_PHONE_NUMBER=your_twilio_phone_number_here MONGO_URI=your_mongodb_connection_string_here
-
Run the Mobile Backend Server
npm run dev
-
Setup the Arduino IDE
# โ๏ธ How to Upload
1. Open the `.ino` files using the Arduino IDE.
2. Select the correct board and port: - Tools > Board > (e.g., Arduino UNO) - Tools > Port > (Select the connected COM port)
3. Connect your Arduino (e.g., UNO, Nano, etc.) via USB.
4. Click the "Upload" button in the Arduino IDE (โก๏ธ icon).
5. Ensure all required components (Servo motors, LEDs, Buzzer, etc.) are connected as per the logic in the code.
signal-x/
โโโ Arduino_code/
โ โโโ sketch_Camera/
โ โ โโโ sketch_Camera.ino # Controls CCTV pan/tilt
โ โโโ sketch_LED_Buzzer/
โ โโโ sketch_LED_Buzzer.ino # Controls signal lights & alarms
โ
โโโ mobile-app/
โ โโโ mobile-backend/
โ โ โโโ config/
โ โ โ โโโ db.js # MongoDB connection
โ โ โ โโโ dotenv.js # API keys config
โ โ โโโ models/
โ โ โ โโโ Incident.js # Report schema
โ โ โ โโโ User.js # Auth schema
โ โ โโโ routes/
โ โ โโโ authRoutes.js # Login/register endpoints
โ โ โโโ incidentRoutes.js # Report submission
โ โ
โ โโโ signalx-mobile/
โ โโโ components/
โ โ โโโ EmergencyAlert.js # Siren detection UI
โ โ โโโ LiveTrafficLight.js # Real-time signal status
โ โโโ screens/
โ โโโ HomeScreen.js # Main dashboard
โ โโโ ReportScreen.js # Incident form
โ
โโโ traffic-monitoring/
โ โโโ backend/
โ โ โโโ templates/ # Admin panel HTML
โ โ โโโ ambulance_detection.py # Priority vehicle logic
โ โ โโโ traffic_control.py # Signal timing algorithms
โ โ
โ โโโ frontend/
โ โ โโโ web/
โ โ โโโ signalx-web/
โ โ โโโ src/
โ โ โโโ components/ # Reusable UI elements
โ โ โโโ pages/ # Route-specific pages
โ โ โโโ routes/ # Navigation config
โ โ
โ โโโ models/ # AI models
โ โ โโโ yolov8n.pt # Vehicle detection weights
โ โ โโโ siren_detection.h5 # Audio classification
โ โ
โ โโโ simulations/ # Traffic simulations
โ โ โโโ rippling_effect.py # Congestion spread model
โ โ โโโ traffic_simulator.py # Junction flow simulator
โ โ
โ โโโ utils/ # Utility scripts
โ โ
โ โ
โ โ
โ โโโ alert.wav # Emergency sound
โ โโโ dashboard.png # Admin UI mockup
โ โโโ README.md # Setup instructions
RTSP streams processed in real-time
- Use AI-based license plate recognition to detect vehicles running red lights. Integrated with government databases, the system can auto-generate challans, improving law enforcement efficiency.
- Leverage reinforcement learning to optimize signal timings based on real-time and historical traffic data, ensuring faster clearance for emergency vehicles and smoother traffic flow.
- Utilize AI to detect accidents or breakdowns via CCTV analysis. The system can instantly alert authorities and reroute traffic to prevent congestion.
- Fork the repository
- Create your feature branch (git checkout -b feature/amazing-feature)
- Commit your changes (git commit -m 'Add some amazing feature')
- Push to the branch (git push origin feature/amazing-feature)
- Open a Pull Request
โค๏ธ Made with love by Team Synapse โ Arsh Tiwari, Priyanshi Bothra, and Nibedan Pati
๐ฉ Have a suggestion or want to connect? Drop a mail at: [email protected]