No such operator video_reader::probe_video_from_memory,slowfast代码复现bug记录

No such operator video_reader::probe_video_from_memory,slowfast代码复现bug记录

slowfast github链接:https://github.com/facebookresearch/SlowFast

bug1

使用kinetics数据集,复现X3D预训练模型进行测试,当yaml配置文件中DECODING_BACKEND设置为torchvision的时候,出现了报错:

Failed to decode by torchvision with exception: No such operator video_reader::probe_video_from_memory

GitHub上关于这个问题的讨论链接:https://github.com/facebookresearch/SlowFast/issues/181

报错代码块:在decoder.py的函数def torchvision_decode中

  # Convert the bytes to a tensor.
	video_tensor = torch.from_numpy(np.frombuffer(video_handle, dtype=np.uint8))

    decode_all_video = True
    video_start_pts, video_end_pts = 0, -1
    # The video_meta is empty, fetch the meta data from the raw video.
    if len(video_meta) == 0:
        # Tracking the meta info for selective decoding in the future.
        meta = io._probe_video_from_memory(video_tensor)```

翻遍了Google,没找到解决方案,原论文使用的torch1.3,但是detectron2的最低限制torch就是torch1.6版本,再低就不能编译了…

博主尝试了python3.6,pytho3.7,python3.8,torch1.3+torchvision0.4.2,torch1.4,torch1.6,torch1.7,torch1.8并与之对应的torchvision版本(官网conda安装方式),还是不行…

官网没有torch1.3的conda和pip安装,博主使用的source code安装。

发现类似问题最多的就是RuntimeError: No such operator torchvision::nms,解决办法也是说torch版本问题,但是博主测试过了,python3.6+torch1.6+torchvision0.7+cuda10.2的nms是可以work的。

最后,实在没有办法
No such operator video_reader::probe_video_from_memory这个问题暂时解决不了,那就换一种解码方式吧,yaml配置文件中,设置DECODING_BACKEND: pyav ,亲测,能够work。

如果有大神能够解决,欢迎留言,谢谢!

  • 4
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 8
    评论
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值