mirror of
https://github.com/hzwer/ECCV2022-RIFE.git
synced 2026-02-24 04:19:41 +01:00
使用 Colaboratory 创建
This commit is contained in:
99
Video_2x.ipynb
Normal file
99
Video_2x.ipynb
Normal file
@@ -0,0 +1,99 @@
|
||||
{
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 0,
|
||||
"metadata": {
|
||||
"colab": {
|
||||
"name": "Untitled0.ipynb",
|
||||
"provenance": [],
|
||||
"authorship_tag": "ABX9TyP+0B6TRKpXVh1+nIaWFkx2",
|
||||
"include_colab_link": true
|
||||
},
|
||||
"kernelspec": {
|
||||
"name": "python3",
|
||||
"display_name": "Python 3"
|
||||
},
|
||||
"accelerator": "GPU"
|
||||
},
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "view-in-github",
|
||||
"colab_type": "text"
|
||||
},
|
||||
"source": [
|
||||
"<a href=\"https://colab.research.google.com/github/hzwer/arXiv2020-RIFE/blob/main/Video_2x.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"metadata": {
|
||||
"id": "FypCcZkNNt2p"
|
||||
},
|
||||
"source": [
|
||||
"!git clone https://github.com/hzwer/arXiv2020-RIFE"
|
||||
],
|
||||
"execution_count": null,
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"metadata": {
|
||||
"id": "1wysVHxoN54f"
|
||||
},
|
||||
"source": [
|
||||
"!gdown --id 1c1R7iF-ypN6USo-D2YH_ORtaH3tukSlo\n",
|
||||
"!7z e RIFE_trained_model.zip"
|
||||
],
|
||||
"execution_count": null,
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"metadata": {
|
||||
"id": "AhbHfRBJRAUt"
|
||||
},
|
||||
"source": [
|
||||
"!mkdir /content/arXiv2020-RIFE/train_log\n",
|
||||
"!mv *.pkl /content/arXiv2020-RIFE/train_log/"
|
||||
],
|
||||
"execution_count": 4,
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "rirngW5uRMdg"
|
||||
},
|
||||
"source": [
|
||||
"Please upload your video to content/arXiv2020-RIFE/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"metadata": {
|
||||
"id": "dnLn4aHHPzN3"
|
||||
},
|
||||
"source": [
|
||||
"!nvidia-smi\n",
|
||||
"%cd /content/arXiv2020-RIFE/\n",
|
||||
"!python3 inference_mp4_2x.py --video video.mp4"
|
||||
],
|
||||
"execution_count": null,
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"metadata": {
|
||||
"id": "0zIBbVE3UfUD"
|
||||
},
|
||||
"source": [
|
||||
"from IPython.display import display, Image\n",
|
||||
"import moviepy.editor as mpy\n",
|
||||
"display(mpy.ipython_display('video_2x.mp4', height=256, max_duration=100.))"
|
||||
],
|
||||
"execution_count": null,
|
||||
"outputs": []
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user