forked from afspiegeling/Practical-RIFE
Delete Colab_demo.ipynb
This commit is contained in:
@@ -1,127 +0,0 @@
|
||||
{
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 0,
|
||||
"metadata": {
|
||||
"colab": {
|
||||
"name": "Untitled0.ipynb",
|
||||
"provenance": [],
|
||||
"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/Practical-RIFE/blob/main/Colab_demo.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": [
|
||||
"%cd /content\n",
|
||||
"!git clone https://github.com/hzwer/Practical-RIFE"
|
||||
],
|
||||
"execution_count": null,
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"metadata": {
|
||||
"id": "1wysVHxoN54f"
|
||||
},
|
||||
"source": [
|
||||
"!gdown --id 1O5KfS3KzZCY3imeCr2LCsntLhutKuAqj\n",
|
||||
"!7z e Practical-RIFE/RIFE_trained_model_v3.8.zip"
|
||||
],
|
||||
"execution_count": null,
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"metadata": {
|
||||
"id": "AhbHfRBJRAUt"
|
||||
},
|
||||
"source": [
|
||||
"!mkdir /content/Practical-RIFE/train_log\n",
|
||||
"!mv *.py /content/Practical-RIFE/train_log/\n",
|
||||
"!mv *.pkl /content/Practical-RIFE/train_log/\n",
|
||||
"%cd /content/Practical-RIFE/\n",
|
||||
"!gdown --id 1i3xlKb7ax7Y70khcTcuePi6E7crO_dFc\n",
|
||||
"!pip install git+https://github.com/rk-exxec/scikit-video.git@numpy_deprecation"
|
||||
],
|
||||
"execution_count": null,
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "rirngW5uRMdg"
|
||||
},
|
||||
"source": [
|
||||
"Please upload your video to content/Practical-RIFE/video.mp4, or use our demo video."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"metadata": {
|
||||
"id": "dnLn4aHHPzN3"
|
||||
},
|
||||
"source": [
|
||||
"!nvidia-smi\n",
|
||||
"!python3 inference_video.py --exp=1 --video=demo.mp4 --montage --skip"
|
||||
],
|
||||
"execution_count": null,
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "77KK6lxHgJhf"
|
||||
},
|
||||
"source": [
|
||||
"Our demo.mp4 is 25FPS. You can adjust the parameters for your own perference.\n",
|
||||
"For example: \n",
|
||||
"--fps=60 --exp=1 --video=mydemo.avi --png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"metadata": {
|
||||
"id": "0zIBbVE3UfUD",
|
||||
"cellView": "code"
|
||||
},
|
||||
"source": [
|
||||
"from IPython.display import display, Image\n",
|
||||
"import moviepy.editor as mpy\n",
|
||||
"display(mpy.ipython_display('demo_4X_100fps.mp4', height=256, max_duration=100.))"
|
||||
],
|
||||
"execution_count": null,
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"metadata": {
|
||||
"id": "tWkJCNgP3zXA"
|
||||
},
|
||||
"source": [
|
||||
"!python3 inference_img.py --img demo/I0_0.png demo/I0_1.png\n",
|
||||
"ffmpeg -r 10 -f image2 -i output/img%d.png -s 448x256 -vf \"split[s0][s1];[s0]palettegen=stats_mode=single[p];[s1][p]paletteuse=new=1\" output/slomo.gif\n",
|
||||
"# Image interpolation"
|
||||
],
|
||||
"execution_count": null,
|
||||
"outputs": []
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user