Signalyze is a traffic sign recognition system designed specifically for Indian roads. It uses computer vision and deep learning to detect and classify traffic signals into 37 predefined classes in real time. Once a traffic sign is recognized, the system provides an audio response, assisting drivers in navigating the busy roadways of India.
In addition to its core detection functionality, Signalyze includes an optional authentication system using NextAuth.js (Auth.js), Prisma ORM, and PostgreSQL. This authentication layer enables users to store each of their detections. The detections are then presented on a dashboard, where users can view overall statistics, detailed breakdowns (such as total detections, unique signs, and the most frequently detected sign), and interactive charts showing monthly trends by traffic sign type.
The system has been trained on the labelled Indian Road Traffic Sign Detection dataset and uses a YOLO v8 (small) model, achieving a mAP (mean Average Precision) of 82% (ranging from 50% to 95% across various classes).
-
Frontend:
-
Database and Authentication:
-
Backend:
-
Model:
- Node.js (v18 or above)
- Python (v3.8 or above)
- Git
- PostgreSQL
-
Clone the repository:
git clone https://github.com/Signalyze/www.git cd www
-
Install dependencies:
npm install
-
Prisma Setup:
- Ensure you have your database credentials set in your environment variables (see Environment Setup below).
- Run Prisma migrations to set up your database schema:
npx prisma migrate dev --name init
- (Optional) Open Prisma Studio to inspect your data:
npx prisma studio
-
NextAuth Setup:
- Make sure you have the required environment variables set (see Environment Setup below).
-
Run the development server:
npm run dev
Open localhost:3000 in your browser.
-
Clone the repository:
git clone https://github.com/Signalyze/backend.git cd backend
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install dependencies and run the FastAPI server:
pip install -r requirements.txt uvicorn index:app --reload
The API will be available at localhost:8000. Make sure this URL matches the
NEXT_PUBLIC_API_URL
in your environment settings.
Create a .env
file in the root of the frontend project as shown below:
# Detection API URL
NEXT_PUBLIC_API_URL=http://localhost:8000
# Connect to Database via connection pooling
DATABASE_URL=postgresql://username:password@localhost:5432/signalyze_db?pgbouncer=true
# Direct connection to the database. Used for migrations.
DIRECT_URL=postgresql://username:password@localhost:5432/signalyze_db
# NextAuth configuration
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-generated-secret
# Resend confirmation
RESEND_API_KEY=your-resend-api-key
EMAIL_FROM=[email protected]
-
NEXTAUTH_SECRET:
Generate a secret using:openssl rand -base64 32 # or npx auth secret
-
DATABASE_URL & DIRECT_URL:
- For local PostgreSQL, use the connection string format:
postgresql://username:password@localhost:5432/your_database
- For Supabase, check your project’s settings on the Supabase dashboard, click on connect button and copy the connection string.
- For local PostgreSQL, use the connection string format:
-
RESEND_API_KEY & EMAIL_FROM:
- Sign up at Resend and get an API key with sending access.
- Verify your email domain on Resend and use that address for
EMAIL_FROM
.
We welcome contributions from the community! If you would like to contribute to Signalyze, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Commit your changes with clear and descriptive messages.
- Submit a pull request detailing your changes.
This project is licensed under the MIT License.
For any questions, feedback, or support, please create an issue on the respective repository.