Process for constructing datasets
Video files >> ffmpeg processing >> picture sets >> labelimg for labeling >> labeled datasets
Prepare FFmpeg
Download by official , choose according to your machine type
Unzip the downloaded compressed package (i renamed the file for convenience)
>>>>>>>>>>>>>
Add the Bin directory under FFmpeg to the path of the system (the specific procedure for configuring environment variables is not repeated here ^ ^)
In Windows DOS, enter the following command to verify that the environment variable is already configured.
Ffmpeg-v
The results obtained are as follows, indicating that ffmpeg can be used.
Using FFmpeg for video framing, first go to the folder where the video is stored
Then go to PowerShell, enter the command to take the video frame, the format of the command is roughly: Ffmpeg-i video-R frames per second-Q:V picture quality parameter-F picture naming format (more usage asked Niang ^ ^)
Ffmpeg-i "Video.mp4"-R 1-q:v 2-f image2 vid_%d.jpeg
Get the extracted frame picture after carriage return
Install PYQT4 and lxml under the conditions of installing python2.7 and configuring environment variables and installing PIP and configuring environment variables
Install lxml, enter a command in DOS, and then download and install it automatically
Pip Install lxml
When the installation is complete, enter Python and enter
Import lxml
The resulting result, Python did not report an exception stating that the installation was successful
Install PYQT4, click the download L link to download, according to your own needs to download
After the download is complete, double-click to install, all the way next until the installation is complete
Download Open source labelimg on GitHub, here's the address
Download good after decompression, get a folder named: Labelimg-master, according to their own needs, in the data file to open the Predefined_classes.txt File Settings tab (I am set here as a bald, bear big, bear two)
Enter PowerShell in the Labelimg-master file
Execute Code First
Pyrcc4-o resources.py RESOURCES.QRC
Then execute the Code
Python labelimg.py
Now you can roll up the sleeves to mark the picture, there is open folder or open a picture (here I will never say that must be named in English )
Take a look (video quality is poor, the picture is not particularly clear, example ^ ^)
---restore content ends---
Windows FFmpeg + labelimg extract video frames get a picture set and label a picture to construct a dataset