ryanxingql / stdf-pytorch

Implementation of "Spatio-Temporal Deformable Convolution for Compressed Video Quality Enhancement" (AAAI'20).
https://www.aiide.org/ojs/index.php/AAAI/article/view/6697
Apache License 2.0
155 stars 20 forks source link

Pytorch version of the pretrained model #8

Closed Oscillated closed 3 years ago

Oscillated commented 3 years ago

I downloaded the pretrained models in Baidu netdisk, but when I try to test a yuv video, I get the following error msg;

~/Downloads/STDF-PyTorch$ CUDA_VISIBLE_DEVICES=0 /home/djn/anaconda3-cuda10/bin/python test_one_video.py loading model STDF_data/exp/MFQEv2_R3_enlarge300x/ckp_290000.pt... Traceback (most recent call last): File "test_one_video.py", line 124, in main() File "test_one_video.py", line 44, in main checkpoint = torch.load(ckp_path) File "/home/djn/anaconda3-cuda10/lib/python3.7/site-packages/torch/serialization.py", line 527, in load with _open_zipfile_reader(f) as opened_zipfile: File "/home/djn/anaconda3-cuda10/lib/python3.7/site-packages/torch/serialization.py", line 224, in init super(_open_zipfile_reader, self).init(torch._C.PyTorchFileReader(name_orbuffer)) RuntimeError: version <= kMaxSupportedFileFormatVersion INTERNAL ASSERT FAILED at /pytorch/caffe2/serialize/inline_container.cc:132, please report a bug to PyTorch. Attempted to read a PyTorch file with version 3, but the maximum supported version for reading is 2. Your PyTorch installation may be too old. (init at /pytorch/caffe2/serialize/inline_container.cc:132) frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x33 (0x7fe6bd239193 in /home/djn/anaconda3-cuda10/lib/python3.7/site-packages/torch/lib/libc10.so) frame #1: caffe2::serialize::PyTorchStreamReader::init() + 0x1f5b (0x7fe6c03c19eb in /home/djn/anaconda3-cuda10/lib/python3.7/site-packages/torch/lib/libtorch.so) frame #2: caffe2::serialize::PyTorchStreamReader::PyTorchStreamReader(std::string const&) + 0x64 (0x7fe6c03c2c04 in /home/djn/anaconda3-cuda10/lib/python3.7/site-packages/torch/lib/libtorch.so) frame #3: + 0x6c6536 (0x7fe7086b5536 in /home/djn/anaconda3-cuda10/lib/python3.7/site-packages/torch/lib/libtorch_python.so) frame #4: + 0x295a74 (0x7fe708284a74 in /home/djn/anaconda3-cuda10/lib/python3.7/site-packages/torch/lib/libtorch_python.so) frame #5: _PyMethodDef_RawFastCallDict + 0x24d (0x55790a81763d in /home/djn/anaconda3-cuda10/bin/python) frame #6: _PyCFunction_FastCallDict + 0x21 (0x55790a8177c1 in /home/djn/anaconda3-cuda10/bin/python) frame #7: _PyObject_Call_Prepend + 0x63 (0x55790a815e53 in /home/djn/anaconda3-cuda10/bin/python) frame #8: PyObject_Call + 0x6e (0x55790a808dbe in /home/djn/anaconda3-cuda10/bin/python) frame #9: + 0x9e214 (0x55790a780214 in /home/djn/anaconda3-cuda10/bin/python) frame #10: _PyObject_FastCallKeywords + 0x128 (0x55790a84e588 in /home/djn/anaconda3-cuda10/bin/python) frame #11: _PyEval_EvalFrameDefault + 0x52f8 (0x55790a8b26e8 in /home/djn/anaconda3-cuda10/bin/python) frame #12: _PyEval_EvalCodeWithName + 0x5da (0x55790a7f681a in /home/djn/anaconda3-cuda10/bin/python) frame #13: _PyFunction_FastCallDict + 0x1d5 (0x55790a7f7635 in /home/djn/anaconda3-cuda10/bin/python) frame #14: _PyObject_Call_Prepend + 0x63 (0x55790a815e53 in /home/djn/anaconda3-cuda10/bin/python) frame #15: + 0x16b97a (0x55790a84d97a in /home/djn/anaconda3-cuda10/bin/python) frame #16: _PyObject_FastCallKeywords + 0x128 (0x55790a84e588 in /home/djn/anaconda3-cuda10/bin/python) frame #17: _PyEval_EvalFrameDefault + 0x4a96 (0x55790a8b1e86 in /home/djn/anaconda3-cuda10/bin/python) frame #18: _PyEval_EvalCodeWithName + 0x2f9 (0x55790a7f6539 in /home/djn/anaconda3-cuda10/bin/python) frame #19: _PyFunction_FastCallKeywords + 0x387 (0x55790a845f57 in /home/djn/anaconda3-cuda10/bin/python) frame #20: _PyEval_EvalFrameDefault + 0x4b39 (0x55790a8b1f29 in /home/djn/anaconda3-cuda10/bin/python) frame #21: _PyFunction_FastCallKeywords + 0xfb (0x55790a845ccb in /home/djn/anaconda3-cuda10/bin/python) frame #22: _PyEval_EvalFrameDefault + 0x416 (0x55790a8ad806 in /home/djn/anaconda3-cuda10/bin/python) frame #23: _PyEval_EvalCodeWithName + 0x2f9 (0x55790a7f6539 in /home/djn/anaconda3-cuda10/bin/python) frame #24: PyEval_EvalCodeEx + 0x44 (0x55790a7f7424 in /home/djn/anaconda3-cuda10/bin/python) frame #25: PyEval_EvalCode + 0x1c (0x55790a7f744c in /home/djn/anaconda3-cuda10/bin/python) frame #26: + 0x22ab74 (0x55790a90cb74 in /home/djn/anaconda3-cuda10/bin/python) frame #27: PyRun_FileExFlags + 0xa1 (0x55790a916eb1 in /home/djn/anaconda3-cuda10/bin/python) frame #28: PyRun_SimpleFileExFlags + 0x1c3 (0x55790a9170a3 in /home/djn/anaconda3-cuda10/bin/python) frame #29: + 0x236195 (0x55790a918195 in /home/djn/anaconda3-cuda10/bin/python) frame #30: _Py_UnixMain + 0x3c (0x55790a9182bc in /home/djn/anaconda3-cuda10/bin/python) frame #31: __libc_start_main + 0xf0 (0x7fe717c99840 in /lib/x86_64-linux-gnu/libc.so.6) frame #32: + 0x1db062 (0x55790a8bd062 in /home/djn/anaconda3-cuda10/bin/python)

It seems that the Pytorch version of the pretrained model is newer than my Pytorch version (which is 1.6.0+cu101, according to the environment pre-request).

Can you offer some suggestions or solutions to this problem? Thanks a lot.

ryanxingql commented 3 years ago

If necessary, I can test this video for you. Send me the link to download your YUV. Otherwise, you may have to install the requested environment.

Oscillated commented 3 years ago

If necessary, I can test this video for you. Send me the link to download your YUV. Otherwise, you may have to install the requested environment.

I just find that there are some problems in my CUDA path setting, now I fix the problem. Thank you!