ttengwang / PDVC

End-to-End Dense Video Captioning with Parallel Decoding (ICCV 2021)
MIT License
200 stars 23 forks source link

No such file or directory: 'visualization/output/generated_captions/dvc_results.json' #14

Closed dengfenglai321 closed 2 years ago

dengfenglai321 commented 2 years ago

hi when I run code as below:

video_folder=visualization/videos
output_folder=visualization/output
pdvc_model_path=save/anet_tsp_pdvc/model-best.pth
output_language=en
bash test_and_visualize.sh $video_folder $output_folder $pdvc_model_path $output_language

and the error is generated:

**from densevid_eval3.SODA.soda import SODA

ModuleNotFoundError: No module named 'densevid_eval3.SODA.soda' START VISUALIZATION Traceback (most recent call last): File "visualization/visualization.py", line 154, in d = json.load(open(opt.dvc_file))['results'] FileNotFoundError: [Errno 2] No such file or directory: 'visualization/output/generated_captions/dvc_results.json'**

so where is dvc_results.json? and how can i got it?

thanks

ttengwang commented 2 years ago

Did you clone the repo by git command with the argument --recursive?

dengfenglai321 commented 2 years ago

Did you clone the repo by git command with the argument --recursive?

no I just git clone https://github.com/ttengwang/PDVC.git

is there any problem??

and error : ModuleNotFoundError: No module named 'densevid_eval3.SODA.soda' is also confuse me

ttengwang commented 2 years ago

Yes, I guess that is the point. Try git with --recursive ~

dengfenglai321 commented 2 years ago

--recursive

thanks I try it!!

dengfenglai321 commented 2 years ago

Yes, I guess that is the point. Try git with --recursive ~

hi, I git clone again by --recursive.

but the error is generated as below: 企业微信截图_1640597850778 so what's visualization/output/generated_captions/dvc_results.json?

what i should write into:

    parser.add_argument('--output_mp4_folder', type=str, default=None)
    parser.add_argument('--input_mp4_folder', type=str, required=True)
    parser.add_argument('--dvc_file', type=str, required=True)
    parser.add_argument('--show_all_caption_per_frame', type=int, default=False)

in visualization.py??

dengfenglai321 commented 2 years ago

another error as below: File "/storage1/PDVC/pdvc/ops/functions/ms_deform_attn_func.py", line 28, in forward output = MSDA.ms_deform_attn_forward( NameError: name 'MSDA' is not defined

so in pdvc/ops/functions/ms_deform_attn_func.py

try:
    import MultiScaleDeformableAttention as MSDA
except:
    pass

where is MultiScaleDeformableAttention or how to install it?

dengfenglai321 commented 2 years ago

My machine can't connect to the Internet, so how can i install MultiScaleDeformableAttention? Does MultiScaleDeformableAttention is necessary?

dengfenglai321 commented 2 years ago

I solve it!!!thanks again!!!

cyy-1102 commented 2 years ago

I solve it!!!thanks again!!!

I have the same problem as you: FileNotFoundError: [Errno 2] No such file or directory: '/home/yy/桌面/PDVC/visualization/videos/output/generated_captions/dvc_results.json' How did you solve it?

dengfenglai321 commented 2 years ago

I solve it!!!thanks again!!!

I have the same problem as you: FileNotFoundError: [Errno 2] No such file or directory: '/home/yy/桌面/PDVC/visualization/videos/output/generated_captions/dvc_results.json' How did you solve it?

前面能正常运行就会产生这个dvc.json ,看下你前面有什么报错

mixiazhiyang commented 1 year ago

我没有save/info.json,你是怎么解决的呢

hyeok-jong commented 1 year ago

@mixiazhiyang @cyy-1102

I had same problem. And I solved by little detuoring.

First of all, i guess, the problem visualization/output/generated_captions/dvc_results.json is because MultiScaleDeformableAttention is not installed correctly.

I don't know extact reason, but I think the problem is due to torch version.

So, i tried install MultiScaleDeformableAttention

If installed well, then try

import torch
import MultiScaleDeformableAttention

if such code yeilds no error, MultiScaleDeformableAttention it means installed successfully.

Since original repo of MultiScaleDeformableAttention is here,
I just followed the repo.
It means I installed MultiScaleDeformableAttention directly by here.

For more details

git clone https://github.com/fundamentalvision/Deformable-DETR.git  
conda create -n PDVC python=3.7 
source activate PDVC  
cd Deformable-DETR  
conda install pytorch=1.5.1 torchvision=0.6.1 cudatoolkit=9.2 -c pytorch  
pip install -r requirements.txt  
cd ./models/ops
sh ./make.sh
cd ..  
cd ..  

This is how to install MultiScaleDeformableAttention

git clone --recursive https://github.com/ttengwang/PDVC.git  
cd PDVC  
conda install ffmpeg  
pip install opencv-python  
pip install -r requirement.txt