3D-ResNets-PyTorch icon indicating copy to clipboard operation
3D-ResNets-PyTorch copied to clipboard

I don't have the JSON file

Open kpis-msa opened this issue 3 years ago • 7 comments

I'd like to use this model using the Japanese dataset as follows: https://actions.stair.center/

But I don't have an annotation JSON file for the below option. --annotation_path kinetics.json

Please tell me how to predict using a trained model (~/data/results/save_200.pth.)

kpis-msa avatar Nov 13 '20 05:11 kpis-msa

Hello, did you solve this problem? I got the same problem, I hope you can share the method to me, thank you so much!

huangyibo1996 avatar Dec 12 '20 07:12 huangyibo1996

In fact, in opts.py file of the original poject, too many parameters were set to None, and I don't even know how to complement it.

huangyibo1996 avatar Dec 12 '20 07:12 huangyibo1996

Any leads on this?

h44rd avatar Mar 11 '21 23:03 h44rd

I used the following command to perform predictions using the pre-trained models

"python main.py --root_path "+%directory path where the data is stored%+" --video_path %path to extracted jpg% --annotation_path test.json "+"--result_path results --dataset %does not really matter but put ucf101 or kinetics% --resume_path "+%model_path%+" --model_depth 50 --n_classes 700 --no_train --no_val --inference --output_topk 1 --inference_batch_size 1"

Here I create the test.json myself. An entry in the json would look something like this:

{
    "labels": [%labels list%],
    "database": 
     {
         "%video_id%":
           {
                "subset": "%subsetname eg. validation, train%",
                "annotations": 
                 { 
                      "segment": [ %start frame num%, %end frame num%]
                 }
                 "video_path" : "%absolute path to video%"
           }
           %next video id%:
           {
            %same as above %
           }
    }
}

Purav-Zumkhawala avatar Mar 21 '21 18:03 Purav-Zumkhawala

Could you please elaborate what "annotations" should be in the case of test videos?

h44rd avatar Apr 29 '21 00:04 h44rd

you need to add a dictionary that contains the "segment" key and the value for this key would be a list of 2 numbers. And those 2 numbers would be the starting and ending frame number

Purav-Zumkhawala avatar Apr 29 '21 01:04 Purav-Zumkhawala

Can you share the code that generated this. json file? Thank you! @Purav-Zumkhawala

Rui-hue avatar Nov 03 '23 03:11 Rui-hue