RomeroBarata / skeleton_based_anomaly_detection

Code for the CVPR'19 paper "Learning Regularity in Skeleton Trajectories for Anomaly Detection in Videos"
132 stars 49 forks source link

there is a error in visualisation.py file #4

Open musicshmily opened 5 years ago

musicshmily commented 5 years ago

image

musicshmily commented 5 years ago
        gt_trajectory = np.loadtxt(os.path.join(gt_trajectories_path, gt_trajectory_file_name),
                                   delimiter=',', ndmin=2)

decoder error!

musicshmily commented 5 years ago

@RomeroBarata please help me with this question

RomeroBarata commented 5 years ago

Hi, I'll have a look into that as soon as I have some time this week. Thanks!

musicshmily commented 5 years ago

Oh, thank you for your prompt reply, this question is caused by i passed the gt_trajectories_path mistaked, and I have fixed it. And i still expect to get more about this module from you. Because i am really interested in your excellent work. thanks once more!

musicshmily commented 5 years ago

I am sorry i don't know how can i get the reconstructed/predicted trajectories/the generated_frames/ground_truth_array/the generated_array

musicshmily commented 5 years ago

hello,are you still busy now,

Hi, I'll have a look into that as soon as I have some time this week. Thanks!

hello, are you still busy now, could you please talk more detail about how to get the parameter that make the visualisation model work.

RomeroBarata commented 5 years ago

Hi, Sorry for the delay, I'll have a look into that today!

RomeroBarata commented 5 years ago

This is the general structure to visualise the predictions (if I remember correctly):

python visualise.py skeletons ./data/HR-ShanghaiTech/testing/frames/01_0014 --ground_truth_trajectories ./data/HR-ShanghaiTech/testing/trajectories/01/01_0014 --draw_ground_truth_trajectories_skeleton --trajectories ./pretrained/CVPR19/ShanghaiTech/combined_model/_mp_Grobust_Lrobust_Orobust_concatdown_/01_2018_11_09_10_55_13/predicted_skeletons/0014 --draw_trajectories_skeleton --write_dir <SPECIFY_A_DIR_TO_WRITE>

The directory ./pretrained/CVPR19/ShanghaiTech/combined_model/_mp_Grobust_Lrobust_Orobust_concatdown_/01_2018_11_09_10_55_13/predicted_skeletons/0014 is created when you evaluate a pre-trained model with the --write_predictions flag enabled.

Note that you need to have the original frames of the video in the directory ./data/HR-ShanghaiTech/testing/frames/01_0014

musicshmily commented 5 years ago

这是可视化预测的一般结构(如果我没记错的话):

python visualise.py skeletons ./data/HR-ShanghaiTech/testing/frames/01_0014 --ground_truth_trajectories ./data/HR-ShanghaiTech/testing/trajectories/01/01_0014 --draw_ground_truth_trajectories_skeleton --trajectories ./pretrained/CVPR19/ShanghaiTech/combined_model/_mp_Grobust_Lrobust_Orobust_concatdown_/01_2018_11_09_10_55_13/predicted_skeletons/0014 --draw_trajectories_skeleton --write_dir <SPECIFY_A_DIR_TO_WRITE>

./pretrained/CVPR19/ShanghaiTech/combined_model/_mp_Grobust_Lrobust_Orobust_concatdown_/01_2018_11_09_10_55_13/predicted_skeletons/0014在评估--write_predictions启用了标志的预训练模型时,将创建该目录。

请注意,您需要在目录中包含视频的原始帧 ./data/HR-ShanghaiTech/testing/frames/01_0014

Thank you very much. Your work is really outstanding!The effect of your paper is the best one I have used so far

musicshmily commented 5 years ago

By the way, how do you extract your optical stream files

RomeroBarata commented 5 years ago

Hi @musicshmily,

Sorry for the late reply, I didn't see this message. Please see my answer to https://github.com/RomeroBarata/skeleton_based_anomaly_detection/issues/5

Kind regards, Romero

AndyHon commented 5 years ago

这是可视化预测的一般结构(如果我没记错的话): python visualise.py skeletons ./data/HR-ShanghaiTech/testing/frames/01_0014 --ground_truth_trajectories ./data/HR-ShanghaiTech/testing/trajectories/01/01_0014 --draw_ground_truth_trajectories_skeleton --trajectories ./pretrained/CVPR19/ShanghaiTech/combined_model/_mp_Grobust_Lrobust_Orobust_concatdown_/01_2018_11_09_10_55_13/predicted_skeletons/0014 --draw_trajectories_skeleton --write_dir <SPECIFY_A_DIR_TO_WRITE> ./pretrained/CVPR19/ShanghaiTech/combined_model/_mp_Grobust_Lrobust_Orobust_concatdown_/01_2018_11_09_10_55_13/predicted_skeletons/0014在评估--write_predictions启用了标志的预训练模型时,将创建该目录。 请注意,您需要在目录中包含视频的原始帧 ./data/HR-ShanghaiTech/testing/frames/01_0014

Thank you very much. Your work is really outstanding!The effect of your paper is the best one I have used so far

I refer to the path mentioned above, but failed to visualize successfully. Is this path correct?

RomeroBarata commented 5 years ago

Maybe try just this instead:

python visualise.py skeletons ./data/HR-ShanghaiTech/testing/frames/01_0014 --ground_truth_trajectories ./data/HR-ShanghaiTech/testing/trajectories/01/01_0014 --draw_ground_truth_trajectories_skeleton --write_dir <SPECIFY_A_DIR_TO_WRITE>

Can you run this command successfully? Note that where you have , you should change this whole thing for a directory where you would like to write the visualisations.

zjjzjj123 commented 4 years ago

python visualise.py skeletons ./data/HR-ShanghaiTech/testing/frames/01_0014 --ground_truth_trajectories ./data/HR-ShanghaiTech/testing/trajectories/01/0014 --draw_ground_truth_trajectories_skeleton --write_dir ,this command is ok.First,you should download ShanghaiTech dataset,then the Testing/frame_part1/01_0014 copy to /data/HR-ShanghaiTech/testing/frames/.if not exist frames you should make a directory.Finally,you should write diectory name behind --write_dir example: python visualise.py skeletons ./data/HR-ShanghaiTech/testing/frames/01_0014 --ground_truth_trajectories ./data/HR-ShanghaiTech/testing/trajectories/01/0014 --draw_ground_truth_trajectories_skeleton --write_dir result

zhanghm1995 commented 4 years ago

@zjjzjj123 @RomeroBarata Hi, I successed run the visualization code by following your commands. Do you know the color meaning in the visualization results? The red means abnomarity or the blue?