Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A question about PEViD-UHD dateset #1

Closed
wyg1997 opened this issue Aug 10, 2019 · 4 comments
Closed

A question about PEViD-UHD dateset #1

wyg1997 opened this issue Aug 10, 2019 · 4 comments

Comments

@wyg1997
Copy link

wyg1997 commented Aug 10, 2019

Thanks for your research!

I want to use PEViD-UHD dataset to run a object detection with 4k~8k images.
But the video I downloaded from ftp server at "tremplin.epfl.ch/PEViD-UHD/Original_UHD_MP4/" is 30 fps and about 1060 frames in all.
Strangely, the annotation files ( e.g. Exchanging_bags_day_indoor_1_4K.xgtf ) just have 390 frames in all. And the number of frames are different.

Have I downloaded the wrong files?

I really appreciate if you could tell me how to do.

There are two images showing the different informations.
image
image

@previtus
Copy link
Owner

Hello wyg1997,
I came across similar difficulties when dealing with the PEViD-UHD dataset. The original videos are longer than the annotated segments and if I am not mistaken, there was no easy way how to find where they start.

I extracted frames at 30 fps and then found where each segment starts (manually checking every sequence).

You can try if this works for you as well on one example video "Exchanging_bags_day_indoor_2_original.mp4":

  • Convert video to frames at 30 fps:
    ffmpeg -i Exchanging_bags_day_indoor_2_original.mp4 -vf fps=30 frame_%d.jpg

  • For this video I found the annotation to fit the range of frames:
    frame_186.jpg to frame_541.jpg

  • (Optional) I was working with annotation converted into the format used by LabelImg from the .xgtf format (in this case it would be Exchanging_bags_day_indoor_2_4K.xgtf) which can be also used to manually check the results. The conversion was done using: _side_projects/annotation_conversion/convert_pevid_to_bboxes.py
    If you want to use it, prepare the extracted folder by keeping only files frame_186.jpg to frame_541.jpg and then change paths:
    input_gt_file = "Exchanging_bags_day_indoor_2_4K.xgtf" (downloaded from the website)
    output_folder = "Exchanging_bags_day_indoor_2_original_frames/" (where you extracted frames using ffmpeg)

If this works for you, I can dig around my hard drives and find the ranges for other videos I worked with:

  • Exchanging_bags_day_indoor_2
  • Exchanging_bags_day_indoor_3
  • Exchanging_bags_day_outdoor_4
  • Exchanging_bags_day_outdoor_5
  • Stealing_day_indoor_2
  • Stealing_day_indoor_3
  • Stealing_day_indoor_4
  • Stealing_day_outdoor_5
  • Stealing_day_outdoor_8
  • Stealing_day_outdoor_9

I remember this being a bit painful at the start, but when I processed them I was only working with my exported files and didn't need to worry about the original files.

Hope this helps :),
~ Vitek

@previtus
Copy link
Owner

labelImg_screen
^^ This is what you end up eventually getting... (labelImg is quite good to sanity-check the data)

@previtus
Copy link
Owner

Using this command:
ffmpeg -i <video file name>.mp4 -vf fps=30 %04d.jpg

Video file Corresponding frames
Exchanging_bags_day_indoor_2 0186.jpg - 0541.jpg
Exchanging_bags_day_indoor_3 0125.jpg - 0416.jpg
Exchanging_bags_day_outdoor_4 0061.jpg - 0325.jpg
Exchanging_bags_day_outdoor_5 0100.jpg - 0419.jpg
Stealing_day_indoor_2 0157.jpg - 0366.jpg
Stealing_day_indoor_3 0213.jpg - 0597.jpg
Stealing_day_indoor_4 0364.jpg - 0600.jpg
Stealing_day_outdoor_5 0117.jpg - 0482.jpg
Stealing_day_outdoor_8 0090.jpg - 0419.jpg
Stealing_day_outdoor_9 0140.jpg - 0370.jpg

@wyg1997
Copy link
Author

wyg1997 commented Aug 19, 2019

Thanks for your help. It is very helpful for me to get the right images dataset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants