video-classification icon indicating copy to clipboard operation
video-classification copied to clipboard

Change to my own dataset

Open iqrammm opened this issue 5 years ago • 5 comments

Is it possible to use my own dataset,if yes please do guide me on the steps.

iqrammm avatar Jun 24 '19 23:06 iqrammm

were you able to run it with your own dataset?

shumailaahmed avatar Aug 14 '21 17:08 shumailaahmed

Hi! Not sure if you're still trying to run this but you're able to use any dataset so long as you provide the proper files: function.py (This is already present in the folders) < yourDataSet >.py (This contains parameters for the models you want to run, you can alter the data path and the like here) < yourDataSet >.pkl (This is a pickle file/dictionary that contains the action labels of your dataset, you can save your own by using pickle.dump into the directory)

The biggest difference has to do with separating your data. Your data path should lead to a directory that contains a subdirectory for each video segment you want to process. The program parses for directories that begin with 'v_'< actionLabel >_g' for each video. The repository takes in all directories from the data path that you define in < yourDataSet >.py and enters each directory looking for frame000001.jpg to frame< max frame # >.jpg (Make sure to zero pad it!), so you just have to make sure each video gets its own directory with each frame renamed accordingly. After that, it's a simple as running the < yourDataSet >.py file!

Good luck!

Jae-Domain avatar Oct 05 '21 17:10 Jae-Domain

Hi! Not sure if you're still trying to run this but you're able to use any dataset so long as you provide the proper files:function.py (This is already present in the folders)< yourDataSet >.py (This contains parameters for the models you want to run, you can alter the data path and the like here)< yourDataSet >.pkl (This is a pickle file/dictionary that contains the action labels of your dataset, you can save your own by using pickle.dump on a python directory)

The biggest difference has to do with separating your data. Your data path should lead to a directory that contains a subdirectory for each video segment you want to process. The program parses for directories that begin with 'v_'< actionLabel >_g' for each video. The repository takes in all directories from the data path that you define in < yourDataSet >.py and enters each directory looking for frame000001.jpg to frame< max frame # >.jpg (Make sure to zero pad it!), so you just have to make sure each video gets its own directory with each frame renamed accordingly. After that, it's a simple as running the < yourDataSet >.py file!

Good luck!

hello,Can you explain the meaning of data in .pkl to me like the following: 'v_ApplyEyeMakeup_g01_c06': 122, 'v_ApplyEyeMakeup_g02_c01': 169, 'v_ApplyEyeMakeup_g02_c02': 146, 'v_ApplyEyeMakeup_g02_c03': 216, 'v_ApplyEyeMakeup_g02_c04': 169, 'v_ApplyEyeMakeup_g03_c01': 208, 'v_ApplyEyeMakeup_g03_c02': 133, 'v_ApplyEyeMakeup_g03_c03': 114, 'v_ApplyEyeMakeup_g03_c04': 107, 'v_ApplyEyeMakeup_g03_c05': 146.

What's the meaning of the number value Waiting for your reply

Chengzhig avatar Oct 22 '21 08:10 Chengzhig

hello,Can you explain the meaning of data in .pkl to me like the following: 'v_ApplyEyeMakeup_g01_c06': 122, 'v_ApplyEyeMakeup_g02_c01': 169, 'v_ApplyEyeMakeup_g02_c02': 146, 'v_ApplyEyeMakeup_g02_c03': 216, 'v_ApplyEyeMakeup_g02_c04': 169, 'v_ApplyEyeMakeup_g03_c01': 208, 'v_ApplyEyeMakeup_g03_c02': 133, 'v_ApplyEyeMakeup_g03_c03': 114, 'v_ApplyEyeMakeup_g03_c04': 107, 'v_ApplyEyeMakeup_g03_c05': 146.

I'm not entirely sure where that string of data is coming from. Where did you find it?

Loading a pickle file should only result in the labels being printed, for instance, this is the output of unpickling the UCF101actions.pkl file: ['PommelHorse', 'Surfing', 'HammerThrow', 'PlayingViolin', 'WallPushups', 'PullUps', 'PizzaTossing', 'SalsaSpin', 'Shotput', 'CricketShot', 'HorseRiding', 'CliffDiving', 'Rowing', 'BenchPress', 'SkyDiving', 'BaseballPitch', 'Lunges', 'Haircut', 'JumpRope', 'Kayaking', 'GolfSwing', 'FrontCrawl', 'Bowling', 'RopeClimbing', 'BoxingSpeedBag', 'ShavingBeard', 'Swing', 'RockClimbingIndoor', 'ParallelBars', 'Fencing', 'Diving', 'TrampolineJumping', 'PlayingDhol', 'ApplyEyeMakeup', 'HandstandWalking', 'BandMarching', 'Skijet', 'BrushingTeeth', 'Billiards', 'LongJump', 'TennisSwing', 'BreastStroke', 'Mixing', 'TableTennisShot', 'Punch', 'VolleyballSpiking', 'PlayingCello', 'JugglingBalls', 'ApplyLipstick', 'Rafting', 'Hammering', 'BalanceBeam', 'Knitting', 'Drumming', 'HighJump', 'PlayingTabla', 'BodyWeightSquats', 'PlayingPiano', 'HandstandPushups', 'TaiChi', 'Typing', 'SoccerPenalty', 'JavelinThrow', 'PlayingDaf', 'Biking', 'CricketBowling', 'BlowingCandles', 'SkateBoarding', 'SoccerJuggling', 'BasketballDunk', 'CleanAndJerk', 'HeadMassage', 'FloorGymnastics', 'SumoWrestling', 'BabyCrawling', 'HulaHoop', 'FieldHockeyPenalty', 'MoppingFloor', 'Skiing', 'BlowDryHair', 'PoleVault', 'Basketball', 'MilitaryParade', 'PushUps', 'HorseRace', 'PlayingSitar', 'WalkingWithDog', 'PlayingGuitar', 'StillRings', 'UnevenBars', 'Archery', 'BoxingPunchingBag', 'CuttingInKitchen', 'ThrowDiscus', 'Nunchucks', 'WritingOnBoard', 'YoYo', 'PlayingFlute', 'IceDancing', 'FrisbeeCatch', 'JumpingJack']

You can find more information about pickle files here: https://pythonnumericalmethods.berkeley.edu/notebooks/chapter11.03-Pickle-Files.html

I hope this helps!

Jae-Domain avatar Oct 22 '21 23:10 Jae-Domain

hello,Can you explain the meaning of data in .pkl to me like the following: 'v_ApplyEyeMakeup_g01_c06': 122, 'v_ApplyEyeMakeup_g02_c01': 169, 'v_ApplyEyeMakeup_g02_c02': 146, 'v_ApplyEyeMakeup_g02_c03': 216, 'v_ApplyEyeMakeup_g02_c04': 169, 'v_ApplyEyeMakeup_g03_c01': 208, 'v_ApplyEyeMakeup_g03_c02': 133, 'v_ApplyEyeMakeup_g03_c03': 114, 'v_ApplyEyeMakeup_g03_c04': 107, 'v_ApplyEyeMakeup_g03_c05': 146.

I'm not entirely sure where that string of data is coming from. Where did you find it?

Loading a pickle file should only result in the labels being printed, for instance, this is the output of unpickling the UCF101actions.pkl file: ['PommelHorse', 'Surfing', 'HammerThrow', 'PlayingViolin', 'WallPushups', 'PullUps', 'PizzaTossing', 'SalsaSpin', 'Shotput', 'CricketShot', 'HorseRiding', 'CliffDiving', 'Rowing', 'BenchPress', 'SkyDiving', 'BaseballPitch', 'Lunges', 'Haircut', 'JumpRope', 'Kayaking', 'GolfSwing', 'FrontCrawl', 'Bowling', 'RopeClimbing', 'BoxingSpeedBag', 'ShavingBeard', 'Swing', 'RockClimbingIndoor', 'ParallelBars', 'Fencing', 'Diving', 'TrampolineJumping', 'PlayingDhol', 'ApplyEyeMakeup', 'HandstandWalking', 'BandMarching', 'Skijet', 'BrushingTeeth', 'Billiards', 'LongJump', 'TennisSwing', 'BreastStroke', 'Mixing', 'TableTennisShot', 'Punch', 'VolleyballSpiking', 'PlayingCello', 'JugglingBalls', 'ApplyLipstick', 'Rafting', 'Hammering', 'BalanceBeam', 'Knitting', 'Drumming', 'HighJump', 'PlayingTabla', 'BodyWeightSquats', 'PlayingPiano', 'HandstandPushups', 'TaiChi', 'Typing', 'SoccerPenalty', 'JavelinThrow', 'PlayingDaf', 'Biking', 'CricketBowling', 'BlowingCandles', 'SkateBoarding', 'SoccerJuggling', 'BasketballDunk', 'CleanAndJerk', 'HeadMassage', 'FloorGymnastics', 'SumoWrestling', 'BabyCrawling', 'HulaHoop', 'FieldHockeyPenalty', 'MoppingFloor', 'Skiing', 'BlowDryHair', 'PoleVault', 'Basketball', 'MilitaryParade', 'PushUps', 'HorseRace', 'PlayingSitar', 'WalkingWithDog', 'PlayingGuitar', 'StillRings', 'UnevenBars', 'Archery', 'BoxingPunchingBag', 'CuttingInKitchen', 'ThrowDiscus', 'Nunchucks', 'WritingOnBoard', 'YoYo', 'PlayingFlute', 'IceDancing', 'FrisbeeCatch', 'JumpingJack']

You can find more information about pickle files here: https://pythonnumericalmethods.berkeley.edu/notebooks/chapter11.03-Pickle-Files.html

I hope this helps!

this data is from /ResNetCRNN_varylength/UCF101_frame_count.pkl

Chengzhig avatar Oct 23 '21 00:10 Chengzhig