CyFeng16 / MVIMP

Mixed Video and Image Manipulation Program
GNU General Public License v3.0
71 stars 20 forks source link

Colab inference_dain error #1

Closed Zotikus1001 closed 4 years ago

Zotikus1001 commented 4 years ago

I'm getting this error when running the colab inference_dain command. VIDIOC_REQBUFS: Inappropriate ioctl for device

This is the console output:

Current PyTorch version is 1.4.0+cu100
VIDIOC_REQBUFS: Inappropriate ioctl for device
Traceback (most recent call last):
  File "inference_dain.py", line 50, in <module>
    raise FileNotFoundError("You need more than 2 frames in the video to generate insertion.")
FileNotFoundError: You need more than 2 frames in the video to generate insertion.

The video file I have is definetly more that 2 frames. Something isnt working properly when it tried to detect the fps of the input video.

CyFeng16 commented 4 years ago

@BrokenSilence Hi, have you put the input video file in ./MVIMP/Data/Input? I'll test the COLAB again then tell you whether everything is OK or not, then let us figure out what happens, shall we?

Zotikus1001 commented 4 years ago

@CyFeng16 Yes, ofc :)

CyFeng16 commented 4 years ago

--------------------SUMMARY-------------------- Current input video file is runcat.mp4, runcat.mp4's fps is 29.97, runcat.mp4 has 78 frames. Now we will process this video to 59.94 fps. --------------------NOW END-------------------- ...... Namespace(SAVED_MODEL='./model_weights/best.pth', alpha=[0.0, 1.0], arg='./model_weights/67849-Tue-May-12-01:01/args.txt', batch_size=1, channels=3, ctx_lr_coe=1.0, datasetName='Vimeo_90K_interp', datasetPath='', dataset_split=97, debug=False, depth_lr_coe=0.001, dst='/content/MVIMP/Data/Output', dtype=<class 'torch.cuda.FloatTensor'>, epsilon=1e-06, factor=0.2, filter_lr_coe=1.0, filter_size=4, flow_lr_coe=0.01, force=False, high_resolution=True, log='./model_weights/67849-Tue-May-12-01:01/log.txt', lr=0.002, netName='DAIN_slowmotion', no_date=False, numEpoch=100, occ_lr_coe=1.0, patience=5, rectify_lr=0.001, save_path='./model_weights/67849-Tue-May-12-01:01', save_which=1, seed=1, src='/content/MVIMP/Data/Input', time_step=0.5, uid=None, use_cuda=True, use_cudnn=1, weight_decay=0, workers=8) cudnn is used Interpolate 1 frames The model weight is: ./model_weights/best.pth ** current handling frame from /content/MVIMP/Data/Input. ** ** current time_step is 0.5 ** ** current output_dir is /content/MVIMP/Data/Output ** 100% 77/77 [03:32<00:00, 2.76s/it]

@BrokenSilence Hi, the above unit test shows that the COLAB function correctly. Could you tell me some more info about your setup?

Zotikus1001 commented 4 years ago

@CyFeng16 I found the issue. It seems cv2 can't read av1 codec. :/ Converted the video to avc1 codec and it works fine now. weird.

I'm sorry to wasted your time. :(

Will give it a try now, with the splitting frames into 4 parts feature you have. :)

CyFeng16 commented 4 years ago

@BrokenSilence According to a cv2 issue, the av1 codec will be supported sooner or later. And I am afraid that such a fix in this repository is not the proper way of solving the thing although it could be done. BTW, many thanks for your trying and pointing this issue, it will help others a lot! Enjoy your DAINing day :)