Vehicle AI is a web app that uses Generative AI to identify any vehicle. Utilizing Google's Gemini model, it can detect a vehicle's make, model, color, and year from an image.
- Image upload through file selection or drag-and-drop.
- AI-based identification of vehicle make, model, color, and year.
- Display of car manufacturer logo (when available).
- User-friendly interface with animations.
- Responsive design.
To get started with Vehicle AI, follow these steps:
-
Clone the repository:
git clone https://github.com/detalhe/vehicle-ai.git cd vehicle-ai
-
Install dependencies:
npm install
-
Set up environment variables: Create a
.env
file in the root directory and add your Google Gemini API key:GOOGLE_API_KEY=your_google_api_key
To get an API key, visit ai.google.dev and follow the instructions to create a project and generate a key.
-
Run the application:
npm start
-
Deploy on Vercel (Optional): Ensure you have the
vercel.json
configuration file in place and deploy using Vercel CLI:vercel
- Open your browser and navigate to
http://localhost:3000
. - Upload an image of a vehicle.
- Wait for the AI to analyze the image and display the vehicle information.
vehicle-ai/
├── node_modules/
├── public/
│ ├── css/
│ │ └── index.css
│ ├── img/
│ │ ├── favicon.ico
│ │ ├── default.jpg
│ │ └── preview.jpg
│ └── js/
│ └── script.js
├── views/
│ └── index.ejs
├── .env
├── index.js
├── package.json
├── package-lock.json
└── vercel.json
- public/: Contains static assets such as CSS, images, and JavaScript files.
- views/: Contains EJS templates for rendering HTML.
- index.js: Main server file.
- vercel.json: Configuration for deploying on Vercel.
The project relies on the following npm packages:
@google/generative-ai
: ^0.12.0axios
: ^1.7.2dotenv
: ^16.4.5ejs
: ^3.1.10express
: ^4.19.2multer
: ^1.4.5-lts.1uuid
: ^9.0.1
Contributions are welcome! :)
- Thanks to Dan Nelson for the car-makes-icons repository, which provides the car manufacturer logos used in this project.
This project is licensed under the MIT License. See the LICENSE file for details.