Skip to content

Commit

Permalink
Update ncnn and Add RIFE-3.0 model, resolved #2
Browse files Browse the repository at this point in the history
Signed-off-by: ArchieMeng <[email protected]>
  • Loading branch information
ArchieMeng committed May 17, 2021
1 parent 10c3aa6 commit 664bb48
Show file tree
Hide file tree
Showing 10 changed files with 100 additions and 2 deletions.
3 changes: 3 additions & 0 deletions models/rife-v3.0/contextnet.bin
Git LFS file not shown
3 changes: 3 additions & 0 deletions models/rife-v3.0/contextnet.param
Git LFS file not shown
3 changes: 3 additions & 0 deletions models/rife-v3.0/flownet.bin
Git LFS file not shown
3 changes: 3 additions & 0 deletions models/rife-v3.0/flownet.param
Git LFS file not shown
3 changes: 3 additions & 0 deletions models/rife-v3.0/fusionnet.bin
Git LFS file not shown
3 changes: 3 additions & 0 deletions models/rife-v3.0/fusionnet.param
Git LFS file not shown
76 changes: 76 additions & 0 deletions models/rife-v3.0/fusionnet.param0
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
7767517
74 83
Input img0 0 1 img0
Input img1 0 1 img1
Input input.1 0 1 input.1
Input 3 0 1 3
Input 4 0 1 4
Input 5 0 1 5
Input 6 0 1 6
Input 7 0 1 7
Input 8 0 1 8
Input 9 0 1 9
Input 10 0 1 10
Interp Resize_1 1 1 input.1 64 0=2 1=2.000000e+00 2=2.000000e+00
BinaryOp Mul_3 1 1 64 66 0=2 1=1 2=2.000000e+00
Split splitncnn_0 1 3 66 66_splitncnn_0 66_splitncnn_1 66_splitncnn_2
Crop Slice_8 1 1 66_splitncnn_2 71 -23309=1,0 -23310=1,2 -23311=1,0
Concat Concat_9 2 1 img0 71 72
Crop Slice_14 1 1 72 77 -23309=1,2 -23310=1,2147483647 -23311=1,0
Split splitncnn_1 1 2 77 77_splitncnn_0 77_splitncnn_1
Crop Slice_19 1 1 66_splitncnn_1 82 -23309=1,2 -23310=1,4 -23311=1,0
Concat Concat_20 2 1 img1 82 83
Crop Slice_25 1 1 83 88 -23309=1,2 -23310=1,2147483647 -23311=1,0
Split splitncnn_2 1 2 88 88_splitncnn_0 88_splitncnn_1
Concat Concat_26 3 1 77_splitncnn_1 88_splitncnn_1 66_splitncnn_0 89
Convolution Conv_27 1 1 89 90 0=32 1=3 3=2 4=1 5=1 6=2880
PReLU PRelu_28 1 1 90 92 0=32
Convolution Conv_29 1 1 92 93 0=32 1=3 4=1 5=1 6=9216
PReLU PRelu_30 1 1 93 95 0=32
Convolution Conv_31 1 1 95 96 0=64 1=3 3=2 4=1 5=1 6=18432
PReLU PRelu_32 1 1 96 98 0=64
Convolution Conv_33 1 1 98 99 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_34 1 1 99 101 0=64
Split splitncnn_3 1 2 101 101_splitncnn_0 101_splitncnn_1
Concat Concat_35 3 1 101_splitncnn_1 3 7 102
Convolution Conv_36 1 1 102 103 0=128 1=3 3=2 4=1 5=1 6=147456
PReLU PRelu_37 1 1 103 105 0=128
Convolution Conv_38 1 1 105 106 0=128 1=3 4=1 5=1 6=147456
PReLU PRelu_39 1 1 106 108 0=128
Split splitncnn_4 1 2 108 108_splitncnn_0 108_splitncnn_1
Concat Concat_40 3 1 108_splitncnn_1 4 8 109
Convolution Conv_41 1 1 109 110 0=256 1=3 3=2 4=1 5=1 6=589824
PReLU PRelu_42 1 1 110 112 0=256
Convolution Conv_43 1 1 112 113 0=256 1=3 4=1 5=1 6=589824
PReLU PRelu_44 1 1 113 115 0=256
Split splitncnn_5 1 2 115 115_splitncnn_0 115_splitncnn_1
Concat Concat_45 3 1 115_splitncnn_1 5 9 116
Convolution Conv_46 1 1 116 117 0=512 1=3 3=2 4=1 5=1 6=2359296
PReLU PRelu_47 1 1 117 119 0=512
Convolution Conv_48 1 1 119 120 0=512 1=3 4=1 5=1 6=2359296
PReLU PRelu_49 1 1 120 122 0=512
Concat Concat_50 3 1 122 6 10 123
Deconvolution ConvTranspose_51 1 1 123 124 0=256 1=4 3=2 4=1 5=1 6=4194304
PReLU PRelu_52 1 1 124 126 0=256
Concat Concat_53 2 1 126 115_splitncnn_0 127
Deconvolution ConvTranspose_54 1 1 127 128 0=128 1=4 3=2 4=1 5=1 6=1048576
PReLU PRelu_55 1 1 128 130 0=128
Concat Concat_56 2 1 130 108_splitncnn_0 131
Deconvolution ConvTranspose_57 1 1 131 132 0=64 1=4 3=2 4=1 5=1 6=262144
PReLU PRelu_58 1 1 132 134 0=64
Concat Concat_59 2 1 134 101_splitncnn_0 135
Deconvolution ConvTranspose_60 1 1 135 136 0=32 1=4 3=2 4=1 5=1 6=65536
PReLU PRelu_61 1 1 136 138 0=32
Deconvolution ConvTranspose_62 1 1 138 140 0=4 1=4 3=2 4=1 5=1 6=2048 9=4
Split splitncnn_6 1 2 140 140_splitncnn_0 140_splitncnn_1
Crop Slice_68 1 1 140_splitncnn_1 145 -23309=1,0 -23310=1,3 -23311=1,0
BinaryOp Mul_70 1 1 145 147 0=2 1=1 2=2.000000e+00
BinaryOp Sub_72 1 1 147 149 0=1 1=1 2=1.000000e+00
Crop Slice_77 1 1 140_splitncnn_0 154 -23309=1,3 -23310=1,4 -23311=1,0
Split splitncnn_7 1 2 154 154_splitncnn_0 154_splitncnn_1
BinaryOp Mul_78 2 1 77_splitncnn_0 154_splitncnn_1 155 0=2
BinaryOp Sub_80 1 1 154_splitncnn_0 157 0=7 1=1 2=1.000000e+00
BinaryOp Mul_81 2 1 88_splitncnn_0 157 158 0=2
BinaryOp Add_82 2 1 155 158 159
BinaryOp Add_83 2 1 159 149 160
Clip Clip_84 1 1 160 165 0=0.000000e+00 1=1.000000e+00
4 changes: 4 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ if(NOT USE_SYSTEM_NCNN)
option(NCNN_BUILD_EXAMPLES "" OFF)
option(NCNN_DISABLE_RTTI "" ON)
option(NCNN_DISABLE_EXCEPTION "" OFF)
option(NCNN_INT8 "" OFF)

option(WITH_LAYER_absval "" OFF)
option(WITH_LAYER_argmax "" OFF)
Expand Down Expand Up @@ -196,6 +197,9 @@ if(NOT USE_SYSTEM_NCNN)
option(WITH_LAYER_groupnorm "" OFF)
option(WITH_LAYER_layernorm "" OFF)
option(WITH_LAYER_softplus "" OFF)
option(WITH_LAYER_gru "" OFF)
option(WITH_LAYER_multiheadattention "" OFF)
option(WITH_LAYER_gelu "" OFF)

add_subdirectory(ncnn)
endif()
Expand Down
2 changes: 1 addition & 1 deletion src/ncnn
Submodule ncnn updated 303 files
2 changes: 1 addition & 1 deletion src/rife_ncnn_vulkan.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def __init__(self,
tta_mode: bool = False,
uhd_mode: bool = False,
num_threads: int = 1):
rife_v2 = "rife-v2" in model
rife_v2 = ("rife-v2" in model) or ("rife-v3" in model)
self.model = model

if (scale & (scale -1)) == 0:
Expand Down

0 comments on commit 664bb48

Please sign in to comment.