Capture YouTube
Download the videos from Youtube
Find some channels in the YouTube like 잇츠유림 It’s U Limn . In their homepage, you may find many related videos like this.
Given the youtube link, we will try to download its max resolution:
# install the pytube
python3 -m pip install pytube
# download the video given the url
database=data/youtube
python3 scripts/dataset/download_youtube.py "https://www.youtube.com/watch?v=homrg6ZZMRY" --database ${database}
Extract the images and mannually clip
First extract the images.
# extract the videos to images
python3 apps/preprocess/extract_image.py ${database}
Mannually clip the images:
python3 apps/annotation/annot_clip.py ${database}
Main operations: a/d
for previous/next frame, w/s
for previous/next 100th frame. j
for recoding the start of the clip; k
for recording the end of the clip; l
for add this clip to database.
The arrow at the top indicates the current loaction | After press j , the red arrow shows the start position |
After press k , the right red arrow shows the end position |
---|---|---|
After press l , the clips will be red. |
Repeat this operation, you can record multiple clips. | |
- Some tutorial has different speed of the same motion, just use the most slow clip as it can give less motion blur.
After this annotation, copy the clips to ${data}
data=/path/to/output
python3 apps/annotation/annot_clip.py ${database} --copy --out ${data}