This project demonstrates real-time object classification on webcam video frames using a pre-trained Keras model.
- Python 3.7 or higher
- TensorFlow 2.6.0
- Keras 2.6.0
- OpenCV 4.5.3.56
- Clone the repository:
git clone https://github.com/your-username/your-repo.git
-
Navigate to the project directory: cd object-classification-with-webcam
-
Install the required dependencies:
pip install -r requirements.txt
-
Ensure your webcam or capture device is connected to your computer.
-
Run the program:
-
The program will start capturing video frames from the webcam and perform real-time object classification. The predicted class labels and confidence scores will be printed on the console.
-
Press the ESC key to exit the program.
-
If you have your own pre-trained Keras model, replace
keras_Model.h5
with your model file in the code (main.py
). -
Modify the code to customize the input shape, model architecture, or any other aspects as per your requirements.
Contributions are welcome! If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request.
This project is licensed under the MIT License.