krasserm / perceiver-io

A PyTorch implementation of Perceiver, Perceiver IO and Perceiver AR with PyTorch Lightning scripts for distributed training

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ValueError: Could not load model krasserm/perceiver-io-optical-flow with any of the following classes: (<class 'perceiver.model.vision.optical_flow.huggingface.OpticalFlowPerceiver'>,).

wscffaa opened this issue · comments

Code:

from urllib.request import urlretrieve
from transformers import pipeline

from perceiver.data.vision import video_utils
from perceiver.model.vision import optical_flow # register auto-classes and pipeline

optical_flow_pipeline = pipeline("optical-flow", model="krasserm/perceiver-io-optical-flow", device="cuda:0")

frame_pairs = video_utils.read_video_frame_pairs("Scene_004.mp4")

optical_flows = optical_flow_pipeline(frame_pairs, render=True, device="cuda:0")

video_utils.write_video("test_data/flow/perceiverperceiver_flow_output.mp4", optical_flows, fps=24)

ValueError: Could not load model krasserm/perceiver-io-optical-flow with any of the following classes: (<class 'perceiver.model.vision.optical_flow.huggingface.OpticalFlowPerceiver'>,).

Thanks!

How did you create the environment for running this code?

Cannot reproduce. Please reopen if you can share more information for reproducing.