This project consists of two main scripts: video2frame.py
and generate_label.py
. These scripts facilitate the conversion of a video into individual frames and the generation of YOLO format labels for the detected objects in each frame.
video2frame.py
: Python script to convert a video into individual frames.generate_label.py
: Python script to generate YOLO format labels for the detected objects in the frames.labels/
: Folder to store the generated YOLO format labels.model/
: Folder containing the pre-trained YOLO model and related files.output_frame/
: Folder to store the output frames extracted from the video.
- Place your input video file in the project folder.
- Run
video2frame.py
to convert the video into individual frames. The output frames will be saved in theoutput_frame/
folder. - Run
generate_label.py
to generate YOLO format labels for the detected objects in the frames. The generated labels will be stored in thelabels/
folder.
- Python 3.9
- OpenCV (cv2)
- Pre-trained YOLO model (located in the
model/
folder)