pred_video_compressed2.mp4
Before you begin, ensure you have met the following requirements:
- You have installed Python 3.6 or later.
- You have a working installation of Jupyter Notebook.
- You have
pip
installed.
This project uses the following libraries and packages:
- argparse
- os
- matplotlib
- scipy
- numpy
- pandas
- PIL
- tensorflow
- yad2k
You can install the required packages using the following command:
pip install argparse os matplotlib scipy numpy pandas pillow tensorflow git+https://github.com/allanzelener/YAD2K.git
To use this project, follow these steps:
-
Clone the repository:
git clone https://github.com/justinliu23/real-time-object-detection.git cd <repository_directory>
-
Launch Jupyter Notebook:
jupyter notebook
-
Open the notebook file
Autonomous_driving_application_Car_detection.ipynb
and run the cells sequentially.
The application processes images to detect cars. Here is an example of how to use the provided functions:
-
Load and preprocess an image:
image, image_data = preprocess_image("path_to_image", model_image_size=(608, 608))
-
Load the YOLO model:
yolo_model = load_model("model_data/yolo.h5")
-
Run the model and get the output:
yolo_outputs = yolo_head(yolo_model.output, anchors, len(class_names))
-
Filter boxes:
scores, boxes, classes = yolo_eval(yolo_outputs, image_shape)
-
Draw bounding boxes:
draw_boxes(image, boxes, classes, class_names, scores)
- YOLO Model Integration: Utilizes the YOLO (You Only Look Once) model for object detection.
- Image Preprocessing: Supports image preprocessing including resizing and normalization.
- Bounding Box Visualization: Visualizes detected objects with bounding boxes.
- Confidence Thresholding: Filters detections based on confidence scores.
Configuration details for the YOLO model and detection parameters are as follows:
- YOLO Configuration Files: The project uses pre-trained weights and configuration files available from the YAD2K repository.
- Non-Max Suppression Threshold Settings: Modify the class score threshold as needed. For example:
threshold = 0.6