Giter Site home page Giter Site logo

Comments (5)

zhanghaoinf avatar zhanghaoinf commented on July 26, 2024

import pickle
f = open('pyannot.pkl','rb')
data = pickle.load(f)

data: a dict, with relative videopath as key. Example key: 'BasketballDunk/v_BasketballDunk_g01_c03'

data[videopath]['label'] # categroy index, from 0 ~ 23 for UCF24 (int)
data[videopath]['numf'] # number of frames in the video. (numpy,uint32)
data[videopath]['annotations'][Tube_INDEX]['sf'] # *** tube start-frame, 0 denotes 1-st frame (int)
data[videopath]['annotations'][Tube_INDEX]['ef'] # *** tube end-frame (my understanding: "ef" is not included), maxmum 'numf' (int)
data[videopath]['annotations'][Tube_INDEX]['label'] # tube label (int)
data[videopath]['annotations'][Tube_INDEX]['boxes'] # tube boxes, len(boxes) should be the same with ef - sf

Tube_INDEX denotes index number of a tube intance in a video

xmin = box[0]
xmax = box[0] + box[2]
ymin = box[1]
ymax = box[1] + box[3]

xmin and xmax both are in range [1, 320], (width = 320)
ymin and ymax both are in range [1, 240], (height = 240)

I am not sure whether the *** part is correct ? @gurkirt

from realtime-action-detection.

gurkirt avatar gurkirt commented on July 26, 2024

@jack99541008

  1. it doesn't have to be in this format. You can have any format you like. All you need to understand is how pytorch's dataset class work. You need to implement getitem call for any new dataset rest is upto you.
  2. you might want to look at folder dataset class in pytorch.

from realtime-action-detection.

gurkirt avatar gurkirt commented on July 26, 2024

@zhanghaoinf I don't understand your question completely. What do you mean by ***?
But, yes, xmin and xmax both are in range [1, 320], (width = 320) .....

from realtime-action-detection.

zhanghaoinf avatar zhanghaoinf commented on July 26, 2024

Hi, @gurkirt , I found when a tube span in a whole video duration, 'sf' is set to 0 and 'ef' is set to 'numf''.
If 'ef' is included, frame indexes will be [0,1,2,..., numf ], resulting indexing a non-existing frame. I guess that 'ef' is not included in a tube, and frame indexes is [0, 1, 2, ..., ef-1].

from realtime-action-detection.

gurkirt avatar gurkirt commented on July 26, 2024

yes, python index = range(numf) does that for you.

from realtime-action-detection.

Related Issues (20)

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.