Argument list:
model_pathPath to the TF SavedModelsave_pathPath to save the PyTorch state dict--statedictExport to state dict instead of TorchScript--fp32Save weights at full precision--skiptestSkip testing and save model immediately instead--gpuWhether to attempt to use GPU for testing
Testing exported model
The following script creates an MP4 video of interpolated frames between 2 input images:
python inference.py "model_path" "img1" "img2" [--save_path SAVE_PATH] [--gpu] [--fp16] [--frames FRAMES] [--fps FPS]
model_pathPath to the exported TorchScript checkpointimg1Path to the first imageimg2Path to the second image--save_path SAVE_PATHPath to save the interpolated frames as a video, if absent it will be saved in the same directory asimg1is located and namedoutput.mp4--gpuWhether to attempt to use GPU for predictions--fp16Whether to use fp16 for calculations, speeds inference up on GPUs with tensor cores--frames FRAMESNumber of frames to interpolate between the input images--fps FPSFPS of the output video