Giter Club home page Giter Club logo

Comments (4)

wyg1997 avatar wyg1997 commented on July 21, 2024 1

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

from attentionpipeline.

previtus avatar previtus commented on July 21, 2024

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

from attentionpipeline.

previtus avatar previtus commented on July 21, 2024

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

from attentionpipeline.

previtus avatar previtus commented on July 21, 2024

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

from attentionpipeline.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.