This project demonstrates real-time object and face detection using the YOLOv8 object detection model and OpenCV's face detection capabilities. It captures video from your webcam, detects objects using YOLOv8, detects faces using Haar cascades, and displays the results with bounding boxes and labels.
-
Clone the repository (optional): If you're using Git, you can clone the repository:
git clone: https://github.com/DeepPiCar/rachna-research-results.git
- python3 -m venv .venv # Or python -m venv .venv depending on your setup
- source .venv/bin/activate # On Windows: .venv\Scripts\activate
- python main.py
- The script will automatically use your default webcam (usually camera index 0).
- The script will display a window showing the video feed with detected objects and faces outlined. Object labels and confidence scores are displayed for detected objects, and "Face" is displayed for detected faces. The number of objects and faces detected are also shown.
- ultralytics: For using the YOLOv8 object detection model.
- opencv-python: For image processing, face detection (Haar cascades), and video capture.
- numpy: (Implicitly a dependency of opencv-python) For numerical operations on images.
