MediaDroid Models

Pre-converted models for MediaDroid β€” an Android media player that plays movies and shows from local storage and network shares.

MediaDroid offers them only where a self-test in its Settings finds the device fast enough for playback; elsewhere the setting switches itself off again and says how long the device took. The ones too large to carry in the app (dain/) are fetched from here when they are switched on, each file checked against its SHA-256 digest.

Models

File Size Purpose Source Input Output
rife-4.25-lite-576p.tflite ~29 MB Frame interpolation β€” the picture halfway between two frames (RIFE 4.25 lite), TensorFlow Lite, float32 hzwer/Practical-RIFE (MIT) img0, img1: 1Γ—640Γ—768Γ—3 float32 [0,1] (NHWC) middle: 1Γ—640Γ—768Γ—3 float32 [0,1]
rife-4.25-lite-576p.onnx ~72 MB The same network as ONNX (opset 17), before the TFLite conversion Same as above img0, img1: 1Γ—3Γ—640Γ—768 float32 [0,1] (NCHW) middle: 1Γ—3Γ—640Γ—768 float32

768 Γ— 640 is 576p (720 Γ— 576) padded to a multiple of 128, as Practical-RIFE pads; other sizes can be resampled to it. The in-between is at t = 0.5.

How it was made, and checked

The 4.25.lite release's weights (flownet.pkl, under the same MIT licence as Practical-RIFE) were loaded as tensors only into the network written out from its published architecture (tools/rife_net.py), exported to ONNX and converted with onnx2tf. For the conversion β€” each checked to give the same result β€” the resampling uses sizes instead of scale factors, the identity grid and the time plane are constants, and the warp's border padding is clamped coordinates with zero padding (the same with align_corners).

Against PyTorch on a test pair, the TFLite in-between differs by 0.00008 on average; 0.08 % of values differ by more than 1/255. A float16 conversion came out wrong and is not offered. Steps in tools/CONVERSION.md.

On a Galaxy S20 (Snapdragon 865) one in-between takes about 1.7 s on the CPU, its fastest unit for this network β€” far from real time there; newer devices with stronger NPUs and GPUs are where it is meant to run.

DAIN for ncnn (dain/)

Frame interpolation weighing depth β€” DAIN (Depth-Aware Video Frame Interpolation, CVPR 2019) as nihui converted it for ncnn in dain-ncnn-vulkan (models/best), copied unchanged. Four networks, each as .param (structure) and .bin (weights), about 51 MB:

Network Input Output
depthnet input: a frame, 3 planes BGR in 0..1 depth
flownet input0, input1: two frames flow (from the first to the second)
ctxnet input: a frame ctx
interpolation both frames, both depths, both flows, flow0_w = t and flow1_w = 1 βˆ’ t, both contexts output_rectified: the in-between, 3 planes BGR in 0..1

Any size, padded to a multiple of 32 with the edges repeated. The networks call four layers of DAIN's own β€” dain.Correlation, dain.OpticalFlowWarp, dain.DepthFlowProjection, dain.FilterInterpolation β€” which dain-ncnn-vulkan implements, and MediaDroid after it (CPU and Vulkan).

Licences: DAIN by Wenbo Bao (LICENSE-DAIN, MIT), dain-ncnn-vulkan by nihui (LICENSE-dain-ncnn-vulkan, MIT).

File Bytes SHA-256
dain/depthnet.param 23625 e5b2824a8efd13fcc8875456df47f723682f3b38ebac897c7ad06c4450cd15c0
dain/depthnet.bin 10728564 4d063853f50ecb7835e9c28c04087f9256541a276478925d5b062e4ab8e07355
dain/flownet.param 17852 ce1e6c4e86e21de63e6e94ddf37d8bc1f01ae1a3d7a983b5513df338ccc54d91
dain/flownet.bin 22092552 f6d5f47e84d0b25d9fff06c5acb382bef8281097188fd3a240501e754e95e2cb
dain/ctxnet.param 1254 85fc9a1fbf2d398b02edceaae2081ff1716edb44afd980c4928dacb44856f929
dain/ctxnet.bin 313748 957faa2e2cd475648166f056f65963136d24e4ccfcc665e367d7868b2f56d3e4
dain/interpolation.param 9066 9475d3368d092e8074189c44baa11fd5e357bf930188797fb2b4b899333cfdc1
dain/interpolation.bin 18291116 485ca7ffb0eb86e9468e9841356c0af5c55070dde1901a3628ce98baf5d28b6d

Other models used by MediaDroid

Model Purpose Source
RIFE 4.25 lite (ncnn) Frame interpolation at any size, carried in the app TNTwise/rife-ncnn-vulkan (MIT, after nihui's rife-ncnn-vulkan)
Real-ESRGAN General x4v3 (TFLite, 8-bit) Neural upscaling, 4Γ— qualcomm/Real-ESRGAN-General-x4v3 (BSD-3-Clause, from xinntao/Real-ESRGAN)

Licence

MIT throughout: LICENSE-RIFE (Copyright (c) 2021 hzwer), LICENSE-DAIN (Copyright (c) 2019 Wenbo Bao), LICENSE-dain-ncnn-vulkan (Copyright (c) 2020 nihui).

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support