feat(rife): add support for frame interpolation and RIFE (#1244)
Some checks are pending
Build / ubuntu (push) Waiting to run
Build / windows (push) Waiting to run
Build / container (push) Waiting to run

* feat: add RIFE files and processor/interpolator abstractions
* feat: add `rife` as processor option
* feat: add frame interpolation math except first frame
* feat: complete motion interpolation and add scene detection
* feat: improve Vulkan device validation
* fix: fix casting issues and variable names
* refactor: improve error-checking; add abstractions and factories
* refactor: improve readability of the frames processor
* docs: update changelog

Signed-off-by: k4yt3x <i@k4yt3x.com>
This commit is contained in:
K4YT3X 2024-12-01 09:55:56 +00:00 committed by GitHub
parent 2fc89e3883
commit 627f3d84a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
84 changed files with 4914 additions and 615 deletions

3
.gitmodules vendored
View File

@ -10,3 +10,6 @@
[submodule "third_party/boost"] [submodule "third_party/boost"]
path = third_party/boost path = third_party/boost
url = https://github.com/boostorg/boost.git url = https://github.com/boostorg/boost.git
[submodule "third_party/librife_ncnn_vulkan"]
path = third_party/librife_ncnn_vulkan
url = https://github.com/k4yt3x/librife-ncnn-vulkan.git

View File

@ -10,11 +10,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added ### Added
- Automatic selection of the most suitable pixel format for the output video. - Automatic selection of the most suitable pixel format for the output video.
- Support for specifying arbitrary `AVOptions` for the encoder (#1232). - Frame interpolation processing mode.
- More `AVCodecContext` options. - More `AVCodecContext` options.
- Support for RIFE ncnn Vulkan.
- Support for specifying arbitrary `AVOptions` for the encoder (#1232).
### Changed ### Changed
- Improve error handling and error messages.
- Improve the CLI help message structure and clarity. - Improve the CLI help message structure and clarity.
### Fixed ### Fixed
@ -38,9 +41,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- A better timer that gets paused when the processing is paused. - A better timer that gets paused when the processing is paused.
- Detection for the validity of the provided GPU ID. - Detection for the validity of the provided GPU ID.
- Status bar and processing statistics. (Video2X Qt6)
- The `--listgpus` option to list available Vulkan GPU devices. - The `--listgpus` option to list available Vulkan GPU devices.
- Vulkan device selection for libplacebo. - Vulkan device selection for libplacebo.
- Status bar and processing statistics. (Video2X Qt6)
### Changed ### Changed

View File

@ -253,6 +253,19 @@ ExternalProject_Add(
INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install --config ${CMAKE_BUILD_TYPE} INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install --config ${CMAKE_BUILD_TYPE}
) )
# Add librealesrgan-ncnn-vulkan as an external project
ExternalProject_Add(
rife
SOURCE_DIR ${PROJECT_SOURCE_DIR}/third_party/librife_ncnn_vulkan/src
CMAKE_ARGS
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/rife_install
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DUSE_SYSTEM_NCNN=${USE_SYSTEM_NCNN}
BUILD_ALWAYS ON
INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install --config ${CMAKE_BUILD_TYPE}
)
# Remove duplicate entries # Remove duplicate entries
list(REMOVE_DUPLICATES ALL_INCLUDE_DIRS) list(REMOVE_DUPLICATES ALL_INCLUDE_DIRS)
list(REMOVE_DUPLICATES ALL_LIBRARIES) list(REMOVE_DUPLICATES ALL_LIBRARIES)
@ -267,8 +280,8 @@ else()
set_target_properties(libvideo2x PROPERTIES OUTPUT_NAME video2x) set_target_properties(libvideo2x PROPERTIES OUTPUT_NAME video2x)
endif() endif()
# Ensure libvideo2x depends on realesrgan being built and installed # Ensure that the shared library is built after the external projects
add_dependencies(libvideo2x realesrgan) add_dependencies(libvideo2x realesrgan rife)
# Include directories for the shared library # Include directories for the shared library
target_include_directories(libvideo2x PRIVATE target_include_directories(libvideo2x PRIVATE
@ -277,6 +290,7 @@ target_include_directories(libvideo2x PRIVATE
${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/include/libvideo2x ${PROJECT_SOURCE_DIR}/include/libvideo2x
${PROJECT_SOURCE_DIR}/third_party/librealesrgan_ncnn_vulkan/src ${PROJECT_SOURCE_DIR}/third_party/librealesrgan_ncnn_vulkan/src
${PROJECT_SOURCE_DIR}/third_party/librife_ncnn_vulkan/src
) )
# Compile options for the shared library # Compile options for the shared library
@ -286,14 +300,15 @@ target_compile_options(libvideo2x PRIVATE
$<$<CONFIG:Debug>:-g -DDEBUG> $<$<CONFIG:Debug>:-g -DDEBUG>
) )
# Define the path to the built libresrgan-ncnn-vulkan library # Define the paths to the shared libraries
if(WIN32) if(WIN32)
set(REALESRGAN_LIB ${CMAKE_BINARY_DIR}/realesrgan_install/lib/librealesrgan-ncnn-vulkan.lib) set(REALESRGAN_LIB ${CMAKE_BINARY_DIR}/realesrgan_install/lib/librealesrgan-ncnn-vulkan.lib)
list(APPEND ALL_LIBRARIES ${REALESRGAN_LIB}) set(RIFE_LIB ${CMAKE_BINARY_DIR}/rife_install/lib/librife-ncnn-vulkan.lib)
else() else()
set(REALESRGAN_LIB ${CMAKE_BINARY_DIR}/realesrgan_install/lib/librealesrgan-ncnn-vulkan.so) set(REALESRGAN_LIB ${CMAKE_BINARY_DIR}/realesrgan_install/lib/librealesrgan-ncnn-vulkan.so)
list(APPEND ALL_LIBRARIES ${REALESRGAN_LIB}) set(RIFE_LIB ${CMAKE_BINARY_DIR}/rife_install/lib/librife-ncnn-vulkan.so)
endif() endif()
list(APPEND ALL_LIBRARIES ${REALESRGAN_LIB} ${RIFE_LIB})
# Link the shared library with the dependencies # Link the shared library with the dependencies
target_link_libraries(libvideo2x PRIVATE ${ALL_LIBRARIES}) target_link_libraries(libvideo2x PRIVATE ${ALL_LIBRARIES})
@ -392,6 +407,7 @@ if(WIN32)
install(FILES install(FILES
${CMAKE_BINARY_DIR}/realesrgan_install/bin/librealesrgan-ncnn-vulkan.dll ${CMAKE_BINARY_DIR}/realesrgan_install/bin/librealesrgan-ncnn-vulkan.dll
${CMAKE_BINARY_DIR}/rife_install/bin/librife-ncnn-vulkan.dll
${FFMPEG_DLLS} ${FFMPEG_DLLS}
${NCNN_BASE_PATH}/bin/ncnn.dll ${NCNN_BASE_PATH}/bin/ncnn.dll
${BOOST_DLL_PATH} ${BOOST_DLL_PATH}
@ -401,7 +417,7 @@ if(WIN32)
WORLD_READ WORLD_EXECUTE WORLD_READ WORLD_EXECUTE
) )
else() else()
install(FILES ${REALESRGAN_LIB} install(FILES ${REALESRGAN_LIB} ${RIFE_LIB}
DESTINATION ${INSTALL_LIB_DESTINATION} DESTINATION ${INSTALL_LIB_DESTINATION}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE GROUP_READ GROUP_EXECUTE

View File

@ -1,7 +1,7 @@
.PHONY: build static debug windows windows-debug debian ubuntu clean \ .PHONY: build static debug windows windows-debug debian ubuntu clean \
test-realesrgan test-libplacebo \ test-realesrgan test-libplacebo test-rife \
memcheck-realesrgan memcheck-libplacebo \ memcheck-realesrgan memcheck-libplacebo memcheck-rife \
heaptrack-realesrgan heaptrack-libplacebo heaptrack-realesrgan heaptrack-libplacebo heaptrack-rife
BINDIR=build BINDIR=build
CC=clang CC=clang
@ -130,11 +130,15 @@ clean:
test-realesrgan: test-realesrgan:
LD_LIBRARY_PATH=$(BINDIR) $(BINDIR)/video2x -i $(TEST_VIDEO) -o $(TEST_OUTPUT) \ LD_LIBRARY_PATH=$(BINDIR) $(BINDIR)/video2x -i $(TEST_VIDEO) -o $(TEST_OUTPUT) \
-f realesrgan -r 4 -m realesr-animevideov3 -p realesrgan -s 4 --realesrgan-model realesr-animevideov3
test-libplacebo: test-libplacebo:
LD_LIBRARY_PATH=$(BINDIR) $(BINDIR)/video2x -i $(TEST_VIDEO) -o $(TEST_OUTPUT) \ LD_LIBRARY_PATH=$(BINDIR) $(BINDIR)/video2x -i $(TEST_VIDEO) -o $(TEST_OUTPUT) \
-f libplacebo -w 1920 -h 1080 -s anime4k-v4-a -p libplacebo -w 1920 -h 1080 --libplacebo-shader anime4k-v4-a
test-rife:
LD_LIBRARY_PATH=$(BINDIR) $(BINDIR)/video2x -i $(TEST_VIDEO) -o $(TEST_OUTPUT) \
-p rife -m 4 --rife-model rife-v4.6
memcheck-realesrgan: memcheck-realesrgan:
LD_LIBRARY_PATH=$(BINDIR) valgrind \ LD_LIBRARY_PATH=$(BINDIR) valgrind \
@ -146,8 +150,8 @@ memcheck-realesrgan:
--verbose --log-file="valgrind.log" \ --verbose --log-file="valgrind.log" \
$(BINDIR)/video2x \ $(BINDIR)/video2x \
-i $(TEST_VIDEO) -o $(TEST_OUTPUT) \ -i $(TEST_VIDEO) -o $(TEST_OUTPUT) \
-f realesrgan -r 2 -m realesr-animevideov3 \ -p realesrgan -s 2 --realesrgan-model realesr-animevideov3 \
-p veryfast -b 1000000 -q 30 -e preset=veryfast -e crf=30
memcheck-libplacebo: memcheck-libplacebo:
LD_LIBRARY_PATH=$(BINDIR) valgrind \ LD_LIBRARY_PATH=$(BINDIR) valgrind \
@ -159,19 +163,39 @@ memcheck-libplacebo:
--verbose --log-file="valgrind.log" \ --verbose --log-file="valgrind.log" \
$(BINDIR)/video2x \ $(BINDIR)/video2x \
-i $(TEST_VIDEO) -o $(TEST_OUTPUT) \ -i $(TEST_VIDEO) -o $(TEST_OUTPUT) \
-f libplacebo -w 1920 -h 1080 -s anime4k-v4-a \ -p libplacebo -w 1920 -h 1080 --libplacebo-shader anime4k-v4-a \
-p veryfast -b 1000000 -q 30 -e preset=veryfast -e crf=30
memcheck-rife:
LD_LIBRARY_PATH=$(BINDIR) valgrind \
--tool=memcheck \
--leak-check=full \
--show-leak-kinds=all \
--track-origins=yes \
--show-reachable=yes \
--verbose --log-file="valgrind.log" \
$(BINDIR)/video2x \
-i $(TEST_VIDEO) -o $(TEST_OUTPUT) \
-p rife -m 4 --rife-model rife-v4.6 \
-e preset=veryfast -e crf=30
heaptrack-realesrgan: heaptrack-realesrgan:
LD_LIBRARY_PATH=$(BINDIR) HEAPTRACK_ENABLE_DEBUGINFOD=1 heaptrack \ LD_LIBRARY_PATH=$(BINDIR) HEAPTRACK_ENABLE_DEBUGINFOD=1 heaptrack \
$(BINDIR)/video2x \ $(BINDIR)/video2x \
-i $(TEST_VIDEO) -o $(TEST_OUTPUT) \ -i $(TEST_VIDEO) -o $(TEST_OUTPUT) \
-f realesrgan -r 4 -m realesr-animevideov3 \ -p realesrgan -s 4 --realesrgan-model realesr-animevideov3 \
-p veryfast -b 1000000 -q 30 -e preset=veryfast -e crf=30
heaptrack-libplacebo: heaptrack-libplacebo:
LD_LIBRARY_PATH=$(BINDIR) HEAPTRACK_ENABLE_DEBUGINFOD=1 heaptrack \ LD_LIBRARY_PATH=$(BINDIR) HEAPTRACK_ENABLE_DEBUGINFOD=1 heaptrack \
$(BINDIR)/video2x \ $(BINDIR)/video2x \
-i $(TEST_VIDEO) -o $(TEST_OUTPUT) \ -i $(TEST_VIDEO) -o $(TEST_OUTPUT) \
-f libplacebo -w 1920 -h 1080 -s anime4k-v4-a \ -p libplacebo -w 1920 -h 1080 --libplacebo-shader anime4k-v4-a \
-p veryfast -b 1000000 -q 30 -e preset=veryfast -e crf=30
heaptrack-rife:
LD_LIBRARY_PATH=$(BINDIR) HEAPTRACK_ENABLE_DEBUGINFOD=1 heaptrack \
$(BINDIR)/video2x \
-i $(TEST_VIDEO) -o $(TEST_OUTPUT) \
-p rife -m 4 --rife-model rife-v4.6 \
-e preset=veryfast -e crf=30

View File

@ -7,9 +7,13 @@ extern "C" {
#define CALC_FFMPEG_VERSION(a, b, c) (a << 16 | b << 8 | c) #define CALC_FFMPEG_VERSION(a, b, c) (a << 16 | b << 8 | c)
AVRational get_video_frame_rate(AVFormatContext *ifmt_ctx, int in_vstream_idx);
int64_t get_video_frame_count(AVFormatContext *ifmt_ctx, int in_vstream_idx); int64_t get_video_frame_count(AVFormatContext *ifmt_ctx, int in_vstream_idx);
enum AVPixelFormat enum AVPixelFormat
get_encoder_default_pix_fmt(const AVCodec *encoder, AVPixelFormat target_pix_fmt); get_encoder_default_pix_fmt(const AVCodec *encoder, AVPixelFormat target_pix_fmt);
float get_frame_diff(AVFrame *frame1, AVFrame *frame2);
#endif // AVUTILS_H #endif // AVUTILS_H

View File

@ -22,6 +22,7 @@ class Encoder {
AVFormatContext *ifmt_ctx, AVFormatContext *ifmt_ctx,
AVCodecContext *dec_ctx, AVCodecContext *dec_ctx,
EncoderConfig *encoder_config, EncoderConfig *encoder_config,
const ProcessorConfig *processor_config,
int in_vstream_idx int in_vstream_idx
); );

View File

@ -1,21 +0,0 @@
#ifndef FILTER_H
#define FILTER_H
#include <vector>
extern "C" {
#include <libavcodec/avcodec.h>
#include <libavfilter/avfilter.h>
#include <libavutil/buffer.h>
}
// Abstract base class for filters
class Filter {
public:
virtual ~Filter() = default;
virtual int init(AVCodecContext *dec_ctx, AVCodecContext *enc_ctx, AVBufferRef *hw_ctx) = 0;
virtual int process_frame(AVFrame *in_frame, AVFrame **out_frame) = 0;
virtual int flush(std::vector<AVFrame *> &_) { return 0; }
};
#endif // FILTER_H

View File

@ -0,0 +1,61 @@
#ifndef FILTER_LIBPLACEBO_H
#define FILTER_LIBPLACEBO_H
#include <filesystem>
extern "C" {
#include <libavcodec/avcodec.h>
#include <libavfilter/buffersink.h>
#include <libavfilter/buffersrc.h>
}
#include "processor.h"
// FilterLibplacebo class definition
class FilterLibplacebo : public Filter {
private:
AVFilterGraph *filter_graph_;
AVFilterContext *buffersrc_ctx_;
AVFilterContext *buffersink_ctx_;
uint32_t vk_device_index_;
const std::filesystem::path shader_path_;
int width_;
int height_;
AVRational in_time_base_;
AVRational out_time_base_;
public:
// Constructor
FilterLibplacebo(
uint32_t vk_device_index,
const std::filesystem::path &shader_path,
int width,
int height
);
// Destructor
virtual ~FilterLibplacebo() override;
// Initializes the filter with decoder and encoder contexts
int init(AVCodecContext *dec_ctx, AVCodecContext *enc_ctx, AVBufferRef *hw_ctx) override;
// Processes an input frame and returns the processed frame
int filter(AVFrame *in_frame, AVFrame **out_frame) override;
// Flushes any remaining frames
int flush(std::vector<AVFrame *> &flushed_frames) override;
// Returns the filter's type
ProcessorType get_processor_type() const override { return PROCESSOR_LIBPLACEBO; }
// Returns the filter's output dimensions
void get_output_dimensions(
const ProcessorConfig *processor_config,
int in_width,
int in_height,
int &out_width,
int &out_height
) const override;
};
#endif // FILTER_LIBPLACEBO_H

View File

@ -0,0 +1,55 @@
#ifndef FILTER_REALESRGAN_H
#define FILTER_REALESRGAN_H
extern "C" {
#include <libavcodec/avcodec.h>
}
#include "char_defs.h"
#include "processor.h"
#include "realesrgan.h"
// FilterRealesrgan class definition
class FilterRealesrgan : public Filter {
private:
RealESRGAN *realesrgan_;
int gpuid_;
bool tta_mode_;
int scaling_factor_;
const StringType model_name_;
AVRational in_time_base_;
AVRational out_time_base_;
AVPixelFormat out_pix_fmt_;
public:
// Constructor
FilterRealesrgan(
int gpuid = 0,
bool tta_mode = false,
int scaling_factor = 4,
const StringType model_name = STR("realesr-animevideov3")
);
// Destructor
virtual ~FilterRealesrgan() override;
// Initializes the filter with decoder and encoder contexts
int init(AVCodecContext *dec_ctx, AVCodecContext *enc_ctx, AVBufferRef *hw_ctx) override;
// Processes an input frame and returns the processed frame
int filter(AVFrame *in_frame, AVFrame **out_frame) override;
// Returns the filter's type
ProcessorType get_processor_type() const override { return PROCESSOR_REALESRGAN; }
// Returns the filter's output dimensions
void get_output_dimensions(
const ProcessorConfig *processor_config,
int in_width,
int in_height,
int &out_width,
int &out_height
) const override;
};
#endif // FILTER_REALESRGAN_H

View File

@ -0,0 +1,19 @@
#ifndef FRAMES_PROCESSOR_H
#define FRAMES_PROCESSOR_H
#include "decoder.h"
#include "encoder.h"
#include "libvideo2x.h"
#include "processor.h"
int process_frames(
const EncoderConfig *encoder_config,
const ProcessorConfig *processor_config,
VideoProcessingContext *proc_ctx,
Decoder &decoder,
Encoder &encoder,
Processor *processor,
bool benchmark = false
);
#endif // FRAMES_PROCESSOR_H

View File

@ -0,0 +1,64 @@
#ifndef INTERPOLATOR_RIFE_H
#define INTERPOLATOR_RIFE_H
extern "C" {
#include <libavcodec/avcodec.h>
}
#include "char_defs.h"
#include "processor.h"
#include "rife.h"
// InterpolatorRIFE class definition
class InterpolatorRIFE : public Interpolator {
private:
RIFE *rife_;
int gpuid_;
bool tta_mode_;
bool tta_temporal_mode_;
bool uhd_mode_;
int num_threads_;
bool rife_v2_;
bool rife_v4_;
const StringType model_name_;
AVRational in_time_base_;
AVRational out_time_base_;
AVPixelFormat out_pix_fmt_;
public:
// Constructor
InterpolatorRIFE(
int gpuid = 0,
bool tta_mode = false,
bool tta_temporal_mode = false,
bool uhd_mode = false,
int num_threads = 1,
bool rife_v2 = false,
bool rife_v4 = true,
const StringType model_name = STR("rife-v4.6")
);
// Destructor
virtual ~InterpolatorRIFE() override;
// Initializes the interpolator with decoder and encoder contexts
int init(AVCodecContext *dec_ctx, AVCodecContext *enc_ctx, AVBufferRef *hw_ctx) override;
// Processes an input frame and returns the processed frame
int interpolate(AVFrame *prev_frame, AVFrame *in_frame, AVFrame **out_frame, float time_step)
override;
// Returns the interpolator's type
ProcessorType get_processor_type() const override { return PROCESSOR_RIFE; }
// Returns the interpolator's output dimensions
void get_output_dimensions(
const ProcessorConfig *processor_config,
int in_width,
int in_height,
int &out_width,
int &out_height
) const override;
};
#endif // INTERPOLATOR_RIFE_H

View File

@ -1,49 +0,0 @@
#ifndef LIBPLACEBO_FILTER_H
#define LIBPLACEBO_FILTER_H
#include <filesystem>
extern "C" {
#include <libavcodec/avcodec.h>
#include <libavfilter/buffersink.h>
#include <libavfilter/buffersrc.h>
}
#include "filter.h"
// LibplaceboFilter class definition
class LibplaceboFilter : public Filter {
private:
AVFilterGraph *filter_graph;
AVFilterContext *buffersrc_ctx;
AVFilterContext *buffersink_ctx;
uint32_t vk_device_index;
const std::filesystem::path shader_path;
int out_width;
int out_height;
AVRational in_time_base;
AVRational out_time_base;
public:
// Constructor
LibplaceboFilter(
uint32_t vk_device_index,
const std::filesystem::path &shader_path,
int width,
int height
);
// Destructor
virtual ~LibplaceboFilter() override;
// Initializes the filter with decoder and encoder contexts
int init(AVCodecContext *dec_ctx, AVCodecContext *enc_ctx, AVBufferRef *hw_ctx) override;
// Processes an input frame and returns the processed frame
int process_frame(AVFrame *in_frame, AVFrame **out_frame) override;
// Flushes any remaining frames
int flush(std::vector<AVFrame *> &flushed_frames) override;
};
#endif // LIBPLACEBO_FILTER_H

View File

@ -30,13 +30,17 @@ extern "C" {
extern "C" { extern "C" {
#endif #endif
// Enum to specify filter type enum ProcessingMode {
enum FilterType { PROCESSING_MODE_FILTER,
FILTER_LIBPLACEBO, PROCESSING_MODE_INTERPOLATE,
FILTER_REALESRGAN };
enum ProcessorType {
PROCESSOR_LIBPLACEBO,
PROCESSOR_REALESRGAN,
PROCESSOR_RIFE,
}; };
// Enum to specify log level
enum Libvideo2xLogLevel { enum Libvideo2xLogLevel {
LIBVIDEO2X_LOG_LEVEL_TRACE, LIBVIDEO2X_LOG_LEVEL_TRACE,
LIBVIDEO2X_LOG_LEVEL_DEBUG, LIBVIDEO2X_LOG_LEVEL_DEBUG,
@ -47,26 +51,37 @@ enum Libvideo2xLogLevel {
LIBVIDEO2X_LOG_LEVEL_OFF LIBVIDEO2X_LOG_LEVEL_OFF
}; };
// Configuration for Libplacebo filter
struct LibplaceboConfig { struct LibplaceboConfig {
int out_width;
int out_height;
const CharType *shader_path; const CharType *shader_path;
}; };
// Configuration for RealESRGAN filter
struct RealESRGANConfig { struct RealESRGANConfig {
bool tta_mode; bool tta_mode;
int scaling_factor; const CharType *model_name;
};
struct RIFEConfig {
bool tta_mode;
bool tta_temporal_mode;
bool uhd_mode;
int num_threads;
bool rife_v2;
bool rife_v4;
const CharType *model_name; const CharType *model_name;
}; };
// Unified filter configuration // Unified filter configuration
struct FilterConfig { struct ProcessorConfig {
enum FilterType filter_type; enum ProcessorType processor_type;
int width;
int height;
int scaling_factor;
int frm_rate_mul;
float scn_det_thresh;
union { union {
struct LibplaceboConfig libplacebo; struct LibplaceboConfig libplacebo;
struct RealESRGANConfig realesrgan; struct RealESRGANConfig realesrgan;
struct RIFEConfig rife;
} config; } config;
}; };
@ -140,7 +155,7 @@ LIBVIDEO2X_API int process_video(
bool benchmark, bool benchmark,
uint32_t vk_device_index, uint32_t vk_device_index,
enum AVHWDeviceType hw_device_type, enum AVHWDeviceType hw_device_type,
const struct FilterConfig *filter_config, const struct ProcessorConfig *filter_config,
struct EncoderConfig *encoder_config, struct EncoderConfig *encoder_config,
struct VideoProcessingContext *proc_ctx struct VideoProcessingContext *proc_ctx
); );

View File

@ -0,0 +1,45 @@
#ifndef PROCESSOR_H
#define PROCESSOR_H
#include <vector>
extern "C" {
#include <libavcodec/avcodec.h>
#include <libavfilter/avfilter.h>
#include <libavutil/buffer.h>
}
#include "libvideo2x.h"
class Processor {
public:
virtual ~Processor() = default;
virtual int init(AVCodecContext *dec_ctx, AVCodecContext *enc_ctx, AVBufferRef *hw_ctx) = 0;
virtual int flush(std::vector<AVFrame *> &_) { return 0; }
virtual ProcessingMode get_processing_mode() const = 0;
virtual ProcessorType get_processor_type() const = 0;
virtual void get_output_dimensions(
const ProcessorConfig *processor_config,
int in_width,
int in_height,
int &width,
int &height
) const = 0;
};
// Abstract base class for filters
class Filter : public Processor {
public:
ProcessingMode get_processing_mode() const override { return PROCESSING_MODE_FILTER; }
virtual int filter(AVFrame *in_frame, AVFrame **out_frame) = 0;
};
// Abstract base class for interpolators
class Interpolator : public Processor {
public:
ProcessingMode get_processing_mode() const override { return PROCESSING_MODE_INTERPOLATE; }
virtual int
interpolate(AVFrame *prev_frame, AVFrame *in_frame, AVFrame **out_frame, float time_step) = 0;
};
#endif // PROCESSOR_H

View File

@ -0,0 +1,36 @@
#ifndef PROCESSOR_FACTORY_H
#define PROCESSOR_FACTORY_H
#include <functional>
#include <memory>
#include <unordered_map>
#include "processor.h"
// Processor Factory Class
class ProcessorFactory {
public:
using Creator = std::function<std::unique_ptr<Processor>(const ProcessorConfig *, uint32_t)>;
// Singleton instance accessor
static ProcessorFactory &instance();
// Register a processor type with its creation function
void register_processor(ProcessorType type, Creator creator);
// Create a processor instance based on configuration
std::unique_ptr<Processor>
create_processor(const ProcessorConfig *processor_config, uint32_t vk_device_index) const;
private:
// Private constructor for Singleton
ProcessorFactory() = default;
// Map of processor types to their creation functions
std::unordered_map<ProcessorType, Creator> creators;
// Static initializer for default processors
static void init_default_processors(ProcessorFactory &factory);
};
#endif // PROCESSOR_FACTORY_H

View File

@ -1,43 +0,0 @@
#ifndef REALSRGAN_FILTER_H
#define REALSRGAN_FILTER_H
extern "C" {
#include <libavcodec/avcodec.h>
}
#include "char_defs.h"
#include "filter.h"
#include "realesrgan.h"
// RealesrganFilter class definition
class RealesrganFilter : public Filter {
private:
RealESRGAN *realesrgan;
int gpuid;
bool tta_mode;
int scaling_factor;
const StringType model_name;
AVRational in_time_base;
AVRational out_time_base;
AVPixelFormat out_pix_fmt;
public:
// Constructor
RealesrganFilter(
int gpuid = 0,
bool tta_mode = false,
int scaling_factor = 4,
const StringType model_name = STR("realesr-animevideov3")
);
// Destructor
virtual ~RealesrganFilter() override;
// Initializes the filter with decoder and encoder contexts
int init(AVCodecContext *dec_ctx, AVCodecContext *enc_ctx, AVBufferRef *hw_ctx) override;
// Processes an input frame and returns the processed frame
int process_frame(AVFrame *in_frame, AVFrame **out_frame) override;
};
#endif

BIN
models/rife/rife-HD/contextnet.bin vendored Normal file

Binary file not shown.

70
models/rife/rife-HD/contextnet.param vendored Normal file
View File

@ -0,0 +1,70 @@
7767517
68 82
Input input.1 0 1 input.1
Input flow.1 0 1 flow.1
UnaryOp flow.0 1 1 flow.1 flow.0 0=1
Convolution Conv_0 1 1 input.1 45 0=32 1=3 3=2 4=1 5=1 6=864
PReLU PRelu_1 1 1 45 47 0=32
Split splitncnn_0 1 2 47 47_splitncnn_0 47_splitncnn_1
Convolution Conv_2 1 1 47_splitncnn_1 48 0=32 1=3 3=2 4=1 6=9216
Convolution Conv_3 1 1 47_splitncnn_0 49 0=32 1=3 3=2 4=1 5=1 6=9216
PReLU PRelu_4 1 1 49 51 0=32
Convolution Conv_5 1 1 51 52 0=32 1=3 4=1 5=1 6=9216
Split splitncnn_1 1 2 52 52_splitncnn_0 52_splitncnn_1
Pooling ReduceMean_7 1 1 52_splitncnn_1 54 0=1 4=1
InnerProduct Conv_8 1 1 54 57 0=16 2=512 9=2 -23310=1,1.143919e+00
InnerProduct Conv_10 1 1 57 59 0=32 2=512 9=4
BinaryOp Mul_12 2 1 52_splitncnn_0 59 60 0=2
BinaryOp Add_13 2 1 60 48 61
PReLU PRelu_14 1 1 61 63 0=32
Split splitncnn_2 1 3 63 63_splitncnn_0 63_splitncnn_1 63_splitncnn_2
Interp Resize_16 1 1 flow.0 73 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_18 1 1 73 75 0=2 1=1 2=5.000000e-01
Split splitncnn_3 1 2 75 75_splitncnn_0 75_splitncnn_1
rife.Warp Warp_24 2 1 63_splitncnn_2 75_splitncnn_1 f1
Convolution Conv_25 1 1 63_splitncnn_1 82 0=64 1=3 3=2 4=1 6=18432
Convolution Conv_26 1 1 63_splitncnn_0 83 0=64 1=3 3=2 4=1 5=1 6=18432
PReLU PRelu_27 1 1 83 85 0=64
Convolution Conv_28 1 1 85 86 0=64 1=3 4=1 5=1 6=36864
Split splitncnn_4 1 2 86 86_splitncnn_0 86_splitncnn_1
Pooling ReduceMean_30 1 1 86_splitncnn_1 88 0=1 4=1
InnerProduct Conv_31 1 1 88 91 0=16 2=1024 9=2 -23310=1,3.006833e-01
InnerProduct Conv_33 1 1 91 93 0=64 2=1024 9=4
BinaryOp Mul_35 2 1 86_splitncnn_0 93 94 0=2
BinaryOp Add_36 2 1 94 82 95
PReLU PRelu_37 1 1 95 97 0=64
Split splitncnn_5 1 3 97 97_splitncnn_0 97_splitncnn_1 97_splitncnn_2
Interp Resize_39 1 1 75_splitncnn_0 107 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_41 1 1 107 109 0=2 1=1 2=5.000000e-01
Split splitncnn_6 1 2 109 109_splitncnn_0 109_splitncnn_1
rife.Warp Warp_47 2 1 97_splitncnn_2 109_splitncnn_1 f2
Convolution Conv_48 1 1 97_splitncnn_1 116 0=128 1=3 3=2 4=1 6=73728
Convolution Conv_49 1 1 97_splitncnn_0 117 0=128 1=3 3=2 4=1 5=1 6=73728
PReLU PRelu_50 1 1 117 119 0=128
Convolution Conv_51 1 1 119 120 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_7 1 2 120 120_splitncnn_0 120_splitncnn_1
Pooling ReduceMean_53 1 1 120_splitncnn_1 122 0=1 4=1
InnerProduct Conv_54 1 1 122 125 0=16 2=2048 9=2 -23310=1,7.002444e-02
InnerProduct Conv_56 1 1 125 127 0=128 2=2048 9=4
BinaryOp Mul_58 2 1 120_splitncnn_0 127 128 0=2
BinaryOp Add_59 2 1 128 116 129
PReLU PRelu_60 1 1 129 131 0=128
Split splitncnn_8 1 3 131 131_splitncnn_0 131_splitncnn_1 131_splitncnn_2
Interp Resize_62 1 1 109_splitncnn_0 141 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_64 1 1 141 143 0=2 1=1 2=5.000000e-01
Split splitncnn_9 1 2 143 143_splitncnn_0 143_splitncnn_1
rife.Warp Warp_70 2 1 131_splitncnn_2 143_splitncnn_1 f3
Convolution Conv_71 1 1 131_splitncnn_1 150 0=256 1=3 3=2 4=1 6=294912
Convolution Conv_72 1 1 131_splitncnn_0 151 0=256 1=3 3=2 4=1 5=1 6=294912
PReLU PRelu_73 1 1 151 153 0=256
Convolution Conv_74 1 1 153 154 0=256 1=3 4=1 5=1 6=589824
Split splitncnn_10 1 2 154 154_splitncnn_0 154_splitncnn_1
Pooling ReduceMean_76 1 1 154_splitncnn_1 156 0=1 4=1
InnerProduct Conv_77 1 1 156 159 0=16 2=4096 9=2 -23310=1,6.568319e-02
InnerProduct Conv_79 1 1 159 161 0=256 2=4096 9=4
BinaryOp Mul_81 2 1 154_splitncnn_0 161 162 0=2
BinaryOp Add_82 2 1 162 150 163
PReLU PRelu_83 1 1 163 165 0=256
Interp Resize_85 1 1 143_splitncnn_0 175 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_87 1 1 175 177 0=2 1=1 2=5.000000e-01
rife.Warp Warp_93 2 1 165 177 f4

BIN
models/rife/rife-HD/flownet.bin vendored Normal file

Binary file not shown.

322
models/rife/rife-HD/flownet.param vendored Normal file
View File

@ -0,0 +1,322 @@
7767517
320 386
Input input0 0 1 input0
Input input1 0 1 input1
Concat input.1 2 1 input0 input1 input.1
Interp Resize_1 1 1 input.1 454 0=2 1=5.000000e-01 2=5.000000e-01
Split splitncnn_0 1 7 454 454_splitncnn_0 454_splitncnn_1 454_splitncnn_2 454_splitncnn_3 454_splitncnn_4 454_splitncnn_5 454_splitncnn_6
Interp Resize_3 1 1 454_splitncnn_6 464 0=2 1=1.250000e-01 2=1.250000e-01
Convolution Conv_4 1 1 464 466 0=192 1=5 3=2 4=2 5=1 6=28800
PReLU PRelu_6 1 1 466 468 0=192
Split splitncnn_1 1 2 468 468_splitncnn_0 468_splitncnn_1
Convolution Conv_7 1 1 468_splitncnn_1 470 0=192 1=5 4=2 5=1 6=921600
PReLU PRelu_9 1 1 470 472 0=192
Convolution Conv_10 1 1 472 474 0=192 1=3 4=1 5=1 6=331776
Split splitncnn_2 1 2 474 474_splitncnn_0 474_splitncnn_1
Pooling ReduceMean_13 1 1 474_splitncnn_1 476 0=1 4=1
InnerProduct Conv_14 1 1 476 479 0=16 2=3072 9=2 -23310=1,1.428942e-02
InnerProduct Conv_16 1 1 479 481 0=192 2=3072 9=4
BinaryOp Mul_18 2 1 474_splitncnn_0 481 482 0=2
BinaryOp Add_19 2 1 482 468_splitncnn_0 483
PReLU PRelu_20 1 1 483 485 0=192
Split splitncnn_3 1 2 485 485_splitncnn_0 485_splitncnn_1
Convolution Conv_21 1 1 485_splitncnn_1 487 0=192 1=5 4=2 5=1 6=921600
PReLU PRelu_23 1 1 487 489 0=192
Convolution Conv_24 1 1 489 491 0=192 1=3 4=1 5=1 6=331776
Split splitncnn_4 1 2 491 491_splitncnn_0 491_splitncnn_1
Pooling ReduceMean_27 1 1 491_splitncnn_1 493 0=1 4=1
InnerProduct Conv_28 1 1 493 496 0=16 2=3072 9=2 -23310=1,3.543398e-01
InnerProduct Conv_30 1 1 496 498 0=192 2=3072 9=4
BinaryOp Mul_32 2 1 491_splitncnn_0 498 499 0=2
BinaryOp Add_33 2 1 499 485_splitncnn_0 500
PReLU PRelu_34 1 1 500 502 0=192
Split splitncnn_5 1 2 502 502_splitncnn_0 502_splitncnn_1
Convolution Conv_35 1 1 502_splitncnn_1 504 0=192 1=5 4=2 5=1 6=921600
PReLU PRelu_37 1 1 504 506 0=192
Convolution Conv_38 1 1 506 508 0=192 1=3 4=1 5=1 6=331776
Split splitncnn_6 1 2 508 508_splitncnn_0 508_splitncnn_1
Pooling ReduceMean_41 1 1 508_splitncnn_1 510 0=1 4=1
InnerProduct Conv_42 1 1 510 513 0=16 2=3072 9=2 -23310=1,5.366787e-01
InnerProduct Conv_44 1 1 513 515 0=192 2=3072 9=4
BinaryOp Mul_46 2 1 508_splitncnn_0 515 516 0=2
BinaryOp Add_47 2 1 516 502_splitncnn_0 517
PReLU PRelu_48 1 1 517 519 0=192
Split splitncnn_7 1 2 519 519_splitncnn_0 519_splitncnn_1
Convolution Conv_49 1 1 519_splitncnn_1 521 0=192 1=5 4=2 5=1 6=921600
PReLU PRelu_51 1 1 521 523 0=192
Convolution Conv_52 1 1 523 525 0=192 1=3 4=1 5=1 6=331776
Split splitncnn_8 1 2 525 525_splitncnn_0 525_splitncnn_1
Pooling ReduceMean_55 1 1 525_splitncnn_1 527 0=1 4=1
InnerProduct Conv_56 1 1 527 530 0=16 2=3072 9=2 -23310=1,-4.889974e-03
InnerProduct Conv_58 1 1 530 532 0=192 2=3072 9=4
BinaryOp Mul_60 2 1 525_splitncnn_0 532 533 0=2
BinaryOp Add_61 2 1 533 519_splitncnn_0 534
PReLU PRelu_62 1 1 534 536 0=192
Split splitncnn_9 1 2 536 536_splitncnn_0 536_splitncnn_1
Convolution Conv_63 1 1 536_splitncnn_1 538 0=192 1=5 4=2 5=1 6=921600
PReLU PRelu_65 1 1 538 540 0=192
Convolution Conv_66 1 1 540 542 0=192 1=3 4=1 5=1 6=331776
Split splitncnn_10 1 2 542 542_splitncnn_0 542_splitncnn_1
Pooling ReduceMean_69 1 1 542_splitncnn_1 544 0=1 4=1
InnerProduct Conv_70 1 1 544 547 0=16 2=3072 9=2 -23310=1,-1.182169e-02
InnerProduct Conv_72 1 1 547 549 0=192 2=3072 9=4
BinaryOp Mul_74 2 1 542_splitncnn_0 549 550 0=2
BinaryOp Add_75 2 1 550 536_splitncnn_0 551
PReLU PRelu_76 1 1 551 553 0=192
Split splitncnn_11 1 2 553 553_splitncnn_0 553_splitncnn_1
Convolution Conv_77 1 1 553_splitncnn_1 555 0=192 1=5 4=2 5=1 6=921600
PReLU PRelu_79 1 1 555 557 0=192
Convolution Conv_80 1 1 557 559 0=192 1=3 4=1 5=1 6=331776
Split splitncnn_12 1 2 559 559_splitncnn_0 559_splitncnn_1
Pooling ReduceMean_83 1 1 559_splitncnn_1 561 0=1 4=1
InnerProduct Conv_84 1 1 561 564 0=16 2=3072 9=2 -23310=1,2.179182e-01
InnerProduct Conv_86 1 1 564 566 0=192 2=3072 9=4
BinaryOp Mul_88 2 1 559_splitncnn_0 566 567 0=2
BinaryOp Add_89 2 1 567 553_splitncnn_0 568
PReLU PRelu_90 1 1 568 570 0=192
Convolution Conv_91 1 1 570 571 0=8 1=3 4=1 5=1 6=13824
PixelShuffle DepthToSpace_92 1 1 571 572 0=2
Interp Resize_94 1 1 572 582 0=2 1=8.000000e+00 2=8.000000e+00
Split splitncnn_13 1 6 582 582_splitncnn_0 582_splitncnn_1 582_splitncnn_2 582_splitncnn_3 582_splitncnn_4 582_splitncnn_5
Crop Slice_99 1 1 454_splitncnn_5 587 -23309=1,0 -23310=1,3 -23311=1,0
rife.Warp Warp_105 2 1 587 582_splitncnn_5 593
Crop Slice_110 1 1 454_splitncnn_4 598 -23309=1,3 -23310=1,2147483647 -23311=1,0
UnaryOp Neg_111 1 1 582_splitncnn_4 599 0=1
rife.Warp Warp_117 2 1 598 599 605
Concat Concat_118 3 1 593 605 582_splitncnn_3 606
Interp Resize_120 1 1 606 616 0=2 1=2.500000e-01 2=2.500000e-01
Convolution Conv_121 1 1 616 618 0=128 1=5 3=2 4=2 5=1 6=25600
PReLU PRelu_123 1 1 618 620 0=128
Split splitncnn_14 1 2 620 620_splitncnn_0 620_splitncnn_1
Convolution Conv_124 1 1 620_splitncnn_1 622 0=128 1=5 4=2 5=1 6=409600
PReLU PRelu_126 1 1 622 624 0=128
Convolution Conv_127 1 1 624 626 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_15 1 2 626 626_splitncnn_0 626_splitncnn_1
Pooling ReduceMean_130 1 1 626_splitncnn_1 628 0=1 4=1
InnerProduct Conv_131 1 1 628 631 0=16 2=2048 9=2 -23310=1,-3.599843e-03
InnerProduct Conv_133 1 1 631 633 0=128 2=2048 9=4
BinaryOp Mul_135 2 1 626_splitncnn_0 633 634 0=2
BinaryOp Add_136 2 1 634 620_splitncnn_0 635
PReLU PRelu_137 1 1 635 637 0=128
Split splitncnn_16 1 2 637 637_splitncnn_0 637_splitncnn_1
Convolution Conv_138 1 1 637_splitncnn_1 639 0=128 1=5 4=2 5=1 6=409600
PReLU PRelu_140 1 1 639 641 0=128
Convolution Conv_141 1 1 641 643 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_17 1 2 643 643_splitncnn_0 643_splitncnn_1
Pooling ReduceMean_144 1 1 643_splitncnn_1 645 0=1 4=1
InnerProduct Conv_145 1 1 645 648 0=16 2=2048 9=2 -23310=1,2.117399e-01
InnerProduct Conv_147 1 1 648 650 0=128 2=2048 9=4
BinaryOp Mul_149 2 1 643_splitncnn_0 650 651 0=2
BinaryOp Add_150 2 1 651 637_splitncnn_0 652
PReLU PRelu_151 1 1 652 654 0=128
Split splitncnn_18 1 2 654 654_splitncnn_0 654_splitncnn_1
Convolution Conv_152 1 1 654_splitncnn_1 656 0=128 1=5 4=2 5=1 6=409600
PReLU PRelu_154 1 1 656 658 0=128
Convolution Conv_155 1 1 658 660 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_19 1 2 660 660_splitncnn_0 660_splitncnn_1
Pooling ReduceMean_158 1 1 660_splitncnn_1 662 0=1 4=1
InnerProduct Conv_159 1 1 662 665 0=16 2=2048 9=2 -23310=1,2.712289e-01
InnerProduct Conv_161 1 1 665 667 0=128 2=2048 9=4
BinaryOp Mul_163 2 1 660_splitncnn_0 667 668 0=2
BinaryOp Add_164 2 1 668 654_splitncnn_0 669
PReLU PRelu_165 1 1 669 671 0=128
Split splitncnn_20 1 2 671 671_splitncnn_0 671_splitncnn_1
Convolution Conv_166 1 1 671_splitncnn_1 673 0=128 1=5 4=2 5=1 6=409600
PReLU PRelu_168 1 1 673 675 0=128
Convolution Conv_169 1 1 675 677 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_21 1 2 677 677_splitncnn_0 677_splitncnn_1
Pooling ReduceMean_172 1 1 677_splitncnn_1 679 0=1 4=1
InnerProduct Conv_173 1 1 679 682 0=16 2=2048 9=2 -23310=1,8.141350e-02
InnerProduct Conv_175 1 1 682 684 0=128 2=2048 9=4
BinaryOp Mul_177 2 1 677_splitncnn_0 684 685 0=2
BinaryOp Add_178 2 1 685 671_splitncnn_0 686
PReLU PRelu_179 1 1 686 688 0=128
Split splitncnn_22 1 2 688 688_splitncnn_0 688_splitncnn_1
Convolution Conv_180 1 1 688_splitncnn_1 690 0=128 1=5 4=2 5=1 6=409600
PReLU PRelu_182 1 1 690 692 0=128
Convolution Conv_183 1 1 692 694 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_23 1 2 694 694_splitncnn_0 694_splitncnn_1
Pooling ReduceMean_186 1 1 694_splitncnn_1 696 0=1 4=1
InnerProduct Conv_187 1 1 696 699 0=16 2=2048 9=2 -23310=1,4.956326e-02
InnerProduct Conv_189 1 1 699 701 0=128 2=2048 9=4
BinaryOp Mul_191 2 1 694_splitncnn_0 701 702 0=2
BinaryOp Add_192 2 1 702 688_splitncnn_0 703
PReLU PRelu_193 1 1 703 705 0=128
Split splitncnn_24 1 2 705 705_splitncnn_0 705_splitncnn_1
Convolution Conv_194 1 1 705_splitncnn_1 707 0=128 1=5 4=2 5=1 6=409600
PReLU PRelu_196 1 1 707 709 0=128
Convolution Conv_197 1 1 709 711 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_25 1 2 711 711_splitncnn_0 711_splitncnn_1
Pooling ReduceMean_200 1 1 711_splitncnn_1 713 0=1 4=1
InnerProduct Conv_201 1 1 713 716 0=16 2=2048 9=2 -23310=1,1.553750e-01
InnerProduct Conv_203 1 1 716 718 0=128 2=2048 9=4
BinaryOp Mul_205 2 1 711_splitncnn_0 718 719 0=2
BinaryOp Add_206 2 1 719 705_splitncnn_0 720
PReLU PRelu_207 1 1 720 722 0=128
Convolution Conv_208 1 1 722 723 0=8 1=3 4=1 5=1 6=9216
PixelShuffle DepthToSpace_209 1 1 723 724 0=2
Interp Resize_211 1 1 724 734 0=2 1=4.000000e+00 2=4.000000e+00
Split splitncnn_26 1 3 734 734_splitncnn_0 734_splitncnn_1 734_splitncnn_2
BinaryOp Add_212 2 1 582_splitncnn_2 734_splitncnn_2 735
Split splitncnn_27 1 3 735 735_splitncnn_0 735_splitncnn_1 735_splitncnn_2
Crop Slice_217 1 1 454_splitncnn_3 740 -23309=1,0 -23310=1,3 -23311=1,0
rife.Warp Warp_223 2 1 740 735_splitncnn_2 746
Crop Slice_228 1 1 454_splitncnn_2 751 -23309=1,3 -23310=1,2147483647 -23311=1,0
UnaryOp Neg_229 1 1 735_splitncnn_1 752 0=1
rife.Warp Warp_235 2 1 751 752 758
Concat Concat_236 3 1 746 758 735_splitncnn_0 759
Interp Resize_238 1 1 759 769 0=2 1=5.000000e-01 2=5.000000e-01
Convolution Conv_239 1 1 769 771 0=96 1=5 3=2 4=2 5=1 6=19200
PReLU PRelu_241 1 1 771 773 0=96
Split splitncnn_28 1 2 773 773_splitncnn_0 773_splitncnn_1
Convolution Conv_242 1 1 773_splitncnn_1 775 0=96 1=5 4=2 5=1 6=230400
PReLU PRelu_244 1 1 775 777 0=96
Convolution Conv_245 1 1 777 779 0=96 1=3 4=1 5=1 6=82944
Split splitncnn_29 1 2 779 779_splitncnn_0 779_splitncnn_1
Pooling ReduceMean_248 1 1 779_splitncnn_1 781 0=1 4=1
InnerProduct Conv_249 1 1 781 784 0=16 2=1536 9=2 -23310=1,1.670981e-03
InnerProduct Conv_251 1 1 784 786 0=96 2=1536 9=4
BinaryOp Mul_253 2 1 779_splitncnn_0 786 787 0=2
BinaryOp Add_254 2 1 787 773_splitncnn_0 788
PReLU PRelu_255 1 1 788 790 0=96
Split splitncnn_30 1 2 790 790_splitncnn_0 790_splitncnn_1
Convolution Conv_256 1 1 790_splitncnn_1 792 0=96 1=5 4=2 5=1 6=230400
PReLU PRelu_258 1 1 792 794 0=96
Convolution Conv_259 1 1 794 796 0=96 1=3 4=1 5=1 6=82944
Split splitncnn_31 1 2 796 796_splitncnn_0 796_splitncnn_1
Pooling ReduceMean_262 1 1 796_splitncnn_1 798 0=1 4=1
InnerProduct Conv_263 1 1 798 801 0=16 2=1536 9=2 -23310=1,3.868800e-01
InnerProduct Conv_265 1 1 801 803 0=96 2=1536 9=4
BinaryOp Mul_267 2 1 796_splitncnn_0 803 804 0=2
BinaryOp Add_268 2 1 804 790_splitncnn_0 805
PReLU PRelu_269 1 1 805 807 0=96
Split splitncnn_32 1 2 807 807_splitncnn_0 807_splitncnn_1
Convolution Conv_270 1 1 807_splitncnn_1 809 0=96 1=5 4=2 5=1 6=230400
PReLU PRelu_272 1 1 809 811 0=96
Convolution Conv_273 1 1 811 813 0=96 1=3 4=1 5=1 6=82944
Split splitncnn_33 1 2 813 813_splitncnn_0 813_splitncnn_1
Pooling ReduceMean_276 1 1 813_splitncnn_1 815 0=1 4=1
InnerProduct Conv_277 1 1 815 818 0=16 2=1536 9=2 -23310=1,3.475277e-01
InnerProduct Conv_279 1 1 818 820 0=96 2=1536 9=4
BinaryOp Mul_281 2 1 813_splitncnn_0 820 821 0=2
BinaryOp Add_282 2 1 821 807_splitncnn_0 822
PReLU PRelu_283 1 1 822 824 0=96
Split splitncnn_34 1 2 824 824_splitncnn_0 824_splitncnn_1
Convolution Conv_284 1 1 824_splitncnn_1 826 0=96 1=5 4=2 5=1 6=230400
PReLU PRelu_286 1 1 826 828 0=96
Convolution Conv_287 1 1 828 830 0=96 1=3 4=1 5=1 6=82944
Split splitncnn_35 1 2 830 830_splitncnn_0 830_splitncnn_1
Pooling ReduceMean_290 1 1 830_splitncnn_1 832 0=1 4=1
InnerProduct Conv_291 1 1 832 835 0=16 2=1536 9=2 -23310=1,7.044167e-02
InnerProduct Conv_293 1 1 835 837 0=96 2=1536 9=4
BinaryOp Mul_295 2 1 830_splitncnn_0 837 838 0=2
BinaryOp Add_296 2 1 838 824_splitncnn_0 839
PReLU PRelu_297 1 1 839 841 0=96
Split splitncnn_36 1 2 841 841_splitncnn_0 841_splitncnn_1
Convolution Conv_298 1 1 841_splitncnn_1 843 0=96 1=5 4=2 5=1 6=230400
PReLU PRelu_300 1 1 843 845 0=96
Convolution Conv_301 1 1 845 847 0=96 1=3 4=1 5=1 6=82944
Split splitncnn_37 1 2 847 847_splitncnn_0 847_splitncnn_1
Pooling ReduceMean_304 1 1 847_splitncnn_1 849 0=1 4=1
InnerProduct Conv_305 1 1 849 852 0=16 2=1536 9=2 -23310=1,1.834324e-01
InnerProduct Conv_307 1 1 852 854 0=96 2=1536 9=4
BinaryOp Mul_309 2 1 847_splitncnn_0 854 855 0=2
BinaryOp Add_310 2 1 855 841_splitncnn_0 856
PReLU PRelu_311 1 1 856 858 0=96
Split splitncnn_38 1 2 858 858_splitncnn_0 858_splitncnn_1
Convolution Conv_312 1 1 858_splitncnn_1 860 0=96 1=5 4=2 5=1 6=230400
PReLU PRelu_314 1 1 860 862 0=96
Convolution Conv_315 1 1 862 864 0=96 1=3 4=1 5=1 6=82944
Split splitncnn_39 1 2 864 864_splitncnn_0 864_splitncnn_1
Pooling ReduceMean_318 1 1 864_splitncnn_1 866 0=1 4=1
InnerProduct Conv_319 1 1 866 869 0=16 2=1536 9=2 -23310=1,3.572731e-01
InnerProduct Conv_321 1 1 869 871 0=96 2=1536 9=4
BinaryOp Mul_323 2 1 864_splitncnn_0 871 872 0=2
BinaryOp Add_324 2 1 872 858_splitncnn_0 873
PReLU PRelu_325 1 1 873 875 0=96
Convolution Conv_326 1 1 875 876 0=8 1=3 4=1 5=1 6=6912
PixelShuffle DepthToSpace_327 1 1 876 877 0=2
Interp Resize_329 1 1 877 887 0=2 1=2.000000e+00 2=2.000000e+00
Split splitncnn_40 1 2 887 887_splitncnn_0 887_splitncnn_1
BinaryOp Add_330 2 1 582_splitncnn_1 734_splitncnn_1 888
BinaryOp Add_331 2 1 888 887_splitncnn_1 889
Split splitncnn_41 1 3 889 889_splitncnn_0 889_splitncnn_1 889_splitncnn_2
Crop Slice_336 1 1 454_splitncnn_1 894 -23309=1,0 -23310=1,3 -23311=1,0
rife.Warp Warp_342 2 1 894 889_splitncnn_2 900
Crop Slice_347 1 1 454_splitncnn_0 905 -23309=1,3 -23310=1,2147483647 -23311=1,0
UnaryOp Neg_348 1 1 889_splitncnn_1 906 0=1
rife.Warp Warp_354 2 1 905 906 912
Concat Concat_355 3 1 900 912 889_splitncnn_0 913
Convolution Conv_356 1 1 913 915 0=48 1=5 3=2 4=2 5=1 6=9600
PReLU PRelu_358 1 1 915 917 0=48
Split splitncnn_42 1 2 917 917_splitncnn_0 917_splitncnn_1
Convolution Conv_359 1 1 917_splitncnn_1 919 0=48 1=5 4=2 5=1 6=57600
PReLU PRelu_361 1 1 919 921 0=48
Convolution Conv_362 1 1 921 923 0=48 1=3 4=1 5=1 6=20736
Split splitncnn_43 1 2 923 923_splitncnn_0 923_splitncnn_1
Pooling ReduceMean_365 1 1 923_splitncnn_1 925 0=1 4=1
InnerProduct Conv_366 1 1 925 928 0=16 2=768 9=2 -23310=1,2.075541e-02
InnerProduct Conv_368 1 1 928 930 0=48 2=768 9=4
BinaryOp Mul_370 2 1 923_splitncnn_0 930 931 0=2
BinaryOp Add_371 2 1 931 917_splitncnn_0 932
PReLU PRelu_372 1 1 932 934 0=48
Split splitncnn_44 1 2 934 934_splitncnn_0 934_splitncnn_1
Convolution Conv_373 1 1 934_splitncnn_1 936 0=48 1=5 4=2 5=1 6=57600
PReLU PRelu_375 1 1 936 938 0=48
Convolution Conv_376 1 1 938 940 0=48 1=3 4=1 5=1 6=20736
Split splitncnn_45 1 2 940 940_splitncnn_0 940_splitncnn_1
Pooling ReduceMean_379 1 1 940_splitncnn_1 942 0=1 4=1
InnerProduct Conv_380 1 1 942 945 0=16 2=768 9=2 -23310=1,7.201483e-01
InnerProduct Conv_382 1 1 945 947 0=48 2=768 9=4
BinaryOp Mul_384 2 1 940_splitncnn_0 947 948 0=2
BinaryOp Add_385 2 1 948 934_splitncnn_0 949
PReLU PRelu_386 1 1 949 951 0=48
Split splitncnn_46 1 2 951 951_splitncnn_0 951_splitncnn_1
Convolution Conv_387 1 1 951_splitncnn_1 953 0=48 1=5 4=2 5=1 6=57600
PReLU PRelu_389 1 1 953 955 0=48
Convolution Conv_390 1 1 955 957 0=48 1=3 4=1 5=1 6=20736
Split splitncnn_47 1 2 957 957_splitncnn_0 957_splitncnn_1
Pooling ReduceMean_393 1 1 957_splitncnn_1 959 0=1 4=1
InnerProduct Conv_394 1 1 959 962 0=16 2=768 9=2 -23310=1,2.671039e-01
InnerProduct Conv_396 1 1 962 964 0=48 2=768 9=4
BinaryOp Mul_398 2 1 957_splitncnn_0 964 965 0=2
BinaryOp Add_399 2 1 965 951_splitncnn_0 966
PReLU PRelu_400 1 1 966 968 0=48
Split splitncnn_48 1 2 968 968_splitncnn_0 968_splitncnn_1
Convolution Conv_401 1 1 968_splitncnn_1 970 0=48 1=5 4=2 5=1 6=57600
PReLU PRelu_403 1 1 970 972 0=48
Convolution Conv_404 1 1 972 974 0=48 1=3 4=1 5=1 6=20736
Split splitncnn_49 1 2 974 974_splitncnn_0 974_splitncnn_1
Pooling ReduceMean_407 1 1 974_splitncnn_1 976 0=1 4=1
InnerProduct Conv_408 1 1 976 979 0=16 2=768 9=2 -23310=1,1.908224e-01
InnerProduct Conv_410 1 1 979 981 0=48 2=768 9=4
BinaryOp Mul_412 2 1 974_splitncnn_0 981 982 0=2
BinaryOp Add_413 2 1 982 968_splitncnn_0 983
PReLU PRelu_414 1 1 983 985 0=48
Split splitncnn_50 1 2 985 985_splitncnn_0 985_splitncnn_1
Convolution Conv_415 1 1 985_splitncnn_1 987 0=48 1=5 4=2 5=1 6=57600
PReLU PRelu_417 1 1 987 989 0=48
Convolution Conv_418 1 1 989 991 0=48 1=3 4=1 5=1 6=20736
Split splitncnn_51 1 2 991 991_splitncnn_0 991_splitncnn_1
Pooling ReduceMean_421 1 1 991_splitncnn_1 993 0=1 4=1
InnerProduct Conv_422 1 1 993 996 0=16 2=768 9=2 -23310=1,6.525763e-01
InnerProduct Conv_424 1 1 996 998 0=48 2=768 9=4
BinaryOp Mul_426 2 1 991_splitncnn_0 998 999 0=2
BinaryOp Add_427 2 1 999 985_splitncnn_0 1000
PReLU PRelu_428 1 1 1000 1002 0=48
Split splitncnn_52 1 2 1002 1002_splitncnn_0 1002_splitncnn_1
Convolution Conv_429 1 1 1002_splitncnn_1 1004 0=48 1=5 4=2 5=1 6=57600
PReLU PRelu_431 1 1 1004 1006 0=48
Convolution Conv_432 1 1 1006 1008 0=48 1=3 4=1 5=1 6=20736
Split splitncnn_53 1 2 1008 1008_splitncnn_0 1008_splitncnn_1
Pooling ReduceMean_435 1 1 1008_splitncnn_1 1010 0=1 4=1
InnerProduct Conv_436 1 1 1010 1013 0=16 2=768 9=2 -23310=1,5.485489e-01
InnerProduct Conv_438 1 1 1013 1015 0=48 2=768 9=4
BinaryOp Mul_440 2 1 1008_splitncnn_0 1015 1016 0=2
BinaryOp Add_441 2 1 1016 1002_splitncnn_0 1017
PReLU PRelu_442 1 1 1017 1019 0=48
Convolution Conv_443 1 1 1019 1020 0=8 1=3 4=1 5=1 6=3456
PixelShuffle DepthToSpace_444 1 1 1020 1021 0=2
BinaryOp Add_445 2 1 582_splitncnn_0 734_splitncnn_0 1022
BinaryOp Add_446 2 1 1022 887_splitncnn_0 1023
BinaryOp Add_447 2 1 1023 1021 flow

BIN
models/rife/rife-HD/fusionnet.bin vendored Normal file

Binary file not shown.

105
models/rife/rife-HD/fusionnet.param vendored Normal file
View File

@ -0,0 +1,105 @@
7767517
103 120
Input img0 0 1 img0
Input img1 0 1 img1
Input flow 0 1 flow
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 flow 77 0=2 1=2.000000e+00 2=2.000000e+00
BinaryOp Mul_3 1 1 77 79 0=2 1=1 2=2.000000e+00
Split splitncnn_0 1 3 79 79_splitncnn_0 79_splitncnn_1 79_splitncnn_2
rife.Warp Warp_9 2 1 img0 79_splitncnn_2 85
Split splitncnn_1 1 2 85 85_splitncnn_0 85_splitncnn_1
UnaryOp Neg_10 1 1 79_splitncnn_1 86 0=1
rife.Warp Warp_16 2 1 img1 86 92
Split splitncnn_2 1 2 92 92_splitncnn_0 92_splitncnn_1
Concat Concat_17 3 1 85_splitncnn_1 92_splitncnn_1 79_splitncnn_0 93
Convolution Conv_18 1 1 93 94 0=32 1=3 3=2 4=1 5=1 6=2304
PReLU PRelu_19 1 1 94 96 0=32
Split splitncnn_3 1 2 96 96_splitncnn_0 96_splitncnn_1
Convolution Conv_20 1 1 96_splitncnn_1 97 0=64 1=3 3=2 4=1 6=18432
Convolution Conv_21 1 1 96_splitncnn_0 98 0=64 1=3 3=2 4=1 5=1 6=18432
PReLU PRelu_22 1 1 98 100 0=64
Convolution Conv_23 1 1 100 101 0=64 1=3 4=1 5=1 6=36864
Split splitncnn_4 1 2 101 101_splitncnn_0 101_splitncnn_1
Pooling ReduceMean_25 1 1 101_splitncnn_1 103 0=1 4=1
InnerProduct Conv_26 1 1 103 106 0=16 2=1024 9=2 -23310=1,1.541520e-01
InnerProduct Conv_28 1 1 106 108 0=64 2=1024 9=4
BinaryOp Mul_30 2 1 101_splitncnn_0 108 109 0=2
BinaryOp Add_31 2 1 109 97 110
PReLU PRelu_32 1 1 110 112 0=64
Split splitncnn_5 1 2 112 112_splitncnn_0 112_splitncnn_1
Concat Concat_33 3 1 112_splitncnn_1 3 7 113
Split splitncnn_6 1 2 113 113_splitncnn_0 113_splitncnn_1
Convolution Conv_34 1 1 113_splitncnn_1 114 0=128 1=3 3=2 4=1 6=147456
Convolution Conv_35 1 1 113_splitncnn_0 115 0=128 1=3 3=2 4=1 5=1 6=147456
PReLU PRelu_36 1 1 115 117 0=128
Convolution Conv_37 1 1 117 118 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_7 1 2 118 118_splitncnn_0 118_splitncnn_1
Pooling ReduceMean_39 1 1 118_splitncnn_1 120 0=1 4=1
InnerProduct Conv_40 1 1 120 123 0=16 2=2048 9=2 -23310=1,4.722085e-02
InnerProduct Conv_42 1 1 123 125 0=128 2=2048 9=4
BinaryOp Mul_44 2 1 118_splitncnn_0 125 126 0=2
BinaryOp Add_45 2 1 126 114 127
PReLU PRelu_46 1 1 127 129 0=128
Split splitncnn_8 1 2 129 129_splitncnn_0 129_splitncnn_1
Concat Concat_47 3 1 129_splitncnn_1 4 8 130
Split splitncnn_9 1 2 130 130_splitncnn_0 130_splitncnn_1
Convolution Conv_48 1 1 130_splitncnn_1 131 0=256 1=3 3=2 4=1 6=589824
Convolution Conv_49 1 1 130_splitncnn_0 132 0=256 1=3 3=2 4=1 5=1 6=589824
PReLU PRelu_50 1 1 132 134 0=256
Convolution Conv_51 1 1 134 135 0=256 1=3 4=1 5=1 6=589824
Split splitncnn_10 1 2 135 135_splitncnn_0 135_splitncnn_1
Pooling ReduceMean_53 1 1 135_splitncnn_1 137 0=1 4=1
InnerProduct Conv_54 1 1 137 140 0=16 2=4096 9=2 -23310=1,8.144739e-02
InnerProduct Conv_56 1 1 140 142 0=256 2=4096 9=4
BinaryOp Mul_58 2 1 135_splitncnn_0 142 143 0=2
BinaryOp Add_59 2 1 143 131 144
PReLU PRelu_60 1 1 144 146 0=256
Split splitncnn_11 1 2 146 146_splitncnn_0 146_splitncnn_1
Concat Concat_61 3 1 146_splitncnn_1 5 9 147
Split splitncnn_12 1 2 147 147_splitncnn_0 147_splitncnn_1
Convolution Conv_62 1 1 147_splitncnn_1 148 0=512 1=3 3=2 4=1 6=2359296
Convolution Conv_63 1 1 147_splitncnn_0 149 0=512 1=3 3=2 4=1 5=1 6=2359296
PReLU PRelu_64 1 1 149 151 0=512
Convolution Conv_65 1 1 151 152 0=512 1=3 4=1 5=1 6=2359296
Split splitncnn_13 1 2 152 152_splitncnn_0 152_splitncnn_1
Pooling ReduceMean_67 1 1 152_splitncnn_1 154 0=1 4=1
InnerProduct Conv_68 1 1 154 157 0=16 2=8192 9=2 -23310=1,7.700763e-02
InnerProduct Conv_70 1 1 157 159 0=512 2=8192 9=4
BinaryOp Mul_72 2 1 152_splitncnn_0 159 160 0=2
BinaryOp Add_73 2 1 160 148 161
PReLU PRelu_74 1 1 161 163 0=512
Concat Concat_75 3 1 163 6 10 164
Deconvolution ConvTranspose_76 1 1 164 165 0=256 1=4 3=2 4=1 5=1 6=4194304
PReLU PRelu_77 1 1 165 167 0=256
Concat Concat_78 2 1 167 146_splitncnn_0 168
Deconvolution ConvTranspose_79 1 1 168 169 0=128 1=4 3=2 4=1 5=1 6=1048576
PReLU PRelu_80 1 1 169 171 0=128
Concat Concat_81 2 1 171 129_splitncnn_0 172
Deconvolution ConvTranspose_82 1 1 172 173 0=64 1=4 3=2 4=1 5=1 6=262144
PReLU PRelu_83 1 1 173 175 0=64
Concat Concat_84 2 1 175 112_splitncnn_0 176
Deconvolution ConvTranspose_85 1 1 176 177 0=32 1=4 3=2 4=1 5=1 6=65536
PReLU PRelu_86 1 1 177 179 0=32
Convolution Conv_87 1 1 179 180 0=16 1=3 4=1 5=1 6=4608
PixelShuffle DepthToSpace_88 1 1 180 181 0=2
Sigmoid Sigmoid_89 1 1 181 182
Split splitncnn_14 1 2 182 182_splitncnn_0 182_splitncnn_1
Crop Slice_94 1 1 182_splitncnn_1 187 -23309=1,0 -23310=1,3 -23311=1,0
BinaryOp Mul_96 1 1 187 189 0=2 1=1 2=2.000000e+00
BinaryOp Sub_98 1 1 189 191 0=1 1=1 2=1.000000e+00
Crop Slice_103 1 1 182_splitncnn_0 196 -23309=1,3 -23310=1,4 -23311=1,0
Split splitncnn_15 1 2 196 196_splitncnn_0 196_splitncnn_1
BinaryOp Mul_104 2 1 85_splitncnn_0 196_splitncnn_1 197 0=2
BinaryOp Sub_106 1 1 196_splitncnn_0 199 0=7 1=1 2=1.000000e+00
BinaryOp Mul_107 2 1 92_splitncnn_0 199 200 0=2
BinaryOp Add_108 2 1 197 200 201
BinaryOp Add_109 2 1 201 191 202
Clip Clip_110 1 1 202 output 0=0.000000e+00 1=1.000000e+00

BIN
models/rife/rife-UHD/contextnet.bin vendored Normal file

Binary file not shown.

70
models/rife/rife-UHD/contextnet.param vendored Normal file
View File

@ -0,0 +1,70 @@
7767517
68 82
Input input.1 0 1 input.1
Input flow.1 0 1 flow.1
UnaryOp flow.0 1 1 flow.1 flow.0 0=1
Convolution Conv_0 1 1 input.1 45 0=32 1=3 3=2 4=1 5=1 6=864
PReLU PRelu_1 1 1 45 47 0=32
Split splitncnn_0 1 2 47 47_splitncnn_0 47_splitncnn_1
Convolution Conv_2 1 1 47_splitncnn_1 48 0=32 1=3 3=2 4=1 6=9216
Convolution Conv_3 1 1 47_splitncnn_0 49 0=32 1=3 3=2 4=1 5=1 6=9216
PReLU PRelu_4 1 1 49 51 0=32
Convolution Conv_5 1 1 51 52 0=32 1=3 4=1 5=1 6=9216
Split splitncnn_1 1 2 52 52_splitncnn_0 52_splitncnn_1
Pooling ReduceMean_7 1 1 52_splitncnn_1 54 0=1 4=1
InnerProduct Conv_8 1 1 54 57 0=16 2=512 9=2 -23310=1,1.143919e+00
InnerProduct Conv_10 1 1 57 59 0=32 2=512 9=4
BinaryOp Mul_12 2 1 52_splitncnn_0 59 60 0=2
BinaryOp Add_13 2 1 60 48 61
PReLU PRelu_14 1 1 61 63 0=32
Split splitncnn_2 1 3 63 63_splitncnn_0 63_splitncnn_1 63_splitncnn_2
Interp Resize_16 1 1 flow.0 73 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_18 1 1 73 75 0=2 1=1 2=5.000000e-01
Split splitncnn_3 1 2 75 75_splitncnn_0 75_splitncnn_1
rife.Warp Warp_24 2 1 63_splitncnn_2 75_splitncnn_1 f1
Convolution Conv_25 1 1 63_splitncnn_1 82 0=64 1=3 3=2 4=1 6=18432
Convolution Conv_26 1 1 63_splitncnn_0 83 0=64 1=3 3=2 4=1 5=1 6=18432
PReLU PRelu_27 1 1 83 85 0=64
Convolution Conv_28 1 1 85 86 0=64 1=3 4=1 5=1 6=36864
Split splitncnn_4 1 2 86 86_splitncnn_0 86_splitncnn_1
Pooling ReduceMean_30 1 1 86_splitncnn_1 88 0=1 4=1
InnerProduct Conv_31 1 1 88 91 0=16 2=1024 9=2 -23310=1,3.006833e-01
InnerProduct Conv_33 1 1 91 93 0=64 2=1024 9=4
BinaryOp Mul_35 2 1 86_splitncnn_0 93 94 0=2
BinaryOp Add_36 2 1 94 82 95
PReLU PRelu_37 1 1 95 97 0=64
Split splitncnn_5 1 3 97 97_splitncnn_0 97_splitncnn_1 97_splitncnn_2
Interp Resize_39 1 1 75_splitncnn_0 107 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_41 1 1 107 109 0=2 1=1 2=5.000000e-01
Split splitncnn_6 1 2 109 109_splitncnn_0 109_splitncnn_1
rife.Warp Warp_47 2 1 97_splitncnn_2 109_splitncnn_1 f2
Convolution Conv_48 1 1 97_splitncnn_1 116 0=128 1=3 3=2 4=1 6=73728
Convolution Conv_49 1 1 97_splitncnn_0 117 0=128 1=3 3=2 4=1 5=1 6=73728
PReLU PRelu_50 1 1 117 119 0=128
Convolution Conv_51 1 1 119 120 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_7 1 2 120 120_splitncnn_0 120_splitncnn_1
Pooling ReduceMean_53 1 1 120_splitncnn_1 122 0=1 4=1
InnerProduct Conv_54 1 1 122 125 0=16 2=2048 9=2 -23310=1,7.002444e-02
InnerProduct Conv_56 1 1 125 127 0=128 2=2048 9=4
BinaryOp Mul_58 2 1 120_splitncnn_0 127 128 0=2
BinaryOp Add_59 2 1 128 116 129
PReLU PRelu_60 1 1 129 131 0=128
Split splitncnn_8 1 3 131 131_splitncnn_0 131_splitncnn_1 131_splitncnn_2
Interp Resize_62 1 1 109_splitncnn_0 141 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_64 1 1 141 143 0=2 1=1 2=5.000000e-01
Split splitncnn_9 1 2 143 143_splitncnn_0 143_splitncnn_1
rife.Warp Warp_70 2 1 131_splitncnn_2 143_splitncnn_1 f3
Convolution Conv_71 1 1 131_splitncnn_1 150 0=256 1=3 3=2 4=1 6=294912
Convolution Conv_72 1 1 131_splitncnn_0 151 0=256 1=3 3=2 4=1 5=1 6=294912
PReLU PRelu_73 1 1 151 153 0=256
Convolution Conv_74 1 1 153 154 0=256 1=3 4=1 5=1 6=589824
Split splitncnn_10 1 2 154 154_splitncnn_0 154_splitncnn_1
Pooling ReduceMean_76 1 1 154_splitncnn_1 156 0=1 4=1
InnerProduct Conv_77 1 1 156 159 0=16 2=4096 9=2 -23310=1,6.568319e-02
InnerProduct Conv_79 1 1 159 161 0=256 2=4096 9=4
BinaryOp Mul_81 2 1 154_splitncnn_0 161 162 0=2
BinaryOp Add_82 2 1 162 150 163
PReLU PRelu_83 1 1 163 165 0=256
Interp Resize_85 1 1 143_splitncnn_0 175 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_87 1 1 175 177 0=2 1=1 2=5.000000e-01
rife.Warp Warp_93 2 1 165 177 f4

BIN
models/rife/rife-UHD/flownet.bin vendored Normal file

Binary file not shown.

322
models/rife/rife-UHD/flownet.param vendored Normal file
View File

@ -0,0 +1,322 @@
7767517
320 386
Input input0 0 1 input0
Input input1 0 1 input1
Concat input.1 2 1 input0 input1 input.1
Interp Resize_1 1 1 input.1 454 0=2 1=5.000000e-01 2=5.000000e-01
Split splitncnn_0 1 7 454 454_splitncnn_0 454_splitncnn_1 454_splitncnn_2 454_splitncnn_3 454_splitncnn_4 454_splitncnn_5 454_splitncnn_6
Interp Resize_3 1 1 454_splitncnn_6 464 0=2 1=1.250000e-01 2=1.250000e-01
Convolution Conv_4 1 1 464 466 0=192 1=5 3=2 4=2 5=1 6=28800
PReLU PRelu_6 1 1 466 468 0=192
Split splitncnn_1 1 2 468 468_splitncnn_0 468_splitncnn_1
Convolution Conv_7 1 1 468_splitncnn_1 470 0=192 1=5 4=2 5=1 6=921600
PReLU PRelu_9 1 1 470 472 0=192
Convolution Conv_10 1 1 472 474 0=192 1=3 4=1 5=1 6=331776
Split splitncnn_2 1 2 474 474_splitncnn_0 474_splitncnn_1
Pooling ReduceMean_13 1 1 474_splitncnn_1 476 0=1 4=1
InnerProduct Conv_14 1 1 476 479 0=16 2=3072 9=2 -23310=1,1.428942e-02
InnerProduct Conv_16 1 1 479 481 0=192 2=3072 9=4
BinaryOp Mul_18 2 1 474_splitncnn_0 481 482 0=2
BinaryOp Add_19 2 1 482 468_splitncnn_0 483
PReLU PRelu_20 1 1 483 485 0=192
Split splitncnn_3 1 2 485 485_splitncnn_0 485_splitncnn_1
Convolution Conv_21 1 1 485_splitncnn_1 487 0=192 1=5 4=2 5=1 6=921600
PReLU PRelu_23 1 1 487 489 0=192
Convolution Conv_24 1 1 489 491 0=192 1=3 4=1 5=1 6=331776
Split splitncnn_4 1 2 491 491_splitncnn_0 491_splitncnn_1
Pooling ReduceMean_27 1 1 491_splitncnn_1 493 0=1 4=1
InnerProduct Conv_28 1 1 493 496 0=16 2=3072 9=2 -23310=1,3.543398e-01
InnerProduct Conv_30 1 1 496 498 0=192 2=3072 9=4
BinaryOp Mul_32 2 1 491_splitncnn_0 498 499 0=2
BinaryOp Add_33 2 1 499 485_splitncnn_0 500
PReLU PRelu_34 1 1 500 502 0=192
Split splitncnn_5 1 2 502 502_splitncnn_0 502_splitncnn_1
Convolution Conv_35 1 1 502_splitncnn_1 504 0=192 1=5 4=2 5=1 6=921600
PReLU PRelu_37 1 1 504 506 0=192
Convolution Conv_38 1 1 506 508 0=192 1=3 4=1 5=1 6=331776
Split splitncnn_6 1 2 508 508_splitncnn_0 508_splitncnn_1
Pooling ReduceMean_41 1 1 508_splitncnn_1 510 0=1 4=1
InnerProduct Conv_42 1 1 510 513 0=16 2=3072 9=2 -23310=1,5.366787e-01
InnerProduct Conv_44 1 1 513 515 0=192 2=3072 9=4
BinaryOp Mul_46 2 1 508_splitncnn_0 515 516 0=2
BinaryOp Add_47 2 1 516 502_splitncnn_0 517
PReLU PRelu_48 1 1 517 519 0=192
Split splitncnn_7 1 2 519 519_splitncnn_0 519_splitncnn_1
Convolution Conv_49 1 1 519_splitncnn_1 521 0=192 1=5 4=2 5=1 6=921600
PReLU PRelu_51 1 1 521 523 0=192
Convolution Conv_52 1 1 523 525 0=192 1=3 4=1 5=1 6=331776
Split splitncnn_8 1 2 525 525_splitncnn_0 525_splitncnn_1
Pooling ReduceMean_55 1 1 525_splitncnn_1 527 0=1 4=1
InnerProduct Conv_56 1 1 527 530 0=16 2=3072 9=2 -23310=1,-4.889974e-03
InnerProduct Conv_58 1 1 530 532 0=192 2=3072 9=4
BinaryOp Mul_60 2 1 525_splitncnn_0 532 533 0=2
BinaryOp Add_61 2 1 533 519_splitncnn_0 534
PReLU PRelu_62 1 1 534 536 0=192
Split splitncnn_9 1 2 536 536_splitncnn_0 536_splitncnn_1
Convolution Conv_63 1 1 536_splitncnn_1 538 0=192 1=5 4=2 5=1 6=921600
PReLU PRelu_65 1 1 538 540 0=192
Convolution Conv_66 1 1 540 542 0=192 1=3 4=1 5=1 6=331776
Split splitncnn_10 1 2 542 542_splitncnn_0 542_splitncnn_1
Pooling ReduceMean_69 1 1 542_splitncnn_1 544 0=1 4=1
InnerProduct Conv_70 1 1 544 547 0=16 2=3072 9=2 -23310=1,-1.182169e-02
InnerProduct Conv_72 1 1 547 549 0=192 2=3072 9=4
BinaryOp Mul_74 2 1 542_splitncnn_0 549 550 0=2
BinaryOp Add_75 2 1 550 536_splitncnn_0 551
PReLU PRelu_76 1 1 551 553 0=192
Split splitncnn_11 1 2 553 553_splitncnn_0 553_splitncnn_1
Convolution Conv_77 1 1 553_splitncnn_1 555 0=192 1=5 4=2 5=1 6=921600
PReLU PRelu_79 1 1 555 557 0=192
Convolution Conv_80 1 1 557 559 0=192 1=3 4=1 5=1 6=331776
Split splitncnn_12 1 2 559 559_splitncnn_0 559_splitncnn_1
Pooling ReduceMean_83 1 1 559_splitncnn_1 561 0=1 4=1
InnerProduct Conv_84 1 1 561 564 0=16 2=3072 9=2 -23310=1,2.179182e-01
InnerProduct Conv_86 1 1 564 566 0=192 2=3072 9=4
BinaryOp Mul_88 2 1 559_splitncnn_0 566 567 0=2
BinaryOp Add_89 2 1 567 553_splitncnn_0 568
PReLU PRelu_90 1 1 568 570 0=192
Convolution Conv_91 1 1 570 571 0=8 1=3 4=1 5=1 6=13824
PixelShuffle DepthToSpace_92 1 1 571 572 0=2
Interp Resize_94 1 1 572 582 0=2 1=8.000000e+00 2=8.000000e+00
Split splitncnn_13 1 6 582 582_splitncnn_0 582_splitncnn_1 582_splitncnn_2 582_splitncnn_3 582_splitncnn_4 582_splitncnn_5
Crop Slice_99 1 1 454_splitncnn_5 587 -23309=1,0 -23310=1,3 -23311=1,0
rife.Warp Warp_105 2 1 587 582_splitncnn_5 593
Crop Slice_110 1 1 454_splitncnn_4 598 -23309=1,3 -23310=1,2147483647 -23311=1,0
UnaryOp Neg_111 1 1 582_splitncnn_4 599 0=1
rife.Warp Warp_117 2 1 598 599 605
Concat Concat_118 3 1 593 605 582_splitncnn_3 606
Interp Resize_120 1 1 606 616 0=2 1=2.500000e-01 2=2.500000e-01
Convolution Conv_121 1 1 616 618 0=128 1=5 3=2 4=2 5=1 6=25600
PReLU PRelu_123 1 1 618 620 0=128
Split splitncnn_14 1 2 620 620_splitncnn_0 620_splitncnn_1
Convolution Conv_124 1 1 620_splitncnn_1 622 0=128 1=5 4=2 5=1 6=409600
PReLU PRelu_126 1 1 622 624 0=128
Convolution Conv_127 1 1 624 626 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_15 1 2 626 626_splitncnn_0 626_splitncnn_1
Pooling ReduceMean_130 1 1 626_splitncnn_1 628 0=1 4=1
InnerProduct Conv_131 1 1 628 631 0=16 2=2048 9=2 -23310=1,-3.599843e-03
InnerProduct Conv_133 1 1 631 633 0=128 2=2048 9=4
BinaryOp Mul_135 2 1 626_splitncnn_0 633 634 0=2
BinaryOp Add_136 2 1 634 620_splitncnn_0 635
PReLU PRelu_137 1 1 635 637 0=128
Split splitncnn_16 1 2 637 637_splitncnn_0 637_splitncnn_1
Convolution Conv_138 1 1 637_splitncnn_1 639 0=128 1=5 4=2 5=1 6=409600
PReLU PRelu_140 1 1 639 641 0=128
Convolution Conv_141 1 1 641 643 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_17 1 2 643 643_splitncnn_0 643_splitncnn_1
Pooling ReduceMean_144 1 1 643_splitncnn_1 645 0=1 4=1
InnerProduct Conv_145 1 1 645 648 0=16 2=2048 9=2 -23310=1,2.117399e-01
InnerProduct Conv_147 1 1 648 650 0=128 2=2048 9=4
BinaryOp Mul_149 2 1 643_splitncnn_0 650 651 0=2
BinaryOp Add_150 2 1 651 637_splitncnn_0 652
PReLU PRelu_151 1 1 652 654 0=128
Split splitncnn_18 1 2 654 654_splitncnn_0 654_splitncnn_1
Convolution Conv_152 1 1 654_splitncnn_1 656 0=128 1=5 4=2 5=1 6=409600
PReLU PRelu_154 1 1 656 658 0=128
Convolution Conv_155 1 1 658 660 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_19 1 2 660 660_splitncnn_0 660_splitncnn_1
Pooling ReduceMean_158 1 1 660_splitncnn_1 662 0=1 4=1
InnerProduct Conv_159 1 1 662 665 0=16 2=2048 9=2 -23310=1,2.712289e-01
InnerProduct Conv_161 1 1 665 667 0=128 2=2048 9=4
BinaryOp Mul_163 2 1 660_splitncnn_0 667 668 0=2
BinaryOp Add_164 2 1 668 654_splitncnn_0 669
PReLU PRelu_165 1 1 669 671 0=128
Split splitncnn_20 1 2 671 671_splitncnn_0 671_splitncnn_1
Convolution Conv_166 1 1 671_splitncnn_1 673 0=128 1=5 4=2 5=1 6=409600
PReLU PRelu_168 1 1 673 675 0=128
Convolution Conv_169 1 1 675 677 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_21 1 2 677 677_splitncnn_0 677_splitncnn_1
Pooling ReduceMean_172 1 1 677_splitncnn_1 679 0=1 4=1
InnerProduct Conv_173 1 1 679 682 0=16 2=2048 9=2 -23310=1,8.141350e-02
InnerProduct Conv_175 1 1 682 684 0=128 2=2048 9=4
BinaryOp Mul_177 2 1 677_splitncnn_0 684 685 0=2
BinaryOp Add_178 2 1 685 671_splitncnn_0 686
PReLU PRelu_179 1 1 686 688 0=128
Split splitncnn_22 1 2 688 688_splitncnn_0 688_splitncnn_1
Convolution Conv_180 1 1 688_splitncnn_1 690 0=128 1=5 4=2 5=1 6=409600
PReLU PRelu_182 1 1 690 692 0=128
Convolution Conv_183 1 1 692 694 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_23 1 2 694 694_splitncnn_0 694_splitncnn_1
Pooling ReduceMean_186 1 1 694_splitncnn_1 696 0=1 4=1
InnerProduct Conv_187 1 1 696 699 0=16 2=2048 9=2 -23310=1,4.956326e-02
InnerProduct Conv_189 1 1 699 701 0=128 2=2048 9=4
BinaryOp Mul_191 2 1 694_splitncnn_0 701 702 0=2
BinaryOp Add_192 2 1 702 688_splitncnn_0 703
PReLU PRelu_193 1 1 703 705 0=128
Split splitncnn_24 1 2 705 705_splitncnn_0 705_splitncnn_1
Convolution Conv_194 1 1 705_splitncnn_1 707 0=128 1=5 4=2 5=1 6=409600
PReLU PRelu_196 1 1 707 709 0=128
Convolution Conv_197 1 1 709 711 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_25 1 2 711 711_splitncnn_0 711_splitncnn_1
Pooling ReduceMean_200 1 1 711_splitncnn_1 713 0=1 4=1
InnerProduct Conv_201 1 1 713 716 0=16 2=2048 9=2 -23310=1,1.553750e-01
InnerProduct Conv_203 1 1 716 718 0=128 2=2048 9=4
BinaryOp Mul_205 2 1 711_splitncnn_0 718 719 0=2
BinaryOp Add_206 2 1 719 705_splitncnn_0 720
PReLU PRelu_207 1 1 720 722 0=128
Convolution Conv_208 1 1 722 723 0=8 1=3 4=1 5=1 6=9216
PixelShuffle DepthToSpace_209 1 1 723 724 0=2
Interp Resize_211 1 1 724 734 0=2 1=4.000000e+00 2=4.000000e+00
Split splitncnn_26 1 3 734 734_splitncnn_0 734_splitncnn_1 734_splitncnn_2
BinaryOp Add_212 2 1 582_splitncnn_2 734_splitncnn_2 735
Split splitncnn_27 1 3 735 735_splitncnn_0 735_splitncnn_1 735_splitncnn_2
Crop Slice_217 1 1 454_splitncnn_3 740 -23309=1,0 -23310=1,3 -23311=1,0
rife.Warp Warp_223 2 1 740 735_splitncnn_2 746
Crop Slice_228 1 1 454_splitncnn_2 751 -23309=1,3 -23310=1,2147483647 -23311=1,0
UnaryOp Neg_229 1 1 735_splitncnn_1 752 0=1
rife.Warp Warp_235 2 1 751 752 758
Concat Concat_236 3 1 746 758 735_splitncnn_0 759
Interp Resize_238 1 1 759 769 0=2 1=5.000000e-01 2=5.000000e-01
Convolution Conv_239 1 1 769 771 0=96 1=5 3=2 4=2 5=1 6=19200
PReLU PRelu_241 1 1 771 773 0=96
Split splitncnn_28 1 2 773 773_splitncnn_0 773_splitncnn_1
Convolution Conv_242 1 1 773_splitncnn_1 775 0=96 1=5 4=2 5=1 6=230400
PReLU PRelu_244 1 1 775 777 0=96
Convolution Conv_245 1 1 777 779 0=96 1=3 4=1 5=1 6=82944
Split splitncnn_29 1 2 779 779_splitncnn_0 779_splitncnn_1
Pooling ReduceMean_248 1 1 779_splitncnn_1 781 0=1 4=1
InnerProduct Conv_249 1 1 781 784 0=16 2=1536 9=2 -23310=1,1.670981e-03
InnerProduct Conv_251 1 1 784 786 0=96 2=1536 9=4
BinaryOp Mul_253 2 1 779_splitncnn_0 786 787 0=2
BinaryOp Add_254 2 1 787 773_splitncnn_0 788
PReLU PRelu_255 1 1 788 790 0=96
Split splitncnn_30 1 2 790 790_splitncnn_0 790_splitncnn_1
Convolution Conv_256 1 1 790_splitncnn_1 792 0=96 1=5 4=2 5=1 6=230400
PReLU PRelu_258 1 1 792 794 0=96
Convolution Conv_259 1 1 794 796 0=96 1=3 4=1 5=1 6=82944
Split splitncnn_31 1 2 796 796_splitncnn_0 796_splitncnn_1
Pooling ReduceMean_262 1 1 796_splitncnn_1 798 0=1 4=1
InnerProduct Conv_263 1 1 798 801 0=16 2=1536 9=2 -23310=1,3.868800e-01
InnerProduct Conv_265 1 1 801 803 0=96 2=1536 9=4
BinaryOp Mul_267 2 1 796_splitncnn_0 803 804 0=2
BinaryOp Add_268 2 1 804 790_splitncnn_0 805
PReLU PRelu_269 1 1 805 807 0=96
Split splitncnn_32 1 2 807 807_splitncnn_0 807_splitncnn_1
Convolution Conv_270 1 1 807_splitncnn_1 809 0=96 1=5 4=2 5=1 6=230400
PReLU PRelu_272 1 1 809 811 0=96
Convolution Conv_273 1 1 811 813 0=96 1=3 4=1 5=1 6=82944
Split splitncnn_33 1 2 813 813_splitncnn_0 813_splitncnn_1
Pooling ReduceMean_276 1 1 813_splitncnn_1 815 0=1 4=1
InnerProduct Conv_277 1 1 815 818 0=16 2=1536 9=2 -23310=1,3.475277e-01
InnerProduct Conv_279 1 1 818 820 0=96 2=1536 9=4
BinaryOp Mul_281 2 1 813_splitncnn_0 820 821 0=2
BinaryOp Add_282 2 1 821 807_splitncnn_0 822
PReLU PRelu_283 1 1 822 824 0=96
Split splitncnn_34 1 2 824 824_splitncnn_0 824_splitncnn_1
Convolution Conv_284 1 1 824_splitncnn_1 826 0=96 1=5 4=2 5=1 6=230400
PReLU PRelu_286 1 1 826 828 0=96
Convolution Conv_287 1 1 828 830 0=96 1=3 4=1 5=1 6=82944
Split splitncnn_35 1 2 830 830_splitncnn_0 830_splitncnn_1
Pooling ReduceMean_290 1 1 830_splitncnn_1 832 0=1 4=1
InnerProduct Conv_291 1 1 832 835 0=16 2=1536 9=2 -23310=1,7.044167e-02
InnerProduct Conv_293 1 1 835 837 0=96 2=1536 9=4
BinaryOp Mul_295 2 1 830_splitncnn_0 837 838 0=2
BinaryOp Add_296 2 1 838 824_splitncnn_0 839
PReLU PRelu_297 1 1 839 841 0=96
Split splitncnn_36 1 2 841 841_splitncnn_0 841_splitncnn_1
Convolution Conv_298 1 1 841_splitncnn_1 843 0=96 1=5 4=2 5=1 6=230400
PReLU PRelu_300 1 1 843 845 0=96
Convolution Conv_301 1 1 845 847 0=96 1=3 4=1 5=1 6=82944
Split splitncnn_37 1 2 847 847_splitncnn_0 847_splitncnn_1
Pooling ReduceMean_304 1 1 847_splitncnn_1 849 0=1 4=1
InnerProduct Conv_305 1 1 849 852 0=16 2=1536 9=2 -23310=1,1.834324e-01
InnerProduct Conv_307 1 1 852 854 0=96 2=1536 9=4
BinaryOp Mul_309 2 1 847_splitncnn_0 854 855 0=2
BinaryOp Add_310 2 1 855 841_splitncnn_0 856
PReLU PRelu_311 1 1 856 858 0=96
Split splitncnn_38 1 2 858 858_splitncnn_0 858_splitncnn_1
Convolution Conv_312 1 1 858_splitncnn_1 860 0=96 1=5 4=2 5=1 6=230400
PReLU PRelu_314 1 1 860 862 0=96
Convolution Conv_315 1 1 862 864 0=96 1=3 4=1 5=1 6=82944
Split splitncnn_39 1 2 864 864_splitncnn_0 864_splitncnn_1
Pooling ReduceMean_318 1 1 864_splitncnn_1 866 0=1 4=1
InnerProduct Conv_319 1 1 866 869 0=16 2=1536 9=2 -23310=1,3.572731e-01
InnerProduct Conv_321 1 1 869 871 0=96 2=1536 9=4
BinaryOp Mul_323 2 1 864_splitncnn_0 871 872 0=2
BinaryOp Add_324 2 1 872 858_splitncnn_0 873
PReLU PRelu_325 1 1 873 875 0=96
Convolution Conv_326 1 1 875 876 0=8 1=3 4=1 5=1 6=6912
PixelShuffle DepthToSpace_327 1 1 876 877 0=2
Interp Resize_329 1 1 877 887 0=2 1=2.000000e+00 2=2.000000e+00
Split splitncnn_40 1 2 887 887_splitncnn_0 887_splitncnn_1
BinaryOp Add_330 2 1 582_splitncnn_1 734_splitncnn_1 888
BinaryOp Add_331 2 1 888 887_splitncnn_1 889
Split splitncnn_41 1 3 889 889_splitncnn_0 889_splitncnn_1 889_splitncnn_2
Crop Slice_336 1 1 454_splitncnn_1 894 -23309=1,0 -23310=1,3 -23311=1,0
rife.Warp Warp_342 2 1 894 889_splitncnn_2 900
Crop Slice_347 1 1 454_splitncnn_0 905 -23309=1,3 -23310=1,2147483647 -23311=1,0
UnaryOp Neg_348 1 1 889_splitncnn_1 906 0=1
rife.Warp Warp_354 2 1 905 906 912
Concat Concat_355 3 1 900 912 889_splitncnn_0 913
Convolution Conv_356 1 1 913 915 0=48 1=5 3=2 4=2 5=1 6=9600
PReLU PRelu_358 1 1 915 917 0=48
Split splitncnn_42 1 2 917 917_splitncnn_0 917_splitncnn_1
Convolution Conv_359 1 1 917_splitncnn_1 919 0=48 1=5 4=2 5=1 6=57600
PReLU PRelu_361 1 1 919 921 0=48
Convolution Conv_362 1 1 921 923 0=48 1=3 4=1 5=1 6=20736
Split splitncnn_43 1 2 923 923_splitncnn_0 923_splitncnn_1
Pooling ReduceMean_365 1 1 923_splitncnn_1 925 0=1 4=1
InnerProduct Conv_366 1 1 925 928 0=16 2=768 9=2 -23310=1,2.075541e-02
InnerProduct Conv_368 1 1 928 930 0=48 2=768 9=4
BinaryOp Mul_370 2 1 923_splitncnn_0 930 931 0=2
BinaryOp Add_371 2 1 931 917_splitncnn_0 932
PReLU PRelu_372 1 1 932 934 0=48
Split splitncnn_44 1 2 934 934_splitncnn_0 934_splitncnn_1
Convolution Conv_373 1 1 934_splitncnn_1 936 0=48 1=5 4=2 5=1 6=57600
PReLU PRelu_375 1 1 936 938 0=48
Convolution Conv_376 1 1 938 940 0=48 1=3 4=1 5=1 6=20736
Split splitncnn_45 1 2 940 940_splitncnn_0 940_splitncnn_1
Pooling ReduceMean_379 1 1 940_splitncnn_1 942 0=1 4=1
InnerProduct Conv_380 1 1 942 945 0=16 2=768 9=2 -23310=1,7.201483e-01
InnerProduct Conv_382 1 1 945 947 0=48 2=768 9=4
BinaryOp Mul_384 2 1 940_splitncnn_0 947 948 0=2
BinaryOp Add_385 2 1 948 934_splitncnn_0 949
PReLU PRelu_386 1 1 949 951 0=48
Split splitncnn_46 1 2 951 951_splitncnn_0 951_splitncnn_1
Convolution Conv_387 1 1 951_splitncnn_1 953 0=48 1=5 4=2 5=1 6=57600
PReLU PRelu_389 1 1 953 955 0=48
Convolution Conv_390 1 1 955 957 0=48 1=3 4=1 5=1 6=20736
Split splitncnn_47 1 2 957 957_splitncnn_0 957_splitncnn_1
Pooling ReduceMean_393 1 1 957_splitncnn_1 959 0=1 4=1
InnerProduct Conv_394 1 1 959 962 0=16 2=768 9=2 -23310=1,2.671039e-01
InnerProduct Conv_396 1 1 962 964 0=48 2=768 9=4
BinaryOp Mul_398 2 1 957_splitncnn_0 964 965 0=2
BinaryOp Add_399 2 1 965 951_splitncnn_0 966
PReLU PRelu_400 1 1 966 968 0=48
Split splitncnn_48 1 2 968 968_splitncnn_0 968_splitncnn_1
Convolution Conv_401 1 1 968_splitncnn_1 970 0=48 1=5 4=2 5=1 6=57600
PReLU PRelu_403 1 1 970 972 0=48
Convolution Conv_404 1 1 972 974 0=48 1=3 4=1 5=1 6=20736
Split splitncnn_49 1 2 974 974_splitncnn_0 974_splitncnn_1
Pooling ReduceMean_407 1 1 974_splitncnn_1 976 0=1 4=1
InnerProduct Conv_408 1 1 976 979 0=16 2=768 9=2 -23310=1,1.908224e-01
InnerProduct Conv_410 1 1 979 981 0=48 2=768 9=4
BinaryOp Mul_412 2 1 974_splitncnn_0 981 982 0=2
BinaryOp Add_413 2 1 982 968_splitncnn_0 983
PReLU PRelu_414 1 1 983 985 0=48
Split splitncnn_50 1 2 985 985_splitncnn_0 985_splitncnn_1
Convolution Conv_415 1 1 985_splitncnn_1 987 0=48 1=5 4=2 5=1 6=57600
PReLU PRelu_417 1 1 987 989 0=48
Convolution Conv_418 1 1 989 991 0=48 1=3 4=1 5=1 6=20736
Split splitncnn_51 1 2 991 991_splitncnn_0 991_splitncnn_1
Pooling ReduceMean_421 1 1 991_splitncnn_1 993 0=1 4=1
InnerProduct Conv_422 1 1 993 996 0=16 2=768 9=2 -23310=1,6.525763e-01
InnerProduct Conv_424 1 1 996 998 0=48 2=768 9=4
BinaryOp Mul_426 2 1 991_splitncnn_0 998 999 0=2
BinaryOp Add_427 2 1 999 985_splitncnn_0 1000
PReLU PRelu_428 1 1 1000 1002 0=48
Split splitncnn_52 1 2 1002 1002_splitncnn_0 1002_splitncnn_1
Convolution Conv_429 1 1 1002_splitncnn_1 1004 0=48 1=5 4=2 5=1 6=57600
PReLU PRelu_431 1 1 1004 1006 0=48
Convolution Conv_432 1 1 1006 1008 0=48 1=3 4=1 5=1 6=20736
Split splitncnn_53 1 2 1008 1008_splitncnn_0 1008_splitncnn_1
Pooling ReduceMean_435 1 1 1008_splitncnn_1 1010 0=1 4=1
InnerProduct Conv_436 1 1 1010 1013 0=16 2=768 9=2 -23310=1,5.485489e-01
InnerProduct Conv_438 1 1 1013 1015 0=48 2=768 9=4
BinaryOp Mul_440 2 1 1008_splitncnn_0 1015 1016 0=2
BinaryOp Add_441 2 1 1016 1002_splitncnn_0 1017
PReLU PRelu_442 1 1 1017 1019 0=48
Convolution Conv_443 1 1 1019 1020 0=8 1=3 4=1 5=1 6=3456
PixelShuffle DepthToSpace_444 1 1 1020 1021 0=2
BinaryOp Add_445 2 1 582_splitncnn_0 734_splitncnn_0 1022
BinaryOp Add_446 2 1 1022 887_splitncnn_0 1023
BinaryOp Add_447 2 1 1023 1021 flow

BIN
models/rife/rife-UHD/fusionnet.bin vendored Normal file

Binary file not shown.

105
models/rife/rife-UHD/fusionnet.param vendored Normal file
View File

@ -0,0 +1,105 @@
7767517
103 120
Input img0 0 1 img0
Input img1 0 1 img1
Input flow 0 1 flow
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 flow 77 0=2 1=2.000000e+00 2=2.000000e+00
BinaryOp Mul_3 1 1 77 79 0=2 1=1 2=2.000000e+00
Split splitncnn_0 1 3 79 79_splitncnn_0 79_splitncnn_1 79_splitncnn_2
rife.Warp Warp_9 2 1 img0 79_splitncnn_2 85
Split splitncnn_1 1 2 85 85_splitncnn_0 85_splitncnn_1
UnaryOp Neg_10 1 1 79_splitncnn_1 86 0=1
rife.Warp Warp_16 2 1 img1 86 92
Split splitncnn_2 1 2 92 92_splitncnn_0 92_splitncnn_1
Concat Concat_17 3 1 85_splitncnn_1 92_splitncnn_1 79_splitncnn_0 93
Convolution Conv_18 1 1 93 94 0=32 1=3 3=2 4=1 5=1 6=2304
PReLU PRelu_19 1 1 94 96 0=32
Split splitncnn_3 1 2 96 96_splitncnn_0 96_splitncnn_1
Convolution Conv_20 1 1 96_splitncnn_1 97 0=64 1=3 3=2 4=1 6=18432
Convolution Conv_21 1 1 96_splitncnn_0 98 0=64 1=3 3=2 4=1 5=1 6=18432
PReLU PRelu_22 1 1 98 100 0=64
Convolution Conv_23 1 1 100 101 0=64 1=3 4=1 5=1 6=36864
Split splitncnn_4 1 2 101 101_splitncnn_0 101_splitncnn_1
Pooling ReduceMean_25 1 1 101_splitncnn_1 103 0=1 4=1
InnerProduct Conv_26 1 1 103 106 0=16 2=1024 9=2 -23310=1,1.541520e-01
InnerProduct Conv_28 1 1 106 108 0=64 2=1024 9=4
BinaryOp Mul_30 2 1 101_splitncnn_0 108 109 0=2
BinaryOp Add_31 2 1 109 97 110
PReLU PRelu_32 1 1 110 112 0=64
Split splitncnn_5 1 2 112 112_splitncnn_0 112_splitncnn_1
Concat Concat_33 3 1 112_splitncnn_1 3 7 113
Split splitncnn_6 1 2 113 113_splitncnn_0 113_splitncnn_1
Convolution Conv_34 1 1 113_splitncnn_1 114 0=128 1=3 3=2 4=1 6=147456
Convolution Conv_35 1 1 113_splitncnn_0 115 0=128 1=3 3=2 4=1 5=1 6=147456
PReLU PRelu_36 1 1 115 117 0=128
Convolution Conv_37 1 1 117 118 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_7 1 2 118 118_splitncnn_0 118_splitncnn_1
Pooling ReduceMean_39 1 1 118_splitncnn_1 120 0=1 4=1
InnerProduct Conv_40 1 1 120 123 0=16 2=2048 9=2 -23310=1,4.722085e-02
InnerProduct Conv_42 1 1 123 125 0=128 2=2048 9=4
BinaryOp Mul_44 2 1 118_splitncnn_0 125 126 0=2
BinaryOp Add_45 2 1 126 114 127
PReLU PRelu_46 1 1 127 129 0=128
Split splitncnn_8 1 2 129 129_splitncnn_0 129_splitncnn_1
Concat Concat_47 3 1 129_splitncnn_1 4 8 130
Split splitncnn_9 1 2 130 130_splitncnn_0 130_splitncnn_1
Convolution Conv_48 1 1 130_splitncnn_1 131 0=256 1=3 3=2 4=1 6=589824
Convolution Conv_49 1 1 130_splitncnn_0 132 0=256 1=3 3=2 4=1 5=1 6=589824
PReLU PRelu_50 1 1 132 134 0=256
Convolution Conv_51 1 1 134 135 0=256 1=3 4=1 5=1 6=589824
Split splitncnn_10 1 2 135 135_splitncnn_0 135_splitncnn_1
Pooling ReduceMean_53 1 1 135_splitncnn_1 137 0=1 4=1
InnerProduct Conv_54 1 1 137 140 0=16 2=4096 9=2 -23310=1,8.144739e-02
InnerProduct Conv_56 1 1 140 142 0=256 2=4096 9=4
BinaryOp Mul_58 2 1 135_splitncnn_0 142 143 0=2
BinaryOp Add_59 2 1 143 131 144
PReLU PRelu_60 1 1 144 146 0=256
Split splitncnn_11 1 2 146 146_splitncnn_0 146_splitncnn_1
Concat Concat_61 3 1 146_splitncnn_1 5 9 147
Split splitncnn_12 1 2 147 147_splitncnn_0 147_splitncnn_1
Convolution Conv_62 1 1 147_splitncnn_1 148 0=512 1=3 3=2 4=1 6=2359296
Convolution Conv_63 1 1 147_splitncnn_0 149 0=512 1=3 3=2 4=1 5=1 6=2359296
PReLU PRelu_64 1 1 149 151 0=512
Convolution Conv_65 1 1 151 152 0=512 1=3 4=1 5=1 6=2359296
Split splitncnn_13 1 2 152 152_splitncnn_0 152_splitncnn_1
Pooling ReduceMean_67 1 1 152_splitncnn_1 154 0=1 4=1
InnerProduct Conv_68 1 1 154 157 0=16 2=8192 9=2 -23310=1,7.700763e-02
InnerProduct Conv_70 1 1 157 159 0=512 2=8192 9=4
BinaryOp Mul_72 2 1 152_splitncnn_0 159 160 0=2
BinaryOp Add_73 2 1 160 148 161
PReLU PRelu_74 1 1 161 163 0=512
Concat Concat_75 3 1 163 6 10 164
Deconvolution ConvTranspose_76 1 1 164 165 0=256 1=4 3=2 4=1 5=1 6=4194304
PReLU PRelu_77 1 1 165 167 0=256
Concat Concat_78 2 1 167 146_splitncnn_0 168
Deconvolution ConvTranspose_79 1 1 168 169 0=128 1=4 3=2 4=1 5=1 6=1048576
PReLU PRelu_80 1 1 169 171 0=128
Concat Concat_81 2 1 171 129_splitncnn_0 172
Deconvolution ConvTranspose_82 1 1 172 173 0=64 1=4 3=2 4=1 5=1 6=262144
PReLU PRelu_83 1 1 173 175 0=64
Concat Concat_84 2 1 175 112_splitncnn_0 176
Deconvolution ConvTranspose_85 1 1 176 177 0=32 1=4 3=2 4=1 5=1 6=65536
PReLU PRelu_86 1 1 177 179 0=32
Convolution Conv_87 1 1 179 180 0=16 1=3 4=1 5=1 6=4608
PixelShuffle DepthToSpace_88 1 1 180 181 0=2
Sigmoid Sigmoid_89 1 1 181 182
Split splitncnn_14 1 2 182 182_splitncnn_0 182_splitncnn_1
Crop Slice_94 1 1 182_splitncnn_1 187 -23309=1,0 -23310=1,3 -23311=1,0
BinaryOp Mul_96 1 1 187 189 0=2 1=1 2=2.000000e+00
BinaryOp Sub_98 1 1 189 191 0=1 1=1 2=1.000000e+00
Crop Slice_103 1 1 182_splitncnn_0 196 -23309=1,3 -23310=1,4 -23311=1,0
Split splitncnn_15 1 2 196 196_splitncnn_0 196_splitncnn_1
BinaryOp Mul_104 2 1 85_splitncnn_0 196_splitncnn_1 197 0=2
BinaryOp Sub_106 1 1 196_splitncnn_0 199 0=7 1=1 2=1.000000e+00
BinaryOp Mul_107 2 1 92_splitncnn_0 199 200 0=2
BinaryOp Add_108 2 1 197 200 201
BinaryOp Add_109 2 1 201 191 202
Clip Clip_110 1 1 202 output 0=0.000000e+00 1=1.000000e+00

BIN
models/rife/rife-anime/contextnet.bin vendored Normal file

Binary file not shown.

70
models/rife/rife-anime/contextnet.param vendored Normal file
View File

@ -0,0 +1,70 @@
7767517
68 82
Input input.1 0 1 input.1
Input flow.1 0 1 flow.1
UnaryOp flow.0 1 1 flow.1 flow.0 0=1
Convolution Conv_0 1 1 input.1 45 0=32 1=3 3=2 4=1 5=1 6=864
PReLU PRelu_1 1 1 45 47 0=32
Split splitncnn_0 1 2 47 47_splitncnn_0 47_splitncnn_1
Convolution Conv_2 1 1 47_splitncnn_1 48 0=32 1=3 3=2 4=1 6=9216
Convolution Conv_3 1 1 47_splitncnn_0 49 0=32 1=3 3=2 4=1 5=1 6=9216
PReLU PRelu_4 1 1 49 51 0=32
Convolution Conv_5 1 1 51 52 0=32 1=3 4=1 5=1 6=9216
Split splitncnn_1 1 2 52 52_splitncnn_0 52_splitncnn_1
Pooling ReduceMean_7 1 1 52_splitncnn_1 54 0=1 4=1
InnerProduct Conv_8 1 1 54 57 0=16 2=512 9=2 -23310=1,1.143919e+00
InnerProduct Conv_10 1 1 57 59 0=32 2=512 9=4
BinaryOp Mul_12 2 1 52_splitncnn_0 59 60 0=2
BinaryOp Add_13 2 1 60 48 61
PReLU PRelu_14 1 1 61 63 0=32
Split splitncnn_2 1 3 63 63_splitncnn_0 63_splitncnn_1 63_splitncnn_2
Interp Resize_16 1 1 flow.0 73 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_18 1 1 73 75 0=2 1=1 2=5.000000e-01
Split splitncnn_3 1 2 75 75_splitncnn_0 75_splitncnn_1
rife.Warp Warp_24 2 1 63_splitncnn_2 75_splitncnn_1 f1
Convolution Conv_25 1 1 63_splitncnn_1 82 0=64 1=3 3=2 4=1 6=18432
Convolution Conv_26 1 1 63_splitncnn_0 83 0=64 1=3 3=2 4=1 5=1 6=18432
PReLU PRelu_27 1 1 83 85 0=64
Convolution Conv_28 1 1 85 86 0=64 1=3 4=1 5=1 6=36864
Split splitncnn_4 1 2 86 86_splitncnn_0 86_splitncnn_1
Pooling ReduceMean_30 1 1 86_splitncnn_1 88 0=1 4=1
InnerProduct Conv_31 1 1 88 91 0=16 2=1024 9=2 -23310=1,3.006833e-01
InnerProduct Conv_33 1 1 91 93 0=64 2=1024 9=4
BinaryOp Mul_35 2 1 86_splitncnn_0 93 94 0=2
BinaryOp Add_36 2 1 94 82 95
PReLU PRelu_37 1 1 95 97 0=64
Split splitncnn_5 1 3 97 97_splitncnn_0 97_splitncnn_1 97_splitncnn_2
Interp Resize_39 1 1 75_splitncnn_0 107 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_41 1 1 107 109 0=2 1=1 2=5.000000e-01
Split splitncnn_6 1 2 109 109_splitncnn_0 109_splitncnn_1
rife.Warp Warp_47 2 1 97_splitncnn_2 109_splitncnn_1 f2
Convolution Conv_48 1 1 97_splitncnn_1 116 0=128 1=3 3=2 4=1 6=73728
Convolution Conv_49 1 1 97_splitncnn_0 117 0=128 1=3 3=2 4=1 5=1 6=73728
PReLU PRelu_50 1 1 117 119 0=128
Convolution Conv_51 1 1 119 120 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_7 1 2 120 120_splitncnn_0 120_splitncnn_1
Pooling ReduceMean_53 1 1 120_splitncnn_1 122 0=1 4=1
InnerProduct Conv_54 1 1 122 125 0=16 2=2048 9=2 -23310=1,7.002444e-02
InnerProduct Conv_56 1 1 125 127 0=128 2=2048 9=4
BinaryOp Mul_58 2 1 120_splitncnn_0 127 128 0=2
BinaryOp Add_59 2 1 128 116 129
PReLU PRelu_60 1 1 129 131 0=128
Split splitncnn_8 1 3 131 131_splitncnn_0 131_splitncnn_1 131_splitncnn_2
Interp Resize_62 1 1 109_splitncnn_0 141 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_64 1 1 141 143 0=2 1=1 2=5.000000e-01
Split splitncnn_9 1 2 143 143_splitncnn_0 143_splitncnn_1
rife.Warp Warp_70 2 1 131_splitncnn_2 143_splitncnn_1 f3
Convolution Conv_71 1 1 131_splitncnn_1 150 0=256 1=3 3=2 4=1 6=294912
Convolution Conv_72 1 1 131_splitncnn_0 151 0=256 1=3 3=2 4=1 5=1 6=294912
PReLU PRelu_73 1 1 151 153 0=256
Convolution Conv_74 1 1 153 154 0=256 1=3 4=1 5=1 6=589824
Split splitncnn_10 1 2 154 154_splitncnn_0 154_splitncnn_1
Pooling ReduceMean_76 1 1 154_splitncnn_1 156 0=1 4=1
InnerProduct Conv_77 1 1 156 159 0=16 2=4096 9=2 -23310=1,6.568319e-02
InnerProduct Conv_79 1 1 159 161 0=256 2=4096 9=4
BinaryOp Mul_81 2 1 154_splitncnn_0 161 162 0=2
BinaryOp Add_82 2 1 162 150 163
PReLU PRelu_83 1 1 163 165 0=256
Interp Resize_85 1 1 143_splitncnn_0 175 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_87 1 1 175 177 0=2 1=1 2=5.000000e-01
rife.Warp Warp_93 2 1 165 177 f4

BIN
models/rife/rife-anime/flownet.bin vendored Normal file

Binary file not shown.

322
models/rife/rife-anime/flownet.param vendored Normal file
View File

@ -0,0 +1,322 @@
7767517
320 386
Input input0 0 1 input0
Input input1 0 1 input1
Concat input.1 2 1 input0 input1 input.1
Interp Resize_1 1 1 input.1 454 0=2 1=5.000000e-01 2=5.000000e-01
Split splitncnn_0 1 7 454 454_splitncnn_0 454_splitncnn_1 454_splitncnn_2 454_splitncnn_3 454_splitncnn_4 454_splitncnn_5 454_splitncnn_6
Interp Resize_3 1 1 454_splitncnn_6 464 0=2 1=1.250000e-01 2=1.250000e-01
Convolution Conv_4 1 1 464 466 0=192 1=5 3=2 4=2 5=1 6=28800
PReLU PRelu_6 1 1 466 468 0=192
Split splitncnn_1 1 2 468 468_splitncnn_0 468_splitncnn_1
Convolution Conv_7 1 1 468_splitncnn_1 470 0=192 1=5 4=2 5=1 6=921600
PReLU PRelu_9 1 1 470 472 0=192
Convolution Conv_10 1 1 472 474 0=192 1=3 4=1 5=1 6=331776
Split splitncnn_2 1 2 474 474_splitncnn_0 474_splitncnn_1
Pooling ReduceMean_13 1 1 474_splitncnn_1 476 0=1 4=1
InnerProduct Conv_14 1 1 476 479 0=16 2=3072 9=2 -23310=1,1.428942e-02
InnerProduct Conv_16 1 1 479 481 0=192 2=3072 9=4
BinaryOp Mul_18 2 1 474_splitncnn_0 481 482 0=2
BinaryOp Add_19 2 1 482 468_splitncnn_0 483
PReLU PRelu_20 1 1 483 485 0=192
Split splitncnn_3 1 2 485 485_splitncnn_0 485_splitncnn_1
Convolution Conv_21 1 1 485_splitncnn_1 487 0=192 1=5 4=2 5=1 6=921600
PReLU PRelu_23 1 1 487 489 0=192
Convolution Conv_24 1 1 489 491 0=192 1=3 4=1 5=1 6=331776
Split splitncnn_4 1 2 491 491_splitncnn_0 491_splitncnn_1
Pooling ReduceMean_27 1 1 491_splitncnn_1 493 0=1 4=1
InnerProduct Conv_28 1 1 493 496 0=16 2=3072 9=2 -23310=1,3.543398e-01
InnerProduct Conv_30 1 1 496 498 0=192 2=3072 9=4
BinaryOp Mul_32 2 1 491_splitncnn_0 498 499 0=2
BinaryOp Add_33 2 1 499 485_splitncnn_0 500
PReLU PRelu_34 1 1 500 502 0=192
Split splitncnn_5 1 2 502 502_splitncnn_0 502_splitncnn_1
Convolution Conv_35 1 1 502_splitncnn_1 504 0=192 1=5 4=2 5=1 6=921600
PReLU PRelu_37 1 1 504 506 0=192
Convolution Conv_38 1 1 506 508 0=192 1=3 4=1 5=1 6=331776
Split splitncnn_6 1 2 508 508_splitncnn_0 508_splitncnn_1
Pooling ReduceMean_41 1 1 508_splitncnn_1 510 0=1 4=1
InnerProduct Conv_42 1 1 510 513 0=16 2=3072 9=2 -23310=1,5.366787e-01
InnerProduct Conv_44 1 1 513 515 0=192 2=3072 9=4
BinaryOp Mul_46 2 1 508_splitncnn_0 515 516 0=2
BinaryOp Add_47 2 1 516 502_splitncnn_0 517
PReLU PRelu_48 1 1 517 519 0=192
Split splitncnn_7 1 2 519 519_splitncnn_0 519_splitncnn_1
Convolution Conv_49 1 1 519_splitncnn_1 521 0=192 1=5 4=2 5=1 6=921600
PReLU PRelu_51 1 1 521 523 0=192
Convolution Conv_52 1 1 523 525 0=192 1=3 4=1 5=1 6=331776
Split splitncnn_8 1 2 525 525_splitncnn_0 525_splitncnn_1
Pooling ReduceMean_55 1 1 525_splitncnn_1 527 0=1 4=1
InnerProduct Conv_56 1 1 527 530 0=16 2=3072 9=2 -23310=1,-4.889974e-03
InnerProduct Conv_58 1 1 530 532 0=192 2=3072 9=4
BinaryOp Mul_60 2 1 525_splitncnn_0 532 533 0=2
BinaryOp Add_61 2 1 533 519_splitncnn_0 534
PReLU PRelu_62 1 1 534 536 0=192
Split splitncnn_9 1 2 536 536_splitncnn_0 536_splitncnn_1
Convolution Conv_63 1 1 536_splitncnn_1 538 0=192 1=5 4=2 5=1 6=921600
PReLU PRelu_65 1 1 538 540 0=192
Convolution Conv_66 1 1 540 542 0=192 1=3 4=1 5=1 6=331776
Split splitncnn_10 1 2 542 542_splitncnn_0 542_splitncnn_1
Pooling ReduceMean_69 1 1 542_splitncnn_1 544 0=1 4=1
InnerProduct Conv_70 1 1 544 547 0=16 2=3072 9=2 -23310=1,-1.182169e-02
InnerProduct Conv_72 1 1 547 549 0=192 2=3072 9=4
BinaryOp Mul_74 2 1 542_splitncnn_0 549 550 0=2
BinaryOp Add_75 2 1 550 536_splitncnn_0 551
PReLU PRelu_76 1 1 551 553 0=192
Split splitncnn_11 1 2 553 553_splitncnn_0 553_splitncnn_1
Convolution Conv_77 1 1 553_splitncnn_1 555 0=192 1=5 4=2 5=1 6=921600
PReLU PRelu_79 1 1 555 557 0=192
Convolution Conv_80 1 1 557 559 0=192 1=3 4=1 5=1 6=331776
Split splitncnn_12 1 2 559 559_splitncnn_0 559_splitncnn_1
Pooling ReduceMean_83 1 1 559_splitncnn_1 561 0=1 4=1
InnerProduct Conv_84 1 1 561 564 0=16 2=3072 9=2 -23310=1,2.179182e-01
InnerProduct Conv_86 1 1 564 566 0=192 2=3072 9=4
BinaryOp Mul_88 2 1 559_splitncnn_0 566 567 0=2
BinaryOp Add_89 2 1 567 553_splitncnn_0 568
PReLU PRelu_90 1 1 568 570 0=192
Convolution Conv_91 1 1 570 571 0=8 1=3 4=1 5=1 6=13824
PixelShuffle DepthToSpace_92 1 1 571 572 0=2
Interp Resize_94 1 1 572 582 0=2 1=8.000000e+00 2=8.000000e+00
Split splitncnn_13 1 6 582 582_splitncnn_0 582_splitncnn_1 582_splitncnn_2 582_splitncnn_3 582_splitncnn_4 582_splitncnn_5
Crop Slice_99 1 1 454_splitncnn_5 587 -23309=1,0 -23310=1,3 -23311=1,0
rife.Warp Warp_105 2 1 587 582_splitncnn_5 593
Crop Slice_110 1 1 454_splitncnn_4 598 -23309=1,3 -23310=1,2147483647 -23311=1,0
UnaryOp Neg_111 1 1 582_splitncnn_4 599 0=1
rife.Warp Warp_117 2 1 598 599 605
Concat Concat_118 3 1 593 605 582_splitncnn_3 606
Interp Resize_120 1 1 606 616 0=2 1=2.500000e-01 2=2.500000e-01
Convolution Conv_121 1 1 616 618 0=128 1=5 3=2 4=2 5=1 6=25600
PReLU PRelu_123 1 1 618 620 0=128
Split splitncnn_14 1 2 620 620_splitncnn_0 620_splitncnn_1
Convolution Conv_124 1 1 620_splitncnn_1 622 0=128 1=5 4=2 5=1 6=409600
PReLU PRelu_126 1 1 622 624 0=128
Convolution Conv_127 1 1 624 626 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_15 1 2 626 626_splitncnn_0 626_splitncnn_1
Pooling ReduceMean_130 1 1 626_splitncnn_1 628 0=1 4=1
InnerProduct Conv_131 1 1 628 631 0=16 2=2048 9=2 -23310=1,-3.599843e-03
InnerProduct Conv_133 1 1 631 633 0=128 2=2048 9=4
BinaryOp Mul_135 2 1 626_splitncnn_0 633 634 0=2
BinaryOp Add_136 2 1 634 620_splitncnn_0 635
PReLU PRelu_137 1 1 635 637 0=128
Split splitncnn_16 1 2 637 637_splitncnn_0 637_splitncnn_1
Convolution Conv_138 1 1 637_splitncnn_1 639 0=128 1=5 4=2 5=1 6=409600
PReLU PRelu_140 1 1 639 641 0=128
Convolution Conv_141 1 1 641 643 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_17 1 2 643 643_splitncnn_0 643_splitncnn_1
Pooling ReduceMean_144 1 1 643_splitncnn_1 645 0=1 4=1
InnerProduct Conv_145 1 1 645 648 0=16 2=2048 9=2 -23310=1,2.117399e-01
InnerProduct Conv_147 1 1 648 650 0=128 2=2048 9=4
BinaryOp Mul_149 2 1 643_splitncnn_0 650 651 0=2
BinaryOp Add_150 2 1 651 637_splitncnn_0 652
PReLU PRelu_151 1 1 652 654 0=128
Split splitncnn_18 1 2 654 654_splitncnn_0 654_splitncnn_1
Convolution Conv_152 1 1 654_splitncnn_1 656 0=128 1=5 4=2 5=1 6=409600
PReLU PRelu_154 1 1 656 658 0=128
Convolution Conv_155 1 1 658 660 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_19 1 2 660 660_splitncnn_0 660_splitncnn_1
Pooling ReduceMean_158 1 1 660_splitncnn_1 662 0=1 4=1
InnerProduct Conv_159 1 1 662 665 0=16 2=2048 9=2 -23310=1,2.712289e-01
InnerProduct Conv_161 1 1 665 667 0=128 2=2048 9=4
BinaryOp Mul_163 2 1 660_splitncnn_0 667 668 0=2
BinaryOp Add_164 2 1 668 654_splitncnn_0 669
PReLU PRelu_165 1 1 669 671 0=128
Split splitncnn_20 1 2 671 671_splitncnn_0 671_splitncnn_1
Convolution Conv_166 1 1 671_splitncnn_1 673 0=128 1=5 4=2 5=1 6=409600
PReLU PRelu_168 1 1 673 675 0=128
Convolution Conv_169 1 1 675 677 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_21 1 2 677 677_splitncnn_0 677_splitncnn_1
Pooling ReduceMean_172 1 1 677_splitncnn_1 679 0=1 4=1
InnerProduct Conv_173 1 1 679 682 0=16 2=2048 9=2 -23310=1,8.141350e-02
InnerProduct Conv_175 1 1 682 684 0=128 2=2048 9=4
BinaryOp Mul_177 2 1 677_splitncnn_0 684 685 0=2
BinaryOp Add_178 2 1 685 671_splitncnn_0 686
PReLU PRelu_179 1 1 686 688 0=128
Split splitncnn_22 1 2 688 688_splitncnn_0 688_splitncnn_1
Convolution Conv_180 1 1 688_splitncnn_1 690 0=128 1=5 4=2 5=1 6=409600
PReLU PRelu_182 1 1 690 692 0=128
Convolution Conv_183 1 1 692 694 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_23 1 2 694 694_splitncnn_0 694_splitncnn_1
Pooling ReduceMean_186 1 1 694_splitncnn_1 696 0=1 4=1
InnerProduct Conv_187 1 1 696 699 0=16 2=2048 9=2 -23310=1,4.956326e-02
InnerProduct Conv_189 1 1 699 701 0=128 2=2048 9=4
BinaryOp Mul_191 2 1 694_splitncnn_0 701 702 0=2
BinaryOp Add_192 2 1 702 688_splitncnn_0 703
PReLU PRelu_193 1 1 703 705 0=128
Split splitncnn_24 1 2 705 705_splitncnn_0 705_splitncnn_1
Convolution Conv_194 1 1 705_splitncnn_1 707 0=128 1=5 4=2 5=1 6=409600
PReLU PRelu_196 1 1 707 709 0=128
Convolution Conv_197 1 1 709 711 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_25 1 2 711 711_splitncnn_0 711_splitncnn_1
Pooling ReduceMean_200 1 1 711_splitncnn_1 713 0=1 4=1
InnerProduct Conv_201 1 1 713 716 0=16 2=2048 9=2 -23310=1,1.553750e-01
InnerProduct Conv_203 1 1 716 718 0=128 2=2048 9=4
BinaryOp Mul_205 2 1 711_splitncnn_0 718 719 0=2
BinaryOp Add_206 2 1 719 705_splitncnn_0 720
PReLU PRelu_207 1 1 720 722 0=128
Convolution Conv_208 1 1 722 723 0=8 1=3 4=1 5=1 6=9216
PixelShuffle DepthToSpace_209 1 1 723 724 0=2
Interp Resize_211 1 1 724 734 0=2 1=4.000000e+00 2=4.000000e+00
Split splitncnn_26 1 3 734 734_splitncnn_0 734_splitncnn_1 734_splitncnn_2
BinaryOp Add_212 2 1 582_splitncnn_2 734_splitncnn_2 735
Split splitncnn_27 1 3 735 735_splitncnn_0 735_splitncnn_1 735_splitncnn_2
Crop Slice_217 1 1 454_splitncnn_3 740 -23309=1,0 -23310=1,3 -23311=1,0
rife.Warp Warp_223 2 1 740 735_splitncnn_2 746
Crop Slice_228 1 1 454_splitncnn_2 751 -23309=1,3 -23310=1,2147483647 -23311=1,0
UnaryOp Neg_229 1 1 735_splitncnn_1 752 0=1
rife.Warp Warp_235 2 1 751 752 758
Concat Concat_236 3 1 746 758 735_splitncnn_0 759
Interp Resize_238 1 1 759 769 0=2 1=5.000000e-01 2=5.000000e-01
Convolution Conv_239 1 1 769 771 0=96 1=5 3=2 4=2 5=1 6=19200
PReLU PRelu_241 1 1 771 773 0=96
Split splitncnn_28 1 2 773 773_splitncnn_0 773_splitncnn_1
Convolution Conv_242 1 1 773_splitncnn_1 775 0=96 1=5 4=2 5=1 6=230400
PReLU PRelu_244 1 1 775 777 0=96
Convolution Conv_245 1 1 777 779 0=96 1=3 4=1 5=1 6=82944
Split splitncnn_29 1 2 779 779_splitncnn_0 779_splitncnn_1
Pooling ReduceMean_248 1 1 779_splitncnn_1 781 0=1 4=1
InnerProduct Conv_249 1 1 781 784 0=16 2=1536 9=2 -23310=1,1.670981e-03
InnerProduct Conv_251 1 1 784 786 0=96 2=1536 9=4
BinaryOp Mul_253 2 1 779_splitncnn_0 786 787 0=2
BinaryOp Add_254 2 1 787 773_splitncnn_0 788
PReLU PRelu_255 1 1 788 790 0=96
Split splitncnn_30 1 2 790 790_splitncnn_0 790_splitncnn_1
Convolution Conv_256 1 1 790_splitncnn_1 792 0=96 1=5 4=2 5=1 6=230400
PReLU PRelu_258 1 1 792 794 0=96
Convolution Conv_259 1 1 794 796 0=96 1=3 4=1 5=1 6=82944
Split splitncnn_31 1 2 796 796_splitncnn_0 796_splitncnn_1
Pooling ReduceMean_262 1 1 796_splitncnn_1 798 0=1 4=1
InnerProduct Conv_263 1 1 798 801 0=16 2=1536 9=2 -23310=1,3.868800e-01
InnerProduct Conv_265 1 1 801 803 0=96 2=1536 9=4
BinaryOp Mul_267 2 1 796_splitncnn_0 803 804 0=2
BinaryOp Add_268 2 1 804 790_splitncnn_0 805
PReLU PRelu_269 1 1 805 807 0=96
Split splitncnn_32 1 2 807 807_splitncnn_0 807_splitncnn_1
Convolution Conv_270 1 1 807_splitncnn_1 809 0=96 1=5 4=2 5=1 6=230400
PReLU PRelu_272 1 1 809 811 0=96
Convolution Conv_273 1 1 811 813 0=96 1=3 4=1 5=1 6=82944
Split splitncnn_33 1 2 813 813_splitncnn_0 813_splitncnn_1
Pooling ReduceMean_276 1 1 813_splitncnn_1 815 0=1 4=1
InnerProduct Conv_277 1 1 815 818 0=16 2=1536 9=2 -23310=1,3.475277e-01
InnerProduct Conv_279 1 1 818 820 0=96 2=1536 9=4
BinaryOp Mul_281 2 1 813_splitncnn_0 820 821 0=2
BinaryOp Add_282 2 1 821 807_splitncnn_0 822
PReLU PRelu_283 1 1 822 824 0=96
Split splitncnn_34 1 2 824 824_splitncnn_0 824_splitncnn_1
Convolution Conv_284 1 1 824_splitncnn_1 826 0=96 1=5 4=2 5=1 6=230400
PReLU PRelu_286 1 1 826 828 0=96
Convolution Conv_287 1 1 828 830 0=96 1=3 4=1 5=1 6=82944
Split splitncnn_35 1 2 830 830_splitncnn_0 830_splitncnn_1
Pooling ReduceMean_290 1 1 830_splitncnn_1 832 0=1 4=1
InnerProduct Conv_291 1 1 832 835 0=16 2=1536 9=2 -23310=1,7.044167e-02
InnerProduct Conv_293 1 1 835 837 0=96 2=1536 9=4
BinaryOp Mul_295 2 1 830_splitncnn_0 837 838 0=2
BinaryOp Add_296 2 1 838 824_splitncnn_0 839
PReLU PRelu_297 1 1 839 841 0=96
Split splitncnn_36 1 2 841 841_splitncnn_0 841_splitncnn_1
Convolution Conv_298 1 1 841_splitncnn_1 843 0=96 1=5 4=2 5=1 6=230400
PReLU PRelu_300 1 1 843 845 0=96
Convolution Conv_301 1 1 845 847 0=96 1=3 4=1 5=1 6=82944
Split splitncnn_37 1 2 847 847_splitncnn_0 847_splitncnn_1
Pooling ReduceMean_304 1 1 847_splitncnn_1 849 0=1 4=1
InnerProduct Conv_305 1 1 849 852 0=16 2=1536 9=2 -23310=1,1.834324e-01
InnerProduct Conv_307 1 1 852 854 0=96 2=1536 9=4
BinaryOp Mul_309 2 1 847_splitncnn_0 854 855 0=2
BinaryOp Add_310 2 1 855 841_splitncnn_0 856
PReLU PRelu_311 1 1 856 858 0=96
Split splitncnn_38 1 2 858 858_splitncnn_0 858_splitncnn_1
Convolution Conv_312 1 1 858_splitncnn_1 860 0=96 1=5 4=2 5=1 6=230400
PReLU PRelu_314 1 1 860 862 0=96
Convolution Conv_315 1 1 862 864 0=96 1=3 4=1 5=1 6=82944
Split splitncnn_39 1 2 864 864_splitncnn_0 864_splitncnn_1
Pooling ReduceMean_318 1 1 864_splitncnn_1 866 0=1 4=1
InnerProduct Conv_319 1 1 866 869 0=16 2=1536 9=2 -23310=1,3.572731e-01
InnerProduct Conv_321 1 1 869 871 0=96 2=1536 9=4
BinaryOp Mul_323 2 1 864_splitncnn_0 871 872 0=2
BinaryOp Add_324 2 1 872 858_splitncnn_0 873
PReLU PRelu_325 1 1 873 875 0=96
Convolution Conv_326 1 1 875 876 0=8 1=3 4=1 5=1 6=6912
PixelShuffle DepthToSpace_327 1 1 876 877 0=2
Interp Resize_329 1 1 877 887 0=2 1=2.000000e+00 2=2.000000e+00
Split splitncnn_40 1 2 887 887_splitncnn_0 887_splitncnn_1
BinaryOp Add_330 2 1 582_splitncnn_1 734_splitncnn_1 888
BinaryOp Add_331 2 1 888 887_splitncnn_1 889
Split splitncnn_41 1 3 889 889_splitncnn_0 889_splitncnn_1 889_splitncnn_2
Crop Slice_336 1 1 454_splitncnn_1 894 -23309=1,0 -23310=1,3 -23311=1,0
rife.Warp Warp_342 2 1 894 889_splitncnn_2 900
Crop Slice_347 1 1 454_splitncnn_0 905 -23309=1,3 -23310=1,2147483647 -23311=1,0
UnaryOp Neg_348 1 1 889_splitncnn_1 906 0=1
rife.Warp Warp_354 2 1 905 906 912
Concat Concat_355 3 1 900 912 889_splitncnn_0 913
Convolution Conv_356 1 1 913 915 0=48 1=5 3=2 4=2 5=1 6=9600
PReLU PRelu_358 1 1 915 917 0=48
Split splitncnn_42 1 2 917 917_splitncnn_0 917_splitncnn_1
Convolution Conv_359 1 1 917_splitncnn_1 919 0=48 1=5 4=2 5=1 6=57600
PReLU PRelu_361 1 1 919 921 0=48
Convolution Conv_362 1 1 921 923 0=48 1=3 4=1 5=1 6=20736
Split splitncnn_43 1 2 923 923_splitncnn_0 923_splitncnn_1
Pooling ReduceMean_365 1 1 923_splitncnn_1 925 0=1 4=1
InnerProduct Conv_366 1 1 925 928 0=16 2=768 9=2 -23310=1,2.075541e-02
InnerProduct Conv_368 1 1 928 930 0=48 2=768 9=4
BinaryOp Mul_370 2 1 923_splitncnn_0 930 931 0=2
BinaryOp Add_371 2 1 931 917_splitncnn_0 932
PReLU PRelu_372 1 1 932 934 0=48
Split splitncnn_44 1 2 934 934_splitncnn_0 934_splitncnn_1
Convolution Conv_373 1 1 934_splitncnn_1 936 0=48 1=5 4=2 5=1 6=57600
PReLU PRelu_375 1 1 936 938 0=48
Convolution Conv_376 1 1 938 940 0=48 1=3 4=1 5=1 6=20736
Split splitncnn_45 1 2 940 940_splitncnn_0 940_splitncnn_1
Pooling ReduceMean_379 1 1 940_splitncnn_1 942 0=1 4=1
InnerProduct Conv_380 1 1 942 945 0=16 2=768 9=2 -23310=1,7.201483e-01
InnerProduct Conv_382 1 1 945 947 0=48 2=768 9=4
BinaryOp Mul_384 2 1 940_splitncnn_0 947 948 0=2
BinaryOp Add_385 2 1 948 934_splitncnn_0 949
PReLU PRelu_386 1 1 949 951 0=48
Split splitncnn_46 1 2 951 951_splitncnn_0 951_splitncnn_1
Convolution Conv_387 1 1 951_splitncnn_1 953 0=48 1=5 4=2 5=1 6=57600
PReLU PRelu_389 1 1 953 955 0=48
Convolution Conv_390 1 1 955 957 0=48 1=3 4=1 5=1 6=20736
Split splitncnn_47 1 2 957 957_splitncnn_0 957_splitncnn_1
Pooling ReduceMean_393 1 1 957_splitncnn_1 959 0=1 4=1
InnerProduct Conv_394 1 1 959 962 0=16 2=768 9=2 -23310=1,2.671039e-01
InnerProduct Conv_396 1 1 962 964 0=48 2=768 9=4
BinaryOp Mul_398 2 1 957_splitncnn_0 964 965 0=2
BinaryOp Add_399 2 1 965 951_splitncnn_0 966
PReLU PRelu_400 1 1 966 968 0=48
Split splitncnn_48 1 2 968 968_splitncnn_0 968_splitncnn_1
Convolution Conv_401 1 1 968_splitncnn_1 970 0=48 1=5 4=2 5=1 6=57600
PReLU PRelu_403 1 1 970 972 0=48
Convolution Conv_404 1 1 972 974 0=48 1=3 4=1 5=1 6=20736
Split splitncnn_49 1 2 974 974_splitncnn_0 974_splitncnn_1
Pooling ReduceMean_407 1 1 974_splitncnn_1 976 0=1 4=1
InnerProduct Conv_408 1 1 976 979 0=16 2=768 9=2 -23310=1,1.908224e-01
InnerProduct Conv_410 1 1 979 981 0=48 2=768 9=4
BinaryOp Mul_412 2 1 974_splitncnn_0 981 982 0=2
BinaryOp Add_413 2 1 982 968_splitncnn_0 983
PReLU PRelu_414 1 1 983 985 0=48
Split splitncnn_50 1 2 985 985_splitncnn_0 985_splitncnn_1
Convolution Conv_415 1 1 985_splitncnn_1 987 0=48 1=5 4=2 5=1 6=57600
PReLU PRelu_417 1 1 987 989 0=48
Convolution Conv_418 1 1 989 991 0=48 1=3 4=1 5=1 6=20736
Split splitncnn_51 1 2 991 991_splitncnn_0 991_splitncnn_1
Pooling ReduceMean_421 1 1 991_splitncnn_1 993 0=1 4=1
InnerProduct Conv_422 1 1 993 996 0=16 2=768 9=2 -23310=1,6.525763e-01
InnerProduct Conv_424 1 1 996 998 0=48 2=768 9=4
BinaryOp Mul_426 2 1 991_splitncnn_0 998 999 0=2
BinaryOp Add_427 2 1 999 985_splitncnn_0 1000
PReLU PRelu_428 1 1 1000 1002 0=48
Split splitncnn_52 1 2 1002 1002_splitncnn_0 1002_splitncnn_1
Convolution Conv_429 1 1 1002_splitncnn_1 1004 0=48 1=5 4=2 5=1 6=57600
PReLU PRelu_431 1 1 1004 1006 0=48
Convolution Conv_432 1 1 1006 1008 0=48 1=3 4=1 5=1 6=20736
Split splitncnn_53 1 2 1008 1008_splitncnn_0 1008_splitncnn_1
Pooling ReduceMean_435 1 1 1008_splitncnn_1 1010 0=1 4=1
InnerProduct Conv_436 1 1 1010 1013 0=16 2=768 9=2 -23310=1,5.485489e-01
InnerProduct Conv_438 1 1 1013 1015 0=48 2=768 9=4
BinaryOp Mul_440 2 1 1008_splitncnn_0 1015 1016 0=2
BinaryOp Add_441 2 1 1016 1002_splitncnn_0 1017
PReLU PRelu_442 1 1 1017 1019 0=48
Convolution Conv_443 1 1 1019 1020 0=8 1=3 4=1 5=1 6=3456
PixelShuffle DepthToSpace_444 1 1 1020 1021 0=2
BinaryOp Add_445 2 1 582_splitncnn_0 734_splitncnn_0 1022
BinaryOp Add_446 2 1 1022 887_splitncnn_0 1023
BinaryOp Add_447 2 1 1023 1021 flow

BIN
models/rife/rife-anime/fusionnet.bin vendored Normal file

Binary file not shown.

105
models/rife/rife-anime/fusionnet.param vendored Normal file
View File

@ -0,0 +1,105 @@
7767517
103 120
Input img0 0 1 img0
Input img1 0 1 img1
Input flow 0 1 flow
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 flow 77 0=2 1=2.000000e+00 2=2.000000e+00
BinaryOp Mul_3 1 1 77 79 0=2 1=1 2=2.000000e+00
Split splitncnn_0 1 3 79 79_splitncnn_0 79_splitncnn_1 79_splitncnn_2
rife.Warp Warp_9 2 1 img0 79_splitncnn_2 85
Split splitncnn_1 1 2 85 85_splitncnn_0 85_splitncnn_1
UnaryOp Neg_10 1 1 79_splitncnn_1 86 0=1
rife.Warp Warp_16 2 1 img1 86 92
Split splitncnn_2 1 2 92 92_splitncnn_0 92_splitncnn_1
Concat Concat_17 3 1 85_splitncnn_1 92_splitncnn_1 79_splitncnn_0 93
Convolution Conv_18 1 1 93 94 0=32 1=3 3=2 4=1 5=1 6=2304
PReLU PRelu_19 1 1 94 96 0=32
Split splitncnn_3 1 2 96 96_splitncnn_0 96_splitncnn_1
Convolution Conv_20 1 1 96_splitncnn_1 97 0=64 1=3 3=2 4=1 6=18432
Convolution Conv_21 1 1 96_splitncnn_0 98 0=64 1=3 3=2 4=1 5=1 6=18432
PReLU PRelu_22 1 1 98 100 0=64
Convolution Conv_23 1 1 100 101 0=64 1=3 4=1 5=1 6=36864
Split splitncnn_4 1 2 101 101_splitncnn_0 101_splitncnn_1
Pooling ReduceMean_25 1 1 101_splitncnn_1 103 0=1 4=1
InnerProduct Conv_26 1 1 103 106 0=16 2=1024 9=2 -23310=1,1.541520e-01
InnerProduct Conv_28 1 1 106 108 0=64 2=1024 9=4
BinaryOp Mul_30 2 1 101_splitncnn_0 108 109 0=2
BinaryOp Add_31 2 1 109 97 110
PReLU PRelu_32 1 1 110 112 0=64
Split splitncnn_5 1 2 112 112_splitncnn_0 112_splitncnn_1
Concat Concat_33 3 1 112_splitncnn_1 3 7 113
Split splitncnn_6 1 2 113 113_splitncnn_0 113_splitncnn_1
Convolution Conv_34 1 1 113_splitncnn_1 114 0=128 1=3 3=2 4=1 6=147456
Convolution Conv_35 1 1 113_splitncnn_0 115 0=128 1=3 3=2 4=1 5=1 6=147456
PReLU PRelu_36 1 1 115 117 0=128
Convolution Conv_37 1 1 117 118 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_7 1 2 118 118_splitncnn_0 118_splitncnn_1
Pooling ReduceMean_39 1 1 118_splitncnn_1 120 0=1 4=1
InnerProduct Conv_40 1 1 120 123 0=16 2=2048 9=2 -23310=1,4.722085e-02
InnerProduct Conv_42 1 1 123 125 0=128 2=2048 9=4
BinaryOp Mul_44 2 1 118_splitncnn_0 125 126 0=2
BinaryOp Add_45 2 1 126 114 127
PReLU PRelu_46 1 1 127 129 0=128
Split splitncnn_8 1 2 129 129_splitncnn_0 129_splitncnn_1
Concat Concat_47 3 1 129_splitncnn_1 4 8 130
Split splitncnn_9 1 2 130 130_splitncnn_0 130_splitncnn_1
Convolution Conv_48 1 1 130_splitncnn_1 131 0=256 1=3 3=2 4=1 6=589824
Convolution Conv_49 1 1 130_splitncnn_0 132 0=256 1=3 3=2 4=1 5=1 6=589824
PReLU PRelu_50 1 1 132 134 0=256
Convolution Conv_51 1 1 134 135 0=256 1=3 4=1 5=1 6=589824
Split splitncnn_10 1 2 135 135_splitncnn_0 135_splitncnn_1
Pooling ReduceMean_53 1 1 135_splitncnn_1 137 0=1 4=1
InnerProduct Conv_54 1 1 137 140 0=16 2=4096 9=2 -23310=1,8.144739e-02
InnerProduct Conv_56 1 1 140 142 0=256 2=4096 9=4
BinaryOp Mul_58 2 1 135_splitncnn_0 142 143 0=2
BinaryOp Add_59 2 1 143 131 144
PReLU PRelu_60 1 1 144 146 0=256
Split splitncnn_11 1 2 146 146_splitncnn_0 146_splitncnn_1
Concat Concat_61 3 1 146_splitncnn_1 5 9 147
Split splitncnn_12 1 2 147 147_splitncnn_0 147_splitncnn_1
Convolution Conv_62 1 1 147_splitncnn_1 148 0=512 1=3 3=2 4=1 6=2359296
Convolution Conv_63 1 1 147_splitncnn_0 149 0=512 1=3 3=2 4=1 5=1 6=2359296
PReLU PRelu_64 1 1 149 151 0=512
Convolution Conv_65 1 1 151 152 0=512 1=3 4=1 5=1 6=2359296
Split splitncnn_13 1 2 152 152_splitncnn_0 152_splitncnn_1
Pooling ReduceMean_67 1 1 152_splitncnn_1 154 0=1 4=1
InnerProduct Conv_68 1 1 154 157 0=16 2=8192 9=2 -23310=1,7.700763e-02
InnerProduct Conv_70 1 1 157 159 0=512 2=8192 9=4
BinaryOp Mul_72 2 1 152_splitncnn_0 159 160 0=2
BinaryOp Add_73 2 1 160 148 161
PReLU PRelu_74 1 1 161 163 0=512
Concat Concat_75 3 1 163 6 10 164
Deconvolution ConvTranspose_76 1 1 164 165 0=256 1=4 3=2 4=1 5=1 6=4194304
PReLU PRelu_77 1 1 165 167 0=256
Concat Concat_78 2 1 167 146_splitncnn_0 168
Deconvolution ConvTranspose_79 1 1 168 169 0=128 1=4 3=2 4=1 5=1 6=1048576
PReLU PRelu_80 1 1 169 171 0=128
Concat Concat_81 2 1 171 129_splitncnn_0 172
Deconvolution ConvTranspose_82 1 1 172 173 0=64 1=4 3=2 4=1 5=1 6=262144
PReLU PRelu_83 1 1 173 175 0=64
Concat Concat_84 2 1 175 112_splitncnn_0 176
Deconvolution ConvTranspose_85 1 1 176 177 0=32 1=4 3=2 4=1 5=1 6=65536
PReLU PRelu_86 1 1 177 179 0=32
Convolution Conv_87 1 1 179 180 0=16 1=3 4=1 5=1 6=4608
PixelShuffle DepthToSpace_88 1 1 180 181 0=2
Sigmoid Sigmoid_89 1 1 181 182
Split splitncnn_14 1 2 182 182_splitncnn_0 182_splitncnn_1
Crop Slice_94 1 1 182_splitncnn_1 187 -23309=1,0 -23310=1,3 -23311=1,0
BinaryOp Mul_96 1 1 187 189 0=2 1=1 2=2.000000e+00
BinaryOp Sub_98 1 1 189 191 0=1 1=1 2=1.000000e+00
Crop Slice_103 1 1 182_splitncnn_0 196 -23309=1,3 -23310=1,4 -23311=1,0
Split splitncnn_15 1 2 196 196_splitncnn_0 196_splitncnn_1
BinaryOp Mul_104 2 1 85_splitncnn_0 196_splitncnn_1 197 0=2
BinaryOp Sub_106 1 1 196_splitncnn_0 199 0=7 1=1 2=1.000000e+00
BinaryOp Mul_107 2 1 92_splitncnn_0 199 200 0=2
BinaryOp Add_108 2 1 197 200 201
BinaryOp Add_109 2 1 201 191 202
Clip Clip_110 1 1 202 output 0=0.000000e+00 1=1.000000e+00

BIN
models/rife/rife-v2.3/contextnet.bin vendored Normal file

Binary file not shown.

42
models/rife/rife-v2.3/contextnet.param vendored Normal file
View File

@ -0,0 +1,42 @@
7767517
40 46
Input input.1 0 1 input.1
Input flow.0 0 1 flow.0
Convolution Conv_0 1 1 input.1 32 0=32 1=3 3=2 4=1 5=1 6=864
PReLU PRelu_1 1 1 32 34 0=32
Convolution Conv_2 1 1 34 35 0=32 1=3 4=1 5=1 6=9216
PReLU PRelu_3 1 1 35 37 0=32
Convolution Conv_4 1 1 37 38 0=32 1=3 3=2 4=1 5=1 6=9216
PReLU PRelu_5 1 1 38 40 0=32
Convolution Conv_6 1 1 40 41 0=32 1=3 4=1 5=1 6=9216
PReLU PRelu_7 1 1 41 43 0=32
Split splitncnn_0 1 2 43 43_splitncnn_0 43_splitncnn_1
Interp Resize_9 1 1 flow.0 53 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_11 1 1 53 55 0=2 1=1 2=5.000000e-01
Split splitncnn_1 1 2 55 55_splitncnn_0 55_splitncnn_1
rife.Warp Warp_17 2 1 43_splitncnn_1 55_splitncnn_1 f1
Convolution Conv_18 1 1 43_splitncnn_0 62 0=64 1=3 3=2 4=1 5=1 6=18432
PReLU PRelu_19 1 1 62 64 0=64
Convolution Conv_20 1 1 64 65 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_21 1 1 65 67 0=64
Split splitncnn_2 1 2 67 67_splitncnn_0 67_splitncnn_1
Interp Resize_23 1 1 55_splitncnn_0 77 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_25 1 1 77 79 0=2 1=1 2=5.000000e-01
Split splitncnn_3 1 2 79 79_splitncnn_0 79_splitncnn_1
rife.Warp Warp_31 2 1 67_splitncnn_1 79_splitncnn_1 f2
Convolution Conv_32 1 1 67_splitncnn_0 86 0=128 1=3 3=2 4=1 5=1 6=73728
PReLU PRelu_33 1 1 86 88 0=128
Convolution Conv_34 1 1 88 89 0=128 1=3 4=1 5=1 6=147456
PReLU PRelu_35 1 1 89 91 0=128
Split splitncnn_4 1 2 91 91_splitncnn_0 91_splitncnn_1
Interp Resize_37 1 1 79_splitncnn_0 101 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_39 1 1 101 103 0=2 1=1 2=5.000000e-01
Split splitncnn_5 1 2 103 103_splitncnn_0 103_splitncnn_1
rife.Warp Warp_31a 2 1 91_splitncnn_1 103_splitncnn_1 f3
Convolution Conv_46 1 1 91_splitncnn_0 110 0=256 1=3 3=2 4=1 5=1 6=294912
PReLU PRelu_47 1 1 110 112 0=256
Convolution Conv_48 1 1 112 113 0=256 1=3 4=1 5=1 6=589824
PReLU PRelu_49 1 1 113 115 0=256
Interp Resize_51 1 1 103_splitncnn_0 125 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_53 1 1 125 127 0=2 1=1 2=5.000000e-01
rife.Warp Warp_ss 2 1 115 127 f4

BIN
models/rife/rife-v2.3/flownet.bin vendored Normal file

Binary file not shown.

119
models/rife/rife-v2.3/flownet.param vendored Normal file
View File

@ -0,0 +1,119 @@
7767517
117 135
Input input0 0 1 input0
Input input1 0 1 input1
Concat input.1 2 1 input0 input1 input.1
Split splitncnn_input0 1 7 input.1 input.1_splitncnn_0 input.1_splitncnn_1 input.1_splitncnn_2 input.1_splitncnn_3 input.1_splitncnn_4 input.1_splitncnn_5 input.1_splitncnn_6
Interp Resize_1 1 1 input.1_splitncnn_6 114 0=2 1=1.250000e-01 2=1.250000e-01
Convolution Conv_2 1 1 114 115 0=192 1=3 3=2 4=1 5=1 6=10368
PReLU PRelu_3 1 1 115 117 0=192
Convolution Conv_4 1 1 117 118 0=384 1=3 3=2 4=1 5=1 6=663552
PReLU PRelu_5 1 1 118 120 0=384
Convolution Conv_6 1 1 120 121 0=384 1=3 4=1 5=1 6=1327104
PReLU PRelu_7 1 1 121 123 0=384
Convolution Conv_8 1 1 123 124 0=384 1=3 4=1 5=1 6=1327104
PReLU PRelu_9 1 1 124 126 0=384
Convolution Conv_10 1 1 126 127 0=384 1=3 4=1 5=1 6=1327104
PReLU PRelu_11 1 1 127 129 0=384
Convolution Conv_12 1 1 129 130 0=384 1=3 4=1 5=1 6=1327104
PReLU PRelu_13 1 1 130 132 0=384
Convolution Conv_14 1 1 132 133 0=384 1=3 4=1 5=1 6=1327104
PReLU PRelu_15 1 1 133 135 0=384
Convolution Conv_16 1 1 135 136 0=384 1=3 4=1 5=1 6=1327104
PReLU PRelu_17 1 1 136 138 0=384
Deconvolution ConvTranspose_18 1 1 138 139 0=4 1=4 3=2 4=1 5=1 6=24576
Interp Resize_20 1 1 139 149 0=2 1=8.000000e+00 2=8.000000e+00
Split splitncnn_0 1 4 149 149_splitncnn_0 149_splitncnn_1 149_splitncnn_2 149_splitncnn_3
Interp Resize_22 1 1 149_splitncnn_3 159 0=2 1=2.000000e+00 2=2.000000e+00
BinaryOp Mul_24 1 1 159 161 0=2 1=1 2=2.000000e+00
Split splitncnn_1 1 3 161 161_splitncnn_0 161_splitncnn_1 161_splitncnn_2
Crop Slice_29 1 1 input.1_splitncnn_5 166 -23309=1,0 -23310=1,3 -23311=1,0
Crop Slice_34 1 1 161_splitncnn_2 171 -23309=1,0 -23310=1,2 -23311=1,0
rife.Warp Warp_40 2 1 166 171 177
Crop Slice_45 1 1 input.1_splitncnn_4 182 -23309=1,3 -23310=1,2147483647 -23311=1,0
Crop Slice_50 1 1 161_splitncnn_1 187 -23309=1,2 -23310=1,4 -23311=1,0
rife.Warp Warp_56 2 1 182 187 193
Concat Concat_57 3 1 177 193 161_splitncnn_0 194
Interp Resize_59 1 1 194 204 0=2 1=2.500000e-01 2=2.500000e-01
Convolution Conv_60 1 1 204 205 0=128 1=3 3=2 4=1 5=1 6=11520
PReLU PRelu_61 1 1 205 207 0=128
Convolution Conv_62 1 1 207 208 0=256 1=3 3=2 4=1 5=1 6=294912
PReLU PRelu_63 1 1 208 210 0=256
Convolution Conv_64 1 1 210 211 0=256 1=3 4=1 5=1 6=589824
PReLU PRelu_65 1 1 211 213 0=256
Convolution Conv_66 1 1 213 214 0=256 1=3 4=1 5=1 6=589824
PReLU PRelu_67 1 1 214 216 0=256
Convolution Conv_68 1 1 216 217 0=256 1=3 4=1 5=1 6=589824
PReLU PRelu_69 1 1 217 219 0=256
Convolution Conv_70 1 1 219 220 0=256 1=3 4=1 5=1 6=589824
PReLU PRelu_71 1 1 220 222 0=256
Convolution Conv_72 1 1 222 223 0=256 1=3 4=1 5=1 6=589824
PReLU PRelu_73 1 1 223 225 0=256
Convolution Conv_74 1 1 225 226 0=256 1=3 4=1 5=1 6=589824
PReLU PRelu_75 1 1 226 228 0=256
Deconvolution ConvTranspose_76 1 1 228 229 0=4 1=4 3=2 4=1 5=1 6=16384
Interp Resize_78 1 1 229 239 0=2 1=4.000000e+00 2=4.000000e+00
Split splitncnn_2 1 3 239 239_splitncnn_0 239_splitncnn_1 239_splitncnn_2
BinaryOp Add_79 2 1 149_splitncnn_2 239_splitncnn_2 240
Interp Resize_81 1 1 240 250 0=2 1=2.000000e+00 2=2.000000e+00
BinaryOp Mul_83 1 1 250 252 0=2 1=1 2=2.000000e+00
Split splitncnn_3 1 3 252 252_splitncnn_0 252_splitncnn_1 252_splitncnn_2
Crop Slice_88 1 1 input.1_splitncnn_3 257 -23309=1,0 -23310=1,3 -23311=1,0
Crop Slice_93 1 1 252_splitncnn_2 262 -23309=1,0 -23310=1,2 -23311=1,0
rife.Warp Warp_99 2 1 257 262 268
Crop Slice_104 1 1 input.1_splitncnn_2 273 -23309=1,3 -23310=1,2147483647 -23311=1,0
Crop Slice_109 1 1 252_splitncnn_1 278 -23309=1,2 -23310=1,4 -23311=1,0
rife.Warp Warp_115 2 1 273 278 284
Concat Concat_116 3 1 268 284 252_splitncnn_0 285
Interp Resize_118 1 1 285 295 0=2 1=5.000000e-01 2=5.000000e-01
Convolution Conv_119 1 1 295 296 0=96 1=3 3=2 4=1 5=1 6=8640
PReLU PRelu_120 1 1 296 298 0=96
Convolution Conv_121 1 1 298 299 0=192 1=3 3=2 4=1 5=1 6=165888
PReLU PRelu_122 1 1 299 301 0=192
Convolution Conv_123 1 1 301 302 0=192 1=3 4=1 5=1 6=331776
PReLU PRelu_124 1 1 302 304 0=192
Convolution Conv_125 1 1 304 305 0=192 1=3 4=1 5=1 6=331776
PReLU PRelu_126 1 1 305 307 0=192
Convolution Conv_127 1 1 307 308 0=192 1=3 4=1 5=1 6=331776
PReLU PRelu_128 1 1 308 310 0=192
Convolution Conv_129 1 1 310 311 0=192 1=3 4=1 5=1 6=331776
PReLU PRelu_130 1 1 311 313 0=192
Convolution Conv_131 1 1 313 314 0=192 1=3 4=1 5=1 6=331776
PReLU PRelu_132 1 1 314 316 0=192
Convolution Conv_133 1 1 316 317 0=192 1=3 4=1 5=1 6=331776
PReLU PRelu_134 1 1 317 319 0=192
Deconvolution ConvTranspose_135 1 1 319 320 0=4 1=4 3=2 4=1 5=1 6=12288
Interp Resize_137 1 1 320 330 0=2 1=2.000000e+00 2=2.000000e+00
Split splitncnn_4 1 2 330 330_splitncnn_0 330_splitncnn_1
BinaryOp Add_138 2 1 149_splitncnn_1 239_splitncnn_1 331
BinaryOp Add_139 2 1 331 330_splitncnn_1 332
Interp Resize_141 1 1 332 342 0=2 1=2.000000e+00 2=2.000000e+00
BinaryOp Mul_143 1 1 342 344 0=2 1=1 2=2.000000e+00
Split splitncnn_5 1 3 344 344_splitncnn_0 344_splitncnn_1 344_splitncnn_2
Crop Slice_148 1 1 input.1_splitncnn_1 349 -23309=1,0 -23310=1,3 -23311=1,0
Crop Slice_153 1 1 344_splitncnn_2 354 -23309=1,0 -23310=1,2 -23311=1,0
rife.Warp Warp_159 2 1 349 354 360
Crop Slice_164 1 1 input.1_splitncnn_0 365 -23309=1,3 -23310=1,2147483647 -23311=1,0
Crop Slice_169 1 1 344_splitncnn_1 370 -23309=1,2 -23310=1,4 -23311=1,0
rife.Warp Warp_175 2 1 365 370 376
Concat Concat_176 3 1 360 376 344_splitncnn_0 377
Convolution Conv_177 1 1 377 378 0=48 1=3 3=2 4=1 5=1 6=4320
PReLU PRelu_178 1 1 378 380 0=48
Convolution Conv_179 1 1 380 381 0=96 1=3 3=2 4=1 5=1 6=41472
PReLU PRelu_180 1 1 381 383 0=96
Convolution Conv_181 1 1 383 384 0=96 1=3 4=1 5=1 6=82944
PReLU PRelu_182 1 1 384 386 0=96
Convolution Conv_183 1 1 386 387 0=96 1=3 4=1 5=1 6=82944
PReLU PRelu_184 1 1 387 389 0=96
Convolution Conv_185 1 1 389 390 0=96 1=3 4=1 5=1 6=82944
PReLU PRelu_186 1 1 390 392 0=96
Convolution Conv_187 1 1 392 393 0=96 1=3 4=1 5=1 6=82944
PReLU PRelu_188 1 1 393 395 0=96
Convolution Conv_189 1 1 395 396 0=96 1=3 4=1 5=1 6=82944
PReLU PRelu_190 1 1 396 398 0=96
Convolution Conv_191 1 1 398 399 0=96 1=3 4=1 5=1 6=82944
PReLU PRelu_192 1 1 399 401 0=96
Deconvolution ConvTranspose_193 1 1 401 402 0=4 1=4 3=2 4=1 5=1 6=6144
BinaryOp Add_194 2 1 149_splitncnn_0 239_splitncnn_0 403
BinaryOp Add_195 2 1 403 330_splitncnn_0 404
BinaryOp Add_196 2 1 404 402 flow

BIN
models/rife/rife-v2.3/fusionnet.bin vendored Normal file

Binary file not shown.

74
models/rife/rife-v2.3/fusionnet.param vendored Normal file
View File

@ -0,0 +1,74 @@
7767517
72 81
Input img0 0 1 img0
Input img1 0 1 img1
Input flow 0 1 flow
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 flow 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
rife.Warp Warp_14 2 1 img0 71 77
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
rife.Warp Warp_14 2 1 img1 82 88
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 output 0=0.000000e+00 1=1.000000e+00

BIN
models/rife/rife-v2.4/contextnet.bin vendored Normal file

Binary file not shown.

42
models/rife/rife-v2.4/contextnet.param vendored Normal file
View File

@ -0,0 +1,42 @@
7767517
40 46
Input input.1 0 1 input.1
Input flow.0 0 1 flow.0
Convolution Conv_0 1 1 input.1 32 0=32 1=3 3=2 4=1 5=1 6=864
PReLU PRelu_1 1 1 32 34 0=32
Convolution Conv_2 1 1 34 35 0=32 1=3 4=1 5=1 6=9216
PReLU PRelu_3 1 1 35 37 0=32
Convolution Conv_4 1 1 37 38 0=32 1=3 3=2 4=1 5=1 6=9216
PReLU PRelu_5 1 1 38 40 0=32
Convolution Conv_6 1 1 40 41 0=32 1=3 4=1 5=1 6=9216
PReLU PRelu_7 1 1 41 43 0=32
Split splitncnn_0 1 2 43 43_splitncnn_0 43_splitncnn_1
Interp Resize_9 1 1 flow.0 53 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_11 1 1 53 55 0=2 1=1 2=5.000000e-01
Split splitncnn_1 1 2 55 55_splitncnn_0 55_splitncnn_1
rife.Warp Warp_17 2 1 43_splitncnn_1 55_splitncnn_1 f1
Convolution Conv_18 1 1 43_splitncnn_0 62 0=64 1=3 3=2 4=1 5=1 6=18432
PReLU PRelu_19 1 1 62 64 0=64
Convolution Conv_20 1 1 64 65 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_21 1 1 65 67 0=64
Split splitncnn_2 1 2 67 67_splitncnn_0 67_splitncnn_1
Interp Resize_23 1 1 55_splitncnn_0 77 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_25 1 1 77 79 0=2 1=1 2=5.000000e-01
Split splitncnn_3 1 2 79 79_splitncnn_0 79_splitncnn_1
rife.Warp Warp_31 2 1 67_splitncnn_1 79_splitncnn_1 f2
Convolution Conv_32 1 1 67_splitncnn_0 86 0=128 1=3 3=2 4=1 5=1 6=73728
PReLU PRelu_33 1 1 86 88 0=128
Convolution Conv_34 1 1 88 89 0=128 1=3 4=1 5=1 6=147456
PReLU PRelu_35 1 1 89 91 0=128
Split splitncnn_4 1 2 91 91_splitncnn_0 91_splitncnn_1
Interp Resize_37 1 1 79_splitncnn_0 101 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_39 1 1 101 103 0=2 1=1 2=5.000000e-01
Split splitncnn_5 1 2 103 103_splitncnn_0 103_splitncnn_1
rife.Warp Warp_31a 2 1 91_splitncnn_1 103_splitncnn_1 f3
Convolution Conv_46 1 1 91_splitncnn_0 110 0=256 1=3 3=2 4=1 5=1 6=294912
PReLU PRelu_47 1 1 110 112 0=256
Convolution Conv_48 1 1 112 113 0=256 1=3 4=1 5=1 6=589824
PReLU PRelu_49 1 1 113 115 0=256
Interp Resize_51 1 1 103_splitncnn_0 125 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_53 1 1 125 127 0=2 1=1 2=5.000000e-01
rife.Warp Warp_ss 2 1 115 127 f4

BIN
models/rife/rife-v2.4/flownet.bin vendored Normal file

Binary file not shown.

119
models/rife/rife-v2.4/flownet.param vendored Normal file
View File

@ -0,0 +1,119 @@
7767517
117 135
Input input0 0 1 input0
Input input1 0 1 input1
Concat input.1 2 1 input0 input1 input.1
Split splitncnn_input0 1 7 input.1 input.1_splitncnn_0 input.1_splitncnn_1 input.1_splitncnn_2 input.1_splitncnn_3 input.1_splitncnn_4 input.1_splitncnn_5 input.1_splitncnn_6
Interp Resize_1 1 1 input.1_splitncnn_6 114 0=2 1=1.250000e-01 2=1.250000e-01
Convolution Conv_2 1 1 114 115 0=192 1=3 3=2 4=1 5=1 6=10368
PReLU PRelu_3 1 1 115 117 0=192
Convolution Conv_4 1 1 117 118 0=384 1=3 3=2 4=1 5=1 6=663552
PReLU PRelu_5 1 1 118 120 0=384
Convolution Conv_6 1 1 120 121 0=384 1=3 4=1 5=1 6=1327104
PReLU PRelu_7 1 1 121 123 0=384
Convolution Conv_8 1 1 123 124 0=384 1=3 4=1 5=1 6=1327104
PReLU PRelu_9 1 1 124 126 0=384
Convolution Conv_10 1 1 126 127 0=384 1=3 4=1 5=1 6=1327104
PReLU PRelu_11 1 1 127 129 0=384
Convolution Conv_12 1 1 129 130 0=384 1=3 4=1 5=1 6=1327104
PReLU PRelu_13 1 1 130 132 0=384
Convolution Conv_14 1 1 132 133 0=384 1=3 4=1 5=1 6=1327104
PReLU PRelu_15 1 1 133 135 0=384
Convolution Conv_16 1 1 135 136 0=384 1=3 4=1 5=1 6=1327104
PReLU PRelu_17 1 1 136 138 0=384
Deconvolution ConvTranspose_18 1 1 138 139 0=4 1=4 3=2 4=1 5=1 6=24576
Interp Resize_20 1 1 139 149 0=2 1=8.000000e+00 2=8.000000e+00
Split splitncnn_0 1 4 149 149_splitncnn_0 149_splitncnn_1 149_splitncnn_2 149_splitncnn_3
Interp Resize_22 1 1 149_splitncnn_3 159 0=2 1=2.000000e+00 2=2.000000e+00
BinaryOp Mul_24 1 1 159 161 0=2 1=1 2=2.000000e+00
Split splitncnn_1 1 3 161 161_splitncnn_0 161_splitncnn_1 161_splitncnn_2
Crop Slice_29 1 1 input.1_splitncnn_5 166 -23309=1,0 -23310=1,3 -23311=1,0
Crop Slice_34 1 1 161_splitncnn_2 171 -23309=1,0 -23310=1,2 -23311=1,0
rife.Warp Warp_40 2 1 166 171 177
Crop Slice_45 1 1 input.1_splitncnn_4 182 -23309=1,3 -23310=1,2147483647 -23311=1,0
Crop Slice_50 1 1 161_splitncnn_1 187 -23309=1,2 -23310=1,4 -23311=1,0
rife.Warp Warp_56 2 1 182 187 193
Concat Concat_57 3 1 177 193 161_splitncnn_0 194
Interp Resize_59 1 1 194 204 0=2 1=2.500000e-01 2=2.500000e-01
Convolution Conv_60 1 1 204 205 0=128 1=3 3=2 4=1 5=1 6=11520
PReLU PRelu_61 1 1 205 207 0=128
Convolution Conv_62 1 1 207 208 0=256 1=3 3=2 4=1 5=1 6=294912
PReLU PRelu_63 1 1 208 210 0=256
Convolution Conv_64 1 1 210 211 0=256 1=3 4=1 5=1 6=589824
PReLU PRelu_65 1 1 211 213 0=256
Convolution Conv_66 1 1 213 214 0=256 1=3 4=1 5=1 6=589824
PReLU PRelu_67 1 1 214 216 0=256
Convolution Conv_68 1 1 216 217 0=256 1=3 4=1 5=1 6=589824
PReLU PRelu_69 1 1 217 219 0=256
Convolution Conv_70 1 1 219 220 0=256 1=3 4=1 5=1 6=589824
PReLU PRelu_71 1 1 220 222 0=256
Convolution Conv_72 1 1 222 223 0=256 1=3 4=1 5=1 6=589824
PReLU PRelu_73 1 1 223 225 0=256
Convolution Conv_74 1 1 225 226 0=256 1=3 4=1 5=1 6=589824
PReLU PRelu_75 1 1 226 228 0=256
Deconvolution ConvTranspose_76 1 1 228 229 0=4 1=4 3=2 4=1 5=1 6=16384
Interp Resize_78 1 1 229 239 0=2 1=4.000000e+00 2=4.000000e+00
Split splitncnn_2 1 3 239 239_splitncnn_0 239_splitncnn_1 239_splitncnn_2
BinaryOp Add_79 2 1 149_splitncnn_2 239_splitncnn_2 240
Interp Resize_81 1 1 240 250 0=2 1=2.000000e+00 2=2.000000e+00
BinaryOp Mul_83 1 1 250 252 0=2 1=1 2=2.000000e+00
Split splitncnn_3 1 3 252 252_splitncnn_0 252_splitncnn_1 252_splitncnn_2
Crop Slice_88 1 1 input.1_splitncnn_3 257 -23309=1,0 -23310=1,3 -23311=1,0
Crop Slice_93 1 1 252_splitncnn_2 262 -23309=1,0 -23310=1,2 -23311=1,0
rife.Warp Warp_99 2 1 257 262 268
Crop Slice_104 1 1 input.1_splitncnn_2 273 -23309=1,3 -23310=1,2147483647 -23311=1,0
Crop Slice_109 1 1 252_splitncnn_1 278 -23309=1,2 -23310=1,4 -23311=1,0
rife.Warp Warp_115 2 1 273 278 284
Concat Concat_116 3 1 268 284 252_splitncnn_0 285
Interp Resize_118 1 1 285 295 0=2 1=5.000000e-01 2=5.000000e-01
Convolution Conv_119 1 1 295 296 0=96 1=3 3=2 4=1 5=1 6=8640
PReLU PRelu_120 1 1 296 298 0=96
Convolution Conv_121 1 1 298 299 0=192 1=3 3=2 4=1 5=1 6=165888
PReLU PRelu_122 1 1 299 301 0=192
Convolution Conv_123 1 1 301 302 0=192 1=3 4=1 5=1 6=331776
PReLU PRelu_124 1 1 302 304 0=192
Convolution Conv_125 1 1 304 305 0=192 1=3 4=1 5=1 6=331776
PReLU PRelu_126 1 1 305 307 0=192
Convolution Conv_127 1 1 307 308 0=192 1=3 4=1 5=1 6=331776
PReLU PRelu_128 1 1 308 310 0=192
Convolution Conv_129 1 1 310 311 0=192 1=3 4=1 5=1 6=331776
PReLU PRelu_130 1 1 311 313 0=192
Convolution Conv_131 1 1 313 314 0=192 1=3 4=1 5=1 6=331776
PReLU PRelu_132 1 1 314 316 0=192
Convolution Conv_133 1 1 316 317 0=192 1=3 4=1 5=1 6=331776
PReLU PRelu_134 1 1 317 319 0=192
Deconvolution ConvTranspose_135 1 1 319 320 0=4 1=4 3=2 4=1 5=1 6=12288
Interp Resize_137 1 1 320 330 0=2 1=2.000000e+00 2=2.000000e+00
Split splitncnn_4 1 2 330 330_splitncnn_0 330_splitncnn_1
BinaryOp Add_138 2 1 149_splitncnn_1 239_splitncnn_1 331
BinaryOp Add_139 2 1 331 330_splitncnn_1 332
Interp Resize_141 1 1 332 342 0=2 1=2.000000e+00 2=2.000000e+00
BinaryOp Mul_143 1 1 342 344 0=2 1=1 2=2.000000e+00
Split splitncnn_5 1 3 344 344_splitncnn_0 344_splitncnn_1 344_splitncnn_2
Crop Slice_148 1 1 input.1_splitncnn_1 349 -23309=1,0 -23310=1,3 -23311=1,0
Crop Slice_153 1 1 344_splitncnn_2 354 -23309=1,0 -23310=1,2 -23311=1,0
rife.Warp Warp_159 2 1 349 354 360
Crop Slice_164 1 1 input.1_splitncnn_0 365 -23309=1,3 -23310=1,2147483647 -23311=1,0
Crop Slice_169 1 1 344_splitncnn_1 370 -23309=1,2 -23310=1,4 -23311=1,0
rife.Warp Warp_175 2 1 365 370 376
Concat Concat_176 3 1 360 376 344_splitncnn_0 377
Convolution Conv_177 1 1 377 378 0=48 1=3 3=2 4=1 5=1 6=4320
PReLU PRelu_178 1 1 378 380 0=48
Convolution Conv_179 1 1 380 381 0=96 1=3 3=2 4=1 5=1 6=41472
PReLU PRelu_180 1 1 381 383 0=96
Convolution Conv_181 1 1 383 384 0=96 1=3 4=1 5=1 6=82944
PReLU PRelu_182 1 1 384 386 0=96
Convolution Conv_183 1 1 386 387 0=96 1=3 4=1 5=1 6=82944
PReLU PRelu_184 1 1 387 389 0=96
Convolution Conv_185 1 1 389 390 0=96 1=3 4=1 5=1 6=82944
PReLU PRelu_186 1 1 390 392 0=96
Convolution Conv_187 1 1 392 393 0=96 1=3 4=1 5=1 6=82944
PReLU PRelu_188 1 1 393 395 0=96
Convolution Conv_189 1 1 395 396 0=96 1=3 4=1 5=1 6=82944
PReLU PRelu_190 1 1 396 398 0=96
Convolution Conv_191 1 1 398 399 0=96 1=3 4=1 5=1 6=82944
PReLU PRelu_192 1 1 399 401 0=96
Deconvolution ConvTranspose_193 1 1 401 402 0=4 1=4 3=2 4=1 5=1 6=6144
BinaryOp Add_194 2 1 149_splitncnn_0 239_splitncnn_0 403
BinaryOp Add_195 2 1 403 330_splitncnn_0 404
BinaryOp Add_196 2 1 404 402 flow

BIN
models/rife/rife-v2.4/fusionnet.bin vendored Normal file

Binary file not shown.

74
models/rife/rife-v2.4/fusionnet.param vendored Normal file
View File

@ -0,0 +1,74 @@
7767517
72 81
Input img0 0 1 img0
Input img1 0 1 img1
Input flow 0 1 flow
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 flow 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
rife.Warp Warp_14 2 1 img0 71 77
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
rife.Warp Warp_14 2 1 img1 82 88
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 output 0=0.000000e+00 1=1.000000e+00

BIN
models/rife/rife-v2/contextnet.bin vendored Normal file

Binary file not shown.

42
models/rife/rife-v2/contextnet.param vendored Normal file
View File

@ -0,0 +1,42 @@
7767517
40 46
Input input.1 0 1 input.1
Input flow.0 0 1 flow.0
Convolution Conv_0 1 1 input.1 32 0=32 1=3 3=2 4=1 5=1 6=864
PReLU PRelu_1 1 1 32 34 0=32
Convolution Conv_2 1 1 34 35 0=32 1=3 4=1 5=1 6=9216
PReLU PRelu_3 1 1 35 37 0=32
Convolution Conv_4 1 1 37 38 0=32 1=3 3=2 4=1 5=1 6=9216
PReLU PRelu_5 1 1 38 40 0=32
Convolution Conv_6 1 1 40 41 0=32 1=3 4=1 5=1 6=9216
PReLU PRelu_7 1 1 41 43 0=32
Split splitncnn_0 1 2 43 43_splitncnn_0 43_splitncnn_1
Interp Resize_9 1 1 flow.0 53 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_11 1 1 53 55 0=2 1=1 2=5.000000e-01
Split splitncnn_1 1 2 55 55_splitncnn_0 55_splitncnn_1
rife.Warp Warp_17 2 1 43_splitncnn_1 55_splitncnn_1 f1
Convolution Conv_18 1 1 43_splitncnn_0 62 0=64 1=3 3=2 4=1 5=1 6=18432
PReLU PRelu_19 1 1 62 64 0=64
Convolution Conv_20 1 1 64 65 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_21 1 1 65 67 0=64
Split splitncnn_2 1 2 67 67_splitncnn_0 67_splitncnn_1
Interp Resize_23 1 1 55_splitncnn_0 77 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_25 1 1 77 79 0=2 1=1 2=5.000000e-01
Split splitncnn_3 1 2 79 79_splitncnn_0 79_splitncnn_1
rife.Warp Warp_31 2 1 67_splitncnn_1 79_splitncnn_1 f2
Convolution Conv_32 1 1 67_splitncnn_0 86 0=128 1=3 3=2 4=1 5=1 6=73728
PReLU PRelu_33 1 1 86 88 0=128
Convolution Conv_34 1 1 88 89 0=128 1=3 4=1 5=1 6=147456
PReLU PRelu_35 1 1 89 91 0=128
Split splitncnn_4 1 2 91 91_splitncnn_0 91_splitncnn_1
Interp Resize_37 1 1 79_splitncnn_0 101 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_39 1 1 101 103 0=2 1=1 2=5.000000e-01
Split splitncnn_5 1 2 103 103_splitncnn_0 103_splitncnn_1
rife.Warp Warp_31a 2 1 91_splitncnn_1 103_splitncnn_1 f3
Convolution Conv_46 1 1 91_splitncnn_0 110 0=256 1=3 3=2 4=1 5=1 6=294912
PReLU PRelu_47 1 1 110 112 0=256
Convolution Conv_48 1 1 112 113 0=256 1=3 4=1 5=1 6=589824
PReLU PRelu_49 1 1 113 115 0=256
Interp Resize_51 1 1 103_splitncnn_0 125 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_53 1 1 125 127 0=2 1=1 2=5.000000e-01
rife.Warp Warp_ss 2 1 115 127 f4

BIN
models/rife/rife-v2/flownet.bin vendored Normal file

Binary file not shown.

119
models/rife/rife-v2/flownet.param vendored Normal file
View File

@ -0,0 +1,119 @@
7767517
117 135
Input input0 0 1 input0
Input input1 0 1 input1
Concat input.1 2 1 input0 input1 input.1
Split splitncnn_input0 1 7 input.1 input.1_splitncnn_0 input.1_splitncnn_1 input.1_splitncnn_2 input.1_splitncnn_3 input.1_splitncnn_4 input.1_splitncnn_5 input.1_splitncnn_6
Interp Resize_1 1 1 input.1_splitncnn_6 114 0=2 1=1.250000e-01 2=1.250000e-01
Convolution Conv_2 1 1 114 115 0=192 1=3 3=2 4=1 5=1 6=10368
PReLU PRelu_3 1 1 115 117 0=192
Convolution Conv_4 1 1 117 118 0=384 1=3 3=2 4=1 5=1 6=663552
PReLU PRelu_5 1 1 118 120 0=384
Convolution Conv_6 1 1 120 121 0=384 1=3 4=1 5=1 6=1327104
PReLU PRelu_7 1 1 121 123 0=384
Convolution Conv_8 1 1 123 124 0=384 1=3 4=1 5=1 6=1327104
PReLU PRelu_9 1 1 124 126 0=384
Convolution Conv_10 1 1 126 127 0=384 1=3 4=1 5=1 6=1327104
PReLU PRelu_11 1 1 127 129 0=384
Convolution Conv_12 1 1 129 130 0=384 1=3 4=1 5=1 6=1327104
PReLU PRelu_13 1 1 130 132 0=384
Convolution Conv_14 1 1 132 133 0=384 1=3 4=1 5=1 6=1327104
PReLU PRelu_15 1 1 133 135 0=384
Convolution Conv_16 1 1 135 136 0=384 1=3 4=1 5=1 6=1327104
PReLU PRelu_17 1 1 136 138 0=384
Deconvolution ConvTranspose_18 1 1 138 139 0=4 1=4 3=2 4=1 5=1 6=24576
Interp Resize_20 1 1 139 149 0=2 1=8.000000e+00 2=8.000000e+00
Split splitncnn_0 1 4 149 149_splitncnn_0 149_splitncnn_1 149_splitncnn_2 149_splitncnn_3
Interp Resize_22 1 1 149_splitncnn_3 159 0=2 1=2.000000e+00 2=2.000000e+00
BinaryOp Mul_24 1 1 159 161 0=2 1=1 2=2.000000e+00
Split splitncnn_1 1 3 161 161_splitncnn_0 161_splitncnn_1 161_splitncnn_2
Crop Slice_29 1 1 input.1_splitncnn_5 166 -23309=1,0 -23310=1,3 -23311=1,0
Crop Slice_34 1 1 161_splitncnn_2 171 -23309=1,0 -23310=1,2 -23311=1,0
rife.Warp Warp_40 2 1 166 171 177
Crop Slice_45 1 1 input.1_splitncnn_4 182 -23309=1,3 -23310=1,2147483647 -23311=1,0
Crop Slice_50 1 1 161_splitncnn_1 187 -23309=1,2 -23310=1,4 -23311=1,0
rife.Warp Warp_56 2 1 182 187 193
Concat Concat_57 3 1 177 193 161_splitncnn_0 194
Interp Resize_59 1 1 194 204 0=2 1=2.500000e-01 2=2.500000e-01
Convolution Conv_60 1 1 204 205 0=128 1=3 3=2 4=1 5=1 6=11520
PReLU PRelu_61 1 1 205 207 0=128
Convolution Conv_62 1 1 207 208 0=256 1=3 3=2 4=1 5=1 6=294912
PReLU PRelu_63 1 1 208 210 0=256
Convolution Conv_64 1 1 210 211 0=256 1=3 4=1 5=1 6=589824
PReLU PRelu_65 1 1 211 213 0=256
Convolution Conv_66 1 1 213 214 0=256 1=3 4=1 5=1 6=589824
PReLU PRelu_67 1 1 214 216 0=256
Convolution Conv_68 1 1 216 217 0=256 1=3 4=1 5=1 6=589824
PReLU PRelu_69 1 1 217 219 0=256
Convolution Conv_70 1 1 219 220 0=256 1=3 4=1 5=1 6=589824
PReLU PRelu_71 1 1 220 222 0=256
Convolution Conv_72 1 1 222 223 0=256 1=3 4=1 5=1 6=589824
PReLU PRelu_73 1 1 223 225 0=256
Convolution Conv_74 1 1 225 226 0=256 1=3 4=1 5=1 6=589824
PReLU PRelu_75 1 1 226 228 0=256
Deconvolution ConvTranspose_76 1 1 228 229 0=4 1=4 3=2 4=1 5=1 6=16384
Interp Resize_78 1 1 229 239 0=2 1=4.000000e+00 2=4.000000e+00
Split splitncnn_2 1 3 239 239_splitncnn_0 239_splitncnn_1 239_splitncnn_2
BinaryOp Add_79 2 1 149_splitncnn_2 239_splitncnn_2 240
Interp Resize_81 1 1 240 250 0=2 1=2.000000e+00 2=2.000000e+00
BinaryOp Mul_83 1 1 250 252 0=2 1=1 2=2.000000e+00
Split splitncnn_3 1 3 252 252_splitncnn_0 252_splitncnn_1 252_splitncnn_2
Crop Slice_88 1 1 input.1_splitncnn_3 257 -23309=1,0 -23310=1,3 -23311=1,0
Crop Slice_93 1 1 252_splitncnn_2 262 -23309=1,0 -23310=1,2 -23311=1,0
rife.Warp Warp_99 2 1 257 262 268
Crop Slice_104 1 1 input.1_splitncnn_2 273 -23309=1,3 -23310=1,2147483647 -23311=1,0
Crop Slice_109 1 1 252_splitncnn_1 278 -23309=1,2 -23310=1,4 -23311=1,0
rife.Warp Warp_115 2 1 273 278 284
Concat Concat_116 3 1 268 284 252_splitncnn_0 285
Interp Resize_118 1 1 285 295 0=2 1=5.000000e-01 2=5.000000e-01
Convolution Conv_119 1 1 295 296 0=96 1=3 3=2 4=1 5=1 6=8640
PReLU PRelu_120 1 1 296 298 0=96
Convolution Conv_121 1 1 298 299 0=192 1=3 3=2 4=1 5=1 6=165888
PReLU PRelu_122 1 1 299 301 0=192
Convolution Conv_123 1 1 301 302 0=192 1=3 4=1 5=1 6=331776
PReLU PRelu_124 1 1 302 304 0=192
Convolution Conv_125 1 1 304 305 0=192 1=3 4=1 5=1 6=331776
PReLU PRelu_126 1 1 305 307 0=192
Convolution Conv_127 1 1 307 308 0=192 1=3 4=1 5=1 6=331776
PReLU PRelu_128 1 1 308 310 0=192
Convolution Conv_129 1 1 310 311 0=192 1=3 4=1 5=1 6=331776
PReLU PRelu_130 1 1 311 313 0=192
Convolution Conv_131 1 1 313 314 0=192 1=3 4=1 5=1 6=331776
PReLU PRelu_132 1 1 314 316 0=192
Convolution Conv_133 1 1 316 317 0=192 1=3 4=1 5=1 6=331776
PReLU PRelu_134 1 1 317 319 0=192
Deconvolution ConvTranspose_135 1 1 319 320 0=4 1=4 3=2 4=1 5=1 6=12288
Interp Resize_137 1 1 320 330 0=2 1=2.000000e+00 2=2.000000e+00
Split splitncnn_4 1 2 330 330_splitncnn_0 330_splitncnn_1
BinaryOp Add_138 2 1 149_splitncnn_1 239_splitncnn_1 331
BinaryOp Add_139 2 1 331 330_splitncnn_1 332
Interp Resize_141 1 1 332 342 0=2 1=2.000000e+00 2=2.000000e+00
BinaryOp Mul_143 1 1 342 344 0=2 1=1 2=2.000000e+00
Split splitncnn_5 1 3 344 344_splitncnn_0 344_splitncnn_1 344_splitncnn_2
Crop Slice_148 1 1 input.1_splitncnn_1 349 -23309=1,0 -23310=1,3 -23311=1,0
Crop Slice_153 1 1 344_splitncnn_2 354 -23309=1,0 -23310=1,2 -23311=1,0
rife.Warp Warp_159 2 1 349 354 360
Crop Slice_164 1 1 input.1_splitncnn_0 365 -23309=1,3 -23310=1,2147483647 -23311=1,0
Crop Slice_169 1 1 344_splitncnn_1 370 -23309=1,2 -23310=1,4 -23311=1,0
rife.Warp Warp_175 2 1 365 370 376
Concat Concat_176 3 1 360 376 344_splitncnn_0 377
Convolution Conv_177 1 1 377 378 0=48 1=3 3=2 4=1 5=1 6=4320
PReLU PRelu_178 1 1 378 380 0=48
Convolution Conv_179 1 1 380 381 0=96 1=3 3=2 4=1 5=1 6=41472
PReLU PRelu_180 1 1 381 383 0=96
Convolution Conv_181 1 1 383 384 0=96 1=3 4=1 5=1 6=82944
PReLU PRelu_182 1 1 384 386 0=96
Convolution Conv_183 1 1 386 387 0=96 1=3 4=1 5=1 6=82944
PReLU PRelu_184 1 1 387 389 0=96
Convolution Conv_185 1 1 389 390 0=96 1=3 4=1 5=1 6=82944
PReLU PRelu_186 1 1 390 392 0=96
Convolution Conv_187 1 1 392 393 0=96 1=3 4=1 5=1 6=82944
PReLU PRelu_188 1 1 393 395 0=96
Convolution Conv_189 1 1 395 396 0=96 1=3 4=1 5=1 6=82944
PReLU PRelu_190 1 1 396 398 0=96
Convolution Conv_191 1 1 398 399 0=96 1=3 4=1 5=1 6=82944
PReLU PRelu_192 1 1 399 401 0=96
Deconvolution ConvTranspose_193 1 1 401 402 0=4 1=4 3=2 4=1 5=1 6=6144
BinaryOp Add_194 2 1 149_splitncnn_0 239_splitncnn_0 403
BinaryOp Add_195 2 1 403 330_splitncnn_0 404
BinaryOp Add_196 2 1 404 402 flow

BIN
models/rife/rife-v2/fusionnet.bin vendored Normal file

Binary file not shown.

74
models/rife/rife-v2/fusionnet.param vendored Normal file
View File

@ -0,0 +1,74 @@
7767517
72 81
Input img0 0 1 img0
Input img1 0 1 img1
Input flow 0 1 flow
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 flow 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
rife.Warp Warp_14 2 1 img0 71 77
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
rife.Warp Warp_14 2 1 img1 82 88
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 output 0=0.000000e+00 1=1.000000e+00

BIN
models/rife/rife-v3.0/contextnet.bin vendored Normal file

Binary file not shown.

42
models/rife/rife-v3.0/contextnet.param vendored Normal file
View File

@ -0,0 +1,42 @@
7767517
40 46
Input input.1 0 1 input.1
Input flow.0 0 1 flow.0
Convolution Conv_0 1 1 input.1 32 0=32 1=3 3=2 4=1 5=1 6=864
PReLU PRelu_1 1 1 32 34 0=32
Convolution Conv_2 1 1 34 35 0=32 1=3 4=1 5=1 6=9216
PReLU PRelu_3 1 1 35 37 0=32
Convolution Conv_4 1 1 37 38 0=32 1=3 3=2 4=1 5=1 6=9216
PReLU PRelu_5 1 1 38 40 0=32
Convolution Conv_6 1 1 40 41 0=32 1=3 4=1 5=1 6=9216
PReLU PRelu_7 1 1 41 43 0=32
Split splitncnn_0 1 2 43 43_splitncnn_0 43_splitncnn_1
Interp Resize_9 1 1 flow.0 53 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_11 1 1 53 55 0=2 1=1 2=5.000000e-01
Split splitncnn_1 1 2 55 55_splitncnn_0 55_splitncnn_1
rife.Warp Warp_17 2 1 43_splitncnn_1 55_splitncnn_1 f1
Convolution Conv_18 1 1 43_splitncnn_0 62 0=64 1=3 3=2 4=1 5=1 6=18432
PReLU PRelu_19 1 1 62 64 0=64
Convolution Conv_20 1 1 64 65 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_21 1 1 65 67 0=64
Split splitncnn_2 1 2 67 67_splitncnn_0 67_splitncnn_1
Interp Resize_23 1 1 55_splitncnn_0 77 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_25 1 1 77 79 0=2 1=1 2=5.000000e-01
Split splitncnn_3 1 2 79 79_splitncnn_0 79_splitncnn_1
rife.Warp Warp_31 2 1 67_splitncnn_1 79_splitncnn_1 f2
Convolution Conv_32 1 1 67_splitncnn_0 86 0=128 1=3 3=2 4=1 5=1 6=73728
PReLU PRelu_33 1 1 86 88 0=128
Convolution Conv_34 1 1 88 89 0=128 1=3 4=1 5=1 6=147456
PReLU PRelu_35 1 1 89 91 0=128
Split splitncnn_4 1 2 91 91_splitncnn_0 91_splitncnn_1
Interp Resize_37 1 1 79_splitncnn_0 101 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_39 1 1 101 103 0=2 1=1 2=5.000000e-01
Split splitncnn_5 1 2 103 103_splitncnn_0 103_splitncnn_1
rife.Warp Warp_45 2 1 91_splitncnn_1 103_splitncnn_1 f3
Convolution Conv_46 1 1 91_splitncnn_0 110 0=256 1=3 3=2 4=1 5=1 6=294912
PReLU PRelu_47 1 1 110 112 0=256
Convolution Conv_48 1 1 112 113 0=256 1=3 4=1 5=1 6=589824
PReLU PRelu_49 1 1 113 115 0=256
Interp Resize_51 1 1 103_splitncnn_0 125 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_53 1 1 125 127 0=2 1=1 2=5.000000e-01
rife.Warp Warp_59 2 1 115 127 f4

BIN
models/rife/rife-v3.0/flownet.bin vendored Normal file

Binary file not shown.

114
models/rife/rife-v3.0/flownet.param vendored Normal file
View File

@ -0,0 +1,114 @@
7767517
112 132
Input input0 0 1 input0
Input input1 0 1 input1
Concat input.1 2 1 input0 input1 input.1
Interp Resize_1 1 1 input.1 88 0=2
Split splitncnn_0 1 5 88 88_splitncnn_0 88_splitncnn_1 88_splitncnn_2 88_splitncnn_3 88_splitncnn_4
Interp Resize_3 1 1 88_splitncnn_4 98 0=2 1=2.500000e-01 2=2.500000e-01
Convolution Conv_4 1 1 98 99 0=80 1=3 3=2 4=1 5=1 6=4320
PReLU PRelu_5 1 1 99 101 0=80
Convolution Conv_6 1 1 101 102 0=160 1=3 3=2 4=1 5=1 6=115200
PReLU PRelu_7 1 1 102 104 0=160
Split splitncnn_1 1 2 104 104_splitncnn_0 104_splitncnn_1
Convolution Conv_8 1 1 104_splitncnn_1 105 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_9 1 1 105 107 0=160
Convolution Conv_10 1 1 107 108 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_11 1 1 108 110 0=160
BinaryOp Add_12 2 1 110 104_splitncnn_0 111
Split splitncnn_2 1 2 111 111_splitncnn_0 111_splitncnn_1
Convolution Conv_13 1 1 111_splitncnn_1 112 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_14 1 1 112 114 0=160
Convolution Conv_15 1 1 114 115 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_16 1 1 115 117 0=160
BinaryOp Add_17 2 1 117 111_splitncnn_0 118
Split splitncnn_3 1 2 118 118_splitncnn_0 118_splitncnn_1
Convolution Conv_18 1 1 118_splitncnn_1 119 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_19 1 1 119 121 0=160
Convolution Conv_20 1 1 121 122 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_21 1 1 122 124 0=160
BinaryOp Add_22 2 1 124 118_splitncnn_0 125
Deconvolution ConvTranspose_23 1 1 125 126 0=4 1=4 3=2 4=1 5=1 6=10240
Interp Resize_25 1 1 126 136 0=2 1=4.000000e+00 2=4.000000e+00
BinaryOp Mul_27 1 1 136 138 0=2 1=1 2=4.000000e+00
Split splitncnn_4 1 3 138 138_splitncnn_0 138_splitncnn_1 138_splitncnn_2
Interp Resize_29 1 1 138_splitncnn_2 148 0=2 1=2.000000e+00 2=2.000000e+00
BinaryOp Mul_31 1 1 148 150 0=2 1=1 2=2.000000e+00
Split splitncnn_5 1 3 150 150_splitncnn_0 150_splitncnn_1 150_splitncnn_2
Crop Slice_36 1 1 88_splitncnn_3 155 -23309=1,0 -23310=1,3 -23311=1,0
Crop Slice_41 1 1 150_splitncnn_2 160 -23309=1,0 -23310=1,2 -23311=1,0
rife.Warp Warp_47 2 1 155 160 166
Crop Slice_52 1 1 88_splitncnn_2 171 -23309=1,3 -23310=1,2147483647 -23311=1,0
Crop Slice_57 1 1 150_splitncnn_1 176 -23309=1,2 -23310=1,4 -23311=1,0
rife.Warp Warp_63 2 1 171 176 182
Concat Concat_64 2 1 166 182 183
Interp Resize_66 1 1 183 193 0=2 1=5.000000e-01 2=5.000000e-01
Interp Resize_68 1 1 150_splitncnn_0 203 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_70 1 1 203 205 0=2 1=1 2=5.000000e-01
Concat Concat_71 2 1 193 205 206
Convolution Conv_72 1 1 206 207 0=80 1=3 3=2 4=1 5=1 6=7200
PReLU PRelu_73 1 1 207 209 0=80
Convolution Conv_74 1 1 209 210 0=160 1=3 3=2 4=1 5=1 6=115200
PReLU PRelu_75 1 1 210 212 0=160
Split splitncnn_6 1 2 212 212_splitncnn_0 212_splitncnn_1
Convolution Conv_76 1 1 212_splitncnn_1 213 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_77 1 1 213 215 0=160
Convolution Conv_78 1 1 215 216 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_79 1 1 216 218 0=160
BinaryOp Add_80 2 1 218 212_splitncnn_0 219
Split splitncnn_7 1 2 219 219_splitncnn_0 219_splitncnn_1
Convolution Conv_81 1 1 219_splitncnn_1 220 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_82 1 1 220 222 0=160
Convolution Conv_83 1 1 222 223 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_84 1 1 223 225 0=160
BinaryOp Add_85 2 1 225 219_splitncnn_0 226
Split splitncnn_8 1 2 226 226_splitncnn_0 226_splitncnn_1
Convolution Conv_86 1 1 226_splitncnn_1 227 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_87 1 1 227 229 0=160
Convolution Conv_88 1 1 229 230 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_89 1 1 230 232 0=160
BinaryOp Add_90 2 1 232 226_splitncnn_0 233
Deconvolution ConvTranspose_91 1 1 233 234 0=4 1=4 3=2 4=1 5=1 6=10240
Interp Resize_93 1 1 234 244 0=2 1=2.000000e+00 2=2.000000e+00
BinaryOp Mul_95 1 1 244 246 0=2 1=1 2=2.000000e+00
Split splitncnn_9 1 2 246 246_splitncnn_0 246_splitncnn_1
BinaryOp Add_96 2 1 138_splitncnn_1 246_splitncnn_1 247
Interp Resize_98 1 1 247 257 0=2 1=2.000000e+00 2=2.000000e+00
BinaryOp Mul_100 1 1 257 259 0=2 1=1 2=2.000000e+00
Split splitncnn_10 1 3 259 259_splitncnn_0 259_splitncnn_1 259_splitncnn_2
Crop Slice_105 1 1 88_splitncnn_1 264 -23309=1,0 -23310=1,3 -23311=1,0
Crop Slice_110 1 1 259_splitncnn_2 269 -23309=1,0 -23310=1,2 -23311=1,0
rife.Warp Warp_116 2 1 264 269 275
Crop Slice_121 1 1 88_splitncnn_0 280 -23309=1,3 -23310=1,2147483647 -23311=1,0
Crop Slice_126 1 1 259_splitncnn_1 285 -23309=1,2 -23310=1,4 -23311=1,0
rife.Warp Warp_132 2 1 280 285 291
Concat Concat_133 2 1 275 291 292
Interp Resize_135 1 1 292 302 0=2
Interp Resize_137 1 1 259_splitncnn_0 312 0=2
BinaryOp Mul_139 1 1 312 314 0=2 1=1 2=1.000000e+00
Concat Concat_140 2 1 302 314 315
Convolution Conv_141 1 1 315 316 0=80 1=3 3=2 4=1 5=1 6=7200
PReLU PRelu_142 1 1 316 318 0=80
Convolution Conv_143 1 1 318 319 0=160 1=3 3=2 4=1 5=1 6=115200
PReLU PRelu_144 1 1 319 321 0=160
Split splitncnn_11 1 2 321 321_splitncnn_0 321_splitncnn_1
Convolution Conv_145 1 1 321_splitncnn_1 322 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_146 1 1 322 324 0=160
Convolution Conv_147 1 1 324 325 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_148 1 1 325 327 0=160
BinaryOp Add_149 2 1 327 321_splitncnn_0 328
Split splitncnn_12 1 2 328 328_splitncnn_0 328_splitncnn_1
Convolution Conv_150 1 1 328_splitncnn_1 329 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_151 1 1 329 331 0=160
Convolution Conv_152 1 1 331 332 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_153 1 1 332 334 0=160
BinaryOp Add_154 2 1 334 328_splitncnn_0 335
Split splitncnn_13 1 2 335 335_splitncnn_0 335_splitncnn_1
Convolution Conv_155 1 1 335_splitncnn_1 336 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_156 1 1 336 338 0=160
Convolution Conv_157 1 1 338 339 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_158 1 1 339 341 0=160
BinaryOp Add_159 2 1 341 335_splitncnn_0 342
Deconvolution ConvTranspose_160 1 1 342 343 0=4 1=4 3=2 4=1 5=1 6=10240
BinaryOp Add_161 2 1 138_splitncnn_0 246_splitncnn_0 344
BinaryOp Add_162 2 1 344 343 flow

BIN
models/rife/rife-v3.0/fusionnet.bin vendored Normal file

Binary file not shown.

74
models/rife/rife-v3.0/fusionnet.param vendored Normal file
View File

@ -0,0 +1,74 @@
7767517
72 81
Input img0 0 1 img0
Input img1 0 1 img1
Input flow 0 1 flow
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 flow 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
rife.Warp Warp_14 2 1 img0 71 77
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
rife.Warp Warp_14 2 1 img1 82 88
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 output 0=0.000000e+00 1=1.000000e+00

BIN
models/rife/rife-v3.1/contextnet.bin vendored Normal file

Binary file not shown.

42
models/rife/rife-v3.1/contextnet.param vendored Normal file
View File

@ -0,0 +1,42 @@
7767517
40 46
Input input.1 0 1 input.1
Input flow.0 0 1 flow.0
Convolution Conv_0 1 1 input.1 32 0=32 1=3 3=2 4=1 5=1 6=864
PReLU PRelu_1 1 1 32 34 0=32
Convolution Conv_2 1 1 34 35 0=32 1=3 4=1 5=1 6=9216
PReLU PRelu_3 1 1 35 37 0=32
Convolution Conv_4 1 1 37 38 0=32 1=3 3=2 4=1 5=1 6=9216
PReLU PRelu_5 1 1 38 40 0=32
Convolution Conv_6 1 1 40 41 0=32 1=3 4=1 5=1 6=9216
PReLU PRelu_7 1 1 41 43 0=32
Split splitncnn_0 1 2 43 43_splitncnn_0 43_splitncnn_1
Interp Resize_9 1 1 flow.0 53 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_11 1 1 53 55 0=2 1=1 2=5.000000e-01
Split splitncnn_1 1 2 55 55_splitncnn_0 55_splitncnn_1
rife.Warp Warp_17 2 1 43_splitncnn_1 55_splitncnn_1 f1
Convolution Conv_18 1 1 43_splitncnn_0 62 0=64 1=3 3=2 4=1 5=1 6=18432
PReLU PRelu_19 1 1 62 64 0=64
Convolution Conv_20 1 1 64 65 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_21 1 1 65 67 0=64
Split splitncnn_2 1 2 67 67_splitncnn_0 67_splitncnn_1
Interp Resize_23 1 1 55_splitncnn_0 77 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_25 1 1 77 79 0=2 1=1 2=5.000000e-01
Split splitncnn_3 1 2 79 79_splitncnn_0 79_splitncnn_1
rife.Warp Warp_31 2 1 67_splitncnn_1 79_splitncnn_1 f2
Convolution Conv_32 1 1 67_splitncnn_0 86 0=128 1=3 3=2 4=1 5=1 6=73728
PReLU PRelu_33 1 1 86 88 0=128
Convolution Conv_34 1 1 88 89 0=128 1=3 4=1 5=1 6=147456
PReLU PRelu_35 1 1 89 91 0=128
Split splitncnn_4 1 2 91 91_splitncnn_0 91_splitncnn_1
Interp Resize_37 1 1 79_splitncnn_0 101 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_39 1 1 101 103 0=2 1=1 2=5.000000e-01
Split splitncnn_5 1 2 103 103_splitncnn_0 103_splitncnn_1
rife.Warp Warp_45 2 1 91_splitncnn_1 103_splitncnn_1 f3
Convolution Conv_46 1 1 91_splitncnn_0 110 0=256 1=3 3=2 4=1 5=1 6=294912
PReLU PRelu_47 1 1 110 112 0=256
Convolution Conv_48 1 1 112 113 0=256 1=3 4=1 5=1 6=589824
PReLU PRelu_49 1 1 113 115 0=256
Interp Resize_51 1 1 103_splitncnn_0 125 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_53 1 1 125 127 0=2 1=1 2=5.000000e-01
rife.Warp Warp_59 2 1 115 127 f4

BIN
models/rife/rife-v3.1/flownet.bin vendored Normal file

Binary file not shown.

114
models/rife/rife-v3.1/flownet.param vendored Normal file
View File

@ -0,0 +1,114 @@
7767517
112 132
Input input0 0 1 input0
Input input1 0 1 input1
Concat input.1 2 1 input0 input1 input.1
Interp Resize_1 1 1 input.1 88 0=2
Split splitncnn_0 1 5 88 88_splitncnn_0 88_splitncnn_1 88_splitncnn_2 88_splitncnn_3 88_splitncnn_4
Interp Resize_3 1 1 88_splitncnn_4 98 0=2 1=2.500000e-01 2=2.500000e-01
Convolution Conv_4 1 1 98 99 0=80 1=3 3=2 4=1 5=1 6=4320
PReLU PRelu_5 1 1 99 101 0=80
Convolution Conv_6 1 1 101 102 0=160 1=3 3=2 4=1 5=1 6=115200
PReLU PRelu_7 1 1 102 104 0=160
Split splitncnn_1 1 2 104 104_splitncnn_0 104_splitncnn_1
Convolution Conv_8 1 1 104_splitncnn_1 105 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_9 1 1 105 107 0=160
Convolution Conv_10 1 1 107 108 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_11 1 1 108 110 0=160
BinaryOp Add_12 2 1 110 104_splitncnn_0 111
Split splitncnn_2 1 2 111 111_splitncnn_0 111_splitncnn_1
Convolution Conv_13 1 1 111_splitncnn_1 112 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_14 1 1 112 114 0=160
Convolution Conv_15 1 1 114 115 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_16 1 1 115 117 0=160
BinaryOp Add_17 2 1 117 111_splitncnn_0 118
Split splitncnn_3 1 2 118 118_splitncnn_0 118_splitncnn_1
Convolution Conv_18 1 1 118_splitncnn_1 119 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_19 1 1 119 121 0=160
Convolution Conv_20 1 1 121 122 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_21 1 1 122 124 0=160
BinaryOp Add_22 2 1 124 118_splitncnn_0 125
Deconvolution ConvTranspose_23 1 1 125 126 0=4 1=4 3=2 4=1 5=1 6=10240
Interp Resize_25 1 1 126 136 0=2 1=4.000000e+00 2=4.000000e+00
BinaryOp Mul_27 1 1 136 138 0=2 1=1 2=4.000000e+00
Split splitncnn_4 1 3 138 138_splitncnn_0 138_splitncnn_1 138_splitncnn_2
Interp Resize_29 1 1 138_splitncnn_2 148 0=2 1=2.000000e+00 2=2.000000e+00
BinaryOp Mul_31 1 1 148 150 0=2 1=1 2=2.000000e+00
Split splitncnn_5 1 3 150 150_splitncnn_0 150_splitncnn_1 150_splitncnn_2
Crop Slice_36 1 1 88_splitncnn_3 155 -23309=1,0 -23310=1,3 -23311=1,0
Crop Slice_41 1 1 150_splitncnn_2 160 -23309=1,0 -23310=1,2 -23311=1,0
rife.Warp Warp_47 2 1 155 160 166
Crop Slice_52 1 1 88_splitncnn_2 171 -23309=1,3 -23310=1,2147483647 -23311=1,0
Crop Slice_57 1 1 150_splitncnn_1 176 -23309=1,2 -23310=1,4 -23311=1,0
rife.Warp Warp_63 2 1 171 176 182
Concat Concat_64 2 1 166 182 183
Interp Resize_66 1 1 183 193 0=2 1=5.000000e-01 2=5.000000e-01
Interp Resize_68 1 1 150_splitncnn_0 203 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_70 1 1 203 205 0=2 1=1 2=5.000000e-01
Concat Concat_71 2 1 193 205 206
Convolution Conv_72 1 1 206 207 0=80 1=3 3=2 4=1 5=1 6=7200
PReLU PRelu_73 1 1 207 209 0=80
Convolution Conv_74 1 1 209 210 0=160 1=3 3=2 4=1 5=1 6=115200
PReLU PRelu_75 1 1 210 212 0=160
Split splitncnn_6 1 2 212 212_splitncnn_0 212_splitncnn_1
Convolution Conv_76 1 1 212_splitncnn_1 213 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_77 1 1 213 215 0=160
Convolution Conv_78 1 1 215 216 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_79 1 1 216 218 0=160
BinaryOp Add_80 2 1 218 212_splitncnn_0 219
Split splitncnn_7 1 2 219 219_splitncnn_0 219_splitncnn_1
Convolution Conv_81 1 1 219_splitncnn_1 220 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_82 1 1 220 222 0=160
Convolution Conv_83 1 1 222 223 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_84 1 1 223 225 0=160
BinaryOp Add_85 2 1 225 219_splitncnn_0 226
Split splitncnn_8 1 2 226 226_splitncnn_0 226_splitncnn_1
Convolution Conv_86 1 1 226_splitncnn_1 227 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_87 1 1 227 229 0=160
Convolution Conv_88 1 1 229 230 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_89 1 1 230 232 0=160
BinaryOp Add_90 2 1 232 226_splitncnn_0 233
Deconvolution ConvTranspose_91 1 1 233 234 0=4 1=4 3=2 4=1 5=1 6=10240
Interp Resize_93 1 1 234 244 0=2 1=2.000000e+00 2=2.000000e+00
BinaryOp Mul_95 1 1 244 246 0=2 1=1 2=2.000000e+00
Split splitncnn_9 1 2 246 246_splitncnn_0 246_splitncnn_1
BinaryOp Add_96 2 1 138_splitncnn_1 246_splitncnn_1 247
Interp Resize_98 1 1 247 257 0=2 1=2.000000e+00 2=2.000000e+00
BinaryOp Mul_100 1 1 257 259 0=2 1=1 2=2.000000e+00
Split splitncnn_10 1 3 259 259_splitncnn_0 259_splitncnn_1 259_splitncnn_2
Crop Slice_105 1 1 88_splitncnn_1 264 -23309=1,0 -23310=1,3 -23311=1,0
Crop Slice_110 1 1 259_splitncnn_2 269 -23309=1,0 -23310=1,2 -23311=1,0
rife.Warp Warp_116 2 1 264 269 275
Crop Slice_121 1 1 88_splitncnn_0 280 -23309=1,3 -23310=1,2147483647 -23311=1,0
Crop Slice_126 1 1 259_splitncnn_1 285 -23309=1,2 -23310=1,4 -23311=1,0
rife.Warp Warp_132 2 1 280 285 291
Concat Concat_133 2 1 275 291 292
Interp Resize_135 1 1 292 302 0=2
Interp Resize_137 1 1 259_splitncnn_0 312 0=2
BinaryOp Mul_139 1 1 312 314 0=2 1=1 2=1.000000e+00
Concat Concat_140 2 1 302 314 315
Convolution Conv_141 1 1 315 316 0=80 1=3 3=2 4=1 5=1 6=7200
PReLU PRelu_142 1 1 316 318 0=80
Convolution Conv_143 1 1 318 319 0=160 1=3 3=2 4=1 5=1 6=115200
PReLU PRelu_144 1 1 319 321 0=160
Split splitncnn_11 1 2 321 321_splitncnn_0 321_splitncnn_1
Convolution Conv_145 1 1 321_splitncnn_1 322 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_146 1 1 322 324 0=160
Convolution Conv_147 1 1 324 325 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_148 1 1 325 327 0=160
BinaryOp Add_149 2 1 327 321_splitncnn_0 328
Split splitncnn_12 1 2 328 328_splitncnn_0 328_splitncnn_1
Convolution Conv_150 1 1 328_splitncnn_1 329 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_151 1 1 329 331 0=160
Convolution Conv_152 1 1 331 332 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_153 1 1 332 334 0=160
BinaryOp Add_154 2 1 334 328_splitncnn_0 335
Split splitncnn_13 1 2 335 335_splitncnn_0 335_splitncnn_1
Convolution Conv_155 1 1 335_splitncnn_1 336 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_156 1 1 336 338 0=160
Convolution Conv_157 1 1 338 339 0=160 1=3 4=1 5=1 6=230400
PReLU PRelu_158 1 1 339 341 0=160
BinaryOp Add_159 2 1 341 335_splitncnn_0 342
Deconvolution ConvTranspose_160 1 1 342 343 0=4 1=4 3=2 4=1 5=1 6=10240
BinaryOp Add_161 2 1 138_splitncnn_0 246_splitncnn_0 344
BinaryOp Add_162 2 1 344 343 flow

BIN
models/rife/rife-v3.1/fusionnet.bin vendored Normal file

Binary file not shown.

74
models/rife/rife-v3.1/fusionnet.param vendored Normal file
View File

@ -0,0 +1,74 @@
7767517
72 81
Input img0 0 1 img0
Input img1 0 1 img1
Input flow 0 1 flow
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 flow 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
rife.Warp Warp_14 2 1 img0 71 77
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
rife.Warp Warp_14 2 1 img1 82 88
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 output 0=0.000000e+00 1=1.000000e+00

BIN
models/rife/rife-v4.6/flownet.bin vendored Normal file

Binary file not shown.

217
models/rife/rife-v4.6/flownet.param vendored Normal file
View File

@ -0,0 +1,217 @@
7767517
215 276
Input in0 0 1 in0
Split splitncnn_0 1 5 in0 1 2 3 4 5
Input in1 0 1 in1
Split splitncnn_1 1 5 in1 7 8 9 10 11
Input in2 0 1 in2
Split splitncnn_2 1 4 in2 13 14 15 16
Concat cat_0 3 1 1 7 13 17
Interp upsample_9 1 1 17 18 0=2 1=1.250000e-01 2=1.250000e-01
Convolution convrelu_0 1 1 18 20 0=96 1=3 3=2 4=1 5=1 6=6048 9=2 -23310=1,2.000000e-01
Convolution convrelu_1 1 1 20 21 0=192 1=3 3=2 4=1 5=1 6=165888 9=2 -23310=1,2.000000e-01
Split splitncnn_3 1 2 21 22 23
Convolution conv_22 1 1 23 25 0=192 1=3 4=1 5=1 6=331776
BinaryOp add_1 2 1 25 22 26
ReLU leakyrelu_66 1 1 26 28 0=2.000000e-01
Split splitncnn_4 1 2 28 29 30
Convolution conv_23 1 1 30 32 0=192 1=3 4=1 5=1 6=331776
BinaryOp add_3 2 1 32 29 33
ReLU leakyrelu_67 1 1 33 35 0=2.000000e-01
Split splitncnn_5 1 2 35 36 37
Convolution conv_24 1 1 37 39 0=192 1=3 4=1 5=1 6=331776
BinaryOp add_5 2 1 39 36 40
ReLU leakyrelu_68 1 1 40 42 0=2.000000e-01
Split splitncnn_6 1 2 42 43 44
Convolution conv_25 1 1 44 46 0=192 1=3 4=1 5=1 6=331776
BinaryOp add_7 2 1 46 43 47
ReLU leakyrelu_69 1 1 47 49 0=2.000000e-01
Split splitncnn_7 1 2 49 50 51
Convolution conv_26 1 1 51 53 0=192 1=3 4=1 5=1 6=331776
BinaryOp add_9 2 1 53 50 54
ReLU leakyrelu_70 1 1 54 56 0=2.000000e-01
Split splitncnn_8 1 2 56 57 58
Convolution conv_27 1 1 58 60 0=192 1=3 4=1 5=1 6=331776
BinaryOp add_11 2 1 60 57 61
ReLU leakyrelu_71 1 1 61 63 0=2.000000e-01
Split splitncnn_9 1 2 63 64 65
Convolution conv_28 1 1 65 67 0=192 1=3 4=1 5=1 6=331776
BinaryOp add_13 2 1 67 64 68
ReLU leakyrelu_72 1 1 68 70 0=2.000000e-01
Split splitncnn_10 1 2 70 71 72
Convolution conv_29 1 1 72 74 0=192 1=3 4=1 5=1 6=331776
BinaryOp add_15 2 1 74 71 75
ReLU leakyrelu_73 1 1 75 76 0=2.000000e-01
Deconvolution deconv_60 1 1 76 77 0=24 1=4 3=2 4=1 5=1 6=73728
PixelShuffle pixelshuffle_104 1 1 77 flow0 0=2
Interp upsample_10 1 1 flow0 79 0=2 1=8.000000e+00 2=8.000000e+00
Split splitncnn_11 1 2 79 80 81
Crop slice_108 1 1 81 82 -23309=1,0 -23310=1,4 -23311=1,0
BinaryOp mul_16 1 1 82 83 0=2 1=1 2=8.000000e+00
Split splitncnn_12 1 4 83 84 85 86 87
Interp upsample_11 1 1 85 88 0=2 1=2.500000e-01 2=2.500000e-01
BinaryOp div_17 1 1 88 89 0=3 1=1 2=4.000000e+00
Crop slice_109 1 1 87 90 -23309=1,2 -23310=1,4 -23311=1,0
rife.Warp warp_1 2 1 11 90 91
Crop slice_110 1 1 86 92 -23309=1,0 -23310=1,2 -23311=1,0
rife.Warp warp_0 2 1 5 92 93
Crop slice_111 1 1 80 94 -23309=1,4 -23310=1,5 -23311=1,0
Split splitncnn_13 1 2 94 95 96
Concat cat_3 4 1 93 91 14 95 97
Interp upsample_12 1 1 97 98 0=2 1=2.500000e-01 2=2.500000e-01
Concat cat_4 2 1 98 89 99
Convolution convrelu_2 1 1 99 101 0=64 1=3 3=2 4=1 5=1 6=6912 9=2 -23310=1,2.000000e-01
Convolution convrelu_3 1 1 101 102 0=128 1=3 3=2 4=1 5=1 6=73728 9=2 -23310=1,2.000000e-01
Split splitncnn_14 1 2 102 103 104
Convolution conv_32 1 1 104 106 0=128 1=3 4=1 5=1 6=147456
BinaryOp add_19 2 1 106 103 107
ReLU leakyrelu_76 1 1 107 109 0=2.000000e-01
Split splitncnn_15 1 2 109 110 111
Convolution conv_33 1 1 111 113 0=128 1=3 4=1 5=1 6=147456
BinaryOp add_21 2 1 113 110 114
ReLU leakyrelu_77 1 1 114 116 0=2.000000e-01
Split splitncnn_16 1 2 116 117 118
Convolution conv_34 1 1 118 120 0=128 1=3 4=1 5=1 6=147456
BinaryOp add_23 2 1 120 117 121
ReLU leakyrelu_78 1 1 121 123 0=2.000000e-01
Split splitncnn_17 1 2 123 124 125
Convolution conv_35 1 1 125 127 0=128 1=3 4=1 5=1 6=147456
BinaryOp add_25 2 1 127 124 128
ReLU leakyrelu_79 1 1 128 130 0=2.000000e-01
Split splitncnn_18 1 2 130 131 132
Convolution conv_36 1 1 132 134 0=128 1=3 4=1 5=1 6=147456
BinaryOp add_27 2 1 134 131 135
ReLU leakyrelu_80 1 1 135 137 0=2.000000e-01
Split splitncnn_19 1 2 137 138 139
Convolution conv_37 1 1 139 141 0=128 1=3 4=1 5=1 6=147456
BinaryOp add_29 2 1 141 138 142
ReLU leakyrelu_81 1 1 142 144 0=2.000000e-01
Split splitncnn_20 1 2 144 145 146
Convolution conv_38 1 1 146 148 0=128 1=3 4=1 5=1 6=147456
BinaryOp add_31 2 1 148 145 149
ReLU leakyrelu_82 1 1 149 151 0=2.000000e-01
Split splitncnn_21 1 2 151 152 153
Convolution conv_39 1 1 153 155 0=128 1=3 4=1 5=1 6=147456
BinaryOp add_33 2 1 155 152 156
ReLU leakyrelu_83 1 1 156 157 0=2.000000e-01
Deconvolution deconv_61 1 1 157 158 0=24 1=4 3=2 4=1 5=1 6=49152
PixelShuffle pixelshuffle_105 1 1 158 flow1 0=2
Interp upsample_13 1 1 flow1 160 0=2 1=4.000000e+00 2=4.000000e+00
Split splitncnn_22 1 2 160 161 162
Crop slice_112 1 1 162 163 -23309=1,0 -23310=1,4 -23311=1,0
Eltwise weighted_sum_0 2 1 84 163 164 0=1 -23301=2,1.000000e+00,4.000000e+00
Split splitncnn_23 1 4 164 165 166 167 168
Crop slice_113 1 1 161 169 -23309=1,4 -23310=1,5 -23311=1,0
BinaryOp add_36 2 1 96 169 170
Split splitncnn_24 1 2 170 171 172
Interp upsample_14 1 1 166 173 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp div_37 1 1 173 174 0=3 1=1 2=2.000000e+00
Crop slice_114 1 1 168 175 -23309=1,2 -23310=1,4 -23311=1,0
rife.Warp warp_3 2 1 10 175 176
Crop slice_115 1 1 167 177 -23309=1,0 -23310=1,2 -23311=1,0
rife.Warp warp_2 2 1 4 177 178
Concat cat_7 4 1 178 176 15 171 179
Interp upsample_15 1 1 179 180 0=2 1=5.000000e-01 2=5.000000e-01
Concat cat_8 2 1 180 174 181
Convolution convrelu_4 1 1 181 183 0=48 1=3 3=2 4=1 5=1 6=5184 9=2 -23310=1,2.000000e-01
Convolution convrelu_5 1 1 183 184 0=96 1=3 3=2 4=1 5=1 6=41472 9=2 -23310=1,2.000000e-01
Split splitncnn_25 1 2 184 185 186
Convolution conv_42 1 1 186 188 0=96 1=3 4=1 5=1 6=82944
BinaryOp add_39 2 1 188 185 189
ReLU leakyrelu_86 1 1 189 191 0=2.000000e-01
Split splitncnn_26 1 2 191 192 193
Convolution conv_43 1 1 193 195 0=96 1=3 4=1 5=1 6=82944
BinaryOp add_41 2 1 195 192 196
ReLU leakyrelu_87 1 1 196 198 0=2.000000e-01
Split splitncnn_27 1 2 198 199 200
Convolution conv_44 1 1 200 202 0=96 1=3 4=1 5=1 6=82944
BinaryOp add_43 2 1 202 199 203
ReLU leakyrelu_88 1 1 203 205 0=2.000000e-01
Split splitncnn_28 1 2 205 206 207
Convolution conv_45 1 1 207 209 0=96 1=3 4=1 5=1 6=82944
BinaryOp add_45 2 1 209 206 210
ReLU leakyrelu_89 1 1 210 212 0=2.000000e-01
Split splitncnn_29 1 2 212 213 214
Convolution conv_46 1 1 214 216 0=96 1=3 4=1 5=1 6=82944
BinaryOp add_47 2 1 216 213 217
ReLU leakyrelu_90 1 1 217 219 0=2.000000e-01
Split splitncnn_30 1 2 219 220 221
Convolution conv_47 1 1 221 223 0=96 1=3 4=1 5=1 6=82944
BinaryOp add_49 2 1 223 220 224
ReLU leakyrelu_91 1 1 224 226 0=2.000000e-01
Split splitncnn_31 1 2 226 227 228
Convolution conv_48 1 1 228 230 0=96 1=3 4=1 5=1 6=82944
BinaryOp add_51 2 1 230 227 231
ReLU leakyrelu_92 1 1 231 233 0=2.000000e-01
Split splitncnn_32 1 2 233 234 235
Convolution conv_49 1 1 235 237 0=96 1=3 4=1 5=1 6=82944
BinaryOp add_53 2 1 237 234 238
ReLU leakyrelu_93 1 1 238 239 0=2.000000e-01
Deconvolution deconv_62 1 1 239 240 0=24 1=4 3=2 4=1 5=1 6=36864
PixelShuffle pixelshuffle_106 1 1 240 flow2 0=2
Interp upsample_16 1 1 flow2 242 0=2 1=2.000000e+00 2=2.000000e+00
Split splitncnn_33 1 2 242 243 244
Crop slice_116 1 1 244 245 -23309=1,0 -23310=1,4 -23311=1,0
Eltwise weighted_sum_1 2 1 165 245 246 0=1 -23301=2,1.000000e+00,2.000000e+00
Split splitncnn_34 1 4 246 247 261 249 250
Crop slice_117 1 1 243 251 -23309=1,4 -23310=1,5 -23311=1,0
BinaryOp add_56 2 1 172 251 252
Split splitncnn_35 1 2 252 253 254
Crop slice_118 1 1 250 255 -23309=1,2 -23310=1,4 -23311=1,0
rife.Warp warp_5 2 1 9 255 256
Crop slice_119 1 1 249 257 -23309=1,0 -23310=1,2 -23311=1,0
rife.Warp warp_4 2 1 3 257 258
Concat cat_11 4 1 258 256 16 253 260
Concat cat_12 2 1 260 261 262
Convolution convrelu_6 1 1 262 264 0=32 1=3 3=2 4=1 5=1 6=3456 9=2 -23310=1,2.000000e-01
Convolution convrelu_7 1 1 264 265 0=64 1=3 3=2 4=1 5=1 6=18432 9=2 -23310=1,2.000000e-01
Split splitncnn_36 1 2 265 266 267
Convolution conv_52 1 1 267 269 0=64 1=3 4=1 5=1 6=36864
BinaryOp add_58 2 1 269 266 270
ReLU leakyrelu_96 1 1 270 272 0=2.000000e-01
Split splitncnn_37 1 2 272 273 274
Convolution conv_53 1 1 274 276 0=64 1=3 4=1 5=1 6=36864
BinaryOp add_60 2 1 276 273 277
ReLU leakyrelu_97 1 1 277 279 0=2.000000e-01
Split splitncnn_38 1 2 279 280 281
Convolution conv_54 1 1 281 283 0=64 1=3 4=1 5=1 6=36864
BinaryOp add_62 2 1 283 280 284
ReLU leakyrelu_98 1 1 284 286 0=2.000000e-01
Split splitncnn_39 1 2 286 287 288
Convolution conv_55 1 1 288 290 0=64 1=3 4=1 5=1 6=36864
BinaryOp add_64 2 1 290 287 291
ReLU leakyrelu_99 1 1 291 293 0=2.000000e-01
Split splitncnn_40 1 2 293 294 295
Convolution conv_56 1 1 295 297 0=64 1=3 4=1 5=1 6=36864
BinaryOp add_66 2 1 297 294 298
ReLU leakyrelu_100 1 1 298 300 0=2.000000e-01
Split splitncnn_41 1 2 300 301 302
Convolution conv_57 1 1 302 304 0=64 1=3 4=1 5=1 6=36864
BinaryOp add_68 2 1 304 301 305
ReLU leakyrelu_101 1 1 305 307 0=2.000000e-01
Split splitncnn_42 1 2 307 308 309
Convolution conv_58 1 1 309 311 0=64 1=3 4=1 5=1 6=36864
BinaryOp add_70 2 1 311 308 312
ReLU leakyrelu_102 1 1 312 314 0=2.000000e-01
Split splitncnn_43 1 2 314 315 316
Convolution conv_59 1 1 316 318 0=64 1=3 4=1 5=1 6=36864
BinaryOp add_72 2 1 318 315 319
ReLU leakyrelu_103 1 1 319 320 0=2.000000e-01
Deconvolution deconv_63 1 1 320 321 0=24 1=4 3=2 4=1 5=1 6=24576
PixelShuffle pixelshuffle_107 1 1 321 flow3 0=2
Split splitncnn_44 1 2 flow3 324 325
Crop slice_120 1 1 325 326 -23309=1,0 -23310=1,4 -23311=1,0
BinaryOp add_73 2 1 247 326 327
Split splitncnn_45 1 2 327 328 329
Crop slice_121 1 1 324 330 -23309=1,4 -23310=1,5 -23311=1,0
BinaryOp add_74 2 1 254 330 331
Sigmoid sigmoid_8 1 1 331 332
Split splitncnn_46 1 2 332 333 334
BinaryOp sub_75 1 1 333 335 0=7 1=1 2=1.000000e+00
Crop slice_123 1 1 328 336 -23309=1,2 -23310=1,4 -23311=1,0
rife.Warp warp_6 2 1 8 336 337
BinaryOp mul_76 2 1 337 335 338 0=2
Crop slice_122 1 1 329 339 -23309=1,0 -23310=1,2 -23311=1,0
rife.Warp warp_7 2 1 2 339 340
BinaryOp mul_77 2 1 340 334 341 0=2
BinaryOp add_78 2 1 341 338 out0

BIN
models/rife/rife-v4/flownet.bin vendored Normal file

Binary file not shown.

168
models/rife/rife-v4/flownet.param vendored Normal file
View File

@ -0,0 +1,168 @@
7767517
166 199
Input in0 0 1 in0
Split splitncnn_0 1 5 in0 1 2 3 4 5
Input in1 0 1 in1
Split splitncnn_1 1 5 in1 7 8 9 10 11
Input in2 0 1 in2
Split splitncnn_2 1 4 in2 13 14 15 16
Concat cat_0 3 1 1 7 13 17
Interp upsample_9 1 1 17 18 0=2 1=1.250000e-01 2=1.250000e-01
Convolution conv_20 1 1 18 19 0=96 1=3 3=2 4=1 5=1 6=6048
PReLU prelu_64 1 1 19 20 0=96
Convolution conv_21 1 1 20 21 0=192 1=3 3=2 4=1 5=1 6=165888
PReLU prelu_65 1 1 21 22 0=192
Split splitncnn_3 1 2 22 23 24
Convolution conv_22 1 1 24 25 0=192 1=3 4=1 5=1 6=331776
PReLU prelu_66 1 1 25 26 0=192
Convolution conv_23 1 1 26 27 0=192 1=3 4=1 5=1 6=331776
PReLU prelu_67 1 1 27 28 0=192
Convolution conv_24 1 1 28 29 0=192 1=3 4=1 5=1 6=331776
PReLU prelu_68 1 1 29 30 0=192
Convolution conv_25 1 1 30 31 0=192 1=3 4=1 5=1 6=331776
PReLU prelu_69 1 1 31 32 0=192
Convolution conv_26 1 1 32 33 0=192 1=3 4=1 5=1 6=331776
PReLU prelu_70 1 1 33 34 0=192
Convolution conv_27 1 1 34 35 0=192 1=3 4=1 5=1 6=331776
PReLU prelu_71 1 1 35 36 0=192
Convolution conv_28 1 1 36 37 0=192 1=3 4=1 5=1 6=331776
PReLU prelu_72 1 1 37 38 0=192
Convolution conv_29 1 1 38 39 0=192 1=3 4=1 5=1 6=331776
PReLU prelu_73 1 1 39 40 0=192
BinaryOp add_0 2 1 40 23 41
Deconvolution deconv_60 1 1 41 flow0 0=5 1=4 3=2 4=1 5=1 6=15360
Interp upsample_10 1 1 flow0 43 0=2 1=1.600000e+01 2=1.600000e+01
Split splitncnn_4 1 2 43 44 45
Crop slice_104 1 1 45 46 -23309=1,0 -23310=1,4 -23311=1,0
BinaryOp mul_1 1 1 46 47 0=2 1=1 2=1.600000e+01
Split splitncnn_5 1 4 47 48 49 50 51
Interp upsample_11 1 1 49 52 0=2 1=2.500000e-01 2=2.500000e-01
BinaryOp mul_2 1 1 52 53 0=2 1=1 2=2.500000e-01
Crop slice_105 1 1 51 54 -23309=1,2 -23310=1,4 -23311=1,0
rife.Warp warp_1 2 1 11 54 55
Crop slice_106 1 1 50 56 -23309=1,0 -23310=1,2 -23311=1,0
rife.Warp warp_0 2 1 5 56 57
Crop slice_107 1 1 44 58 -23309=1,4 -23310=1,5 -23311=1,0
Split splitncnn_6 1 2 58 59 60
Concat cat_1 4 1 57 55 14 59 61
Interp upsample_12 1 1 61 62 0=2 1=2.500000e-01 2=2.500000e-01
Concat cat_2 2 1 62 53 63
Convolution conv_30 1 1 63 64 0=64 1=3 3=2 4=1 5=1 6=6912
PReLU prelu_74 1 1 64 65 0=64
Convolution conv_31 1 1 65 66 0=128 1=3 3=2 4=1 5=1 6=73728
PReLU prelu_75 1 1 66 67 0=128
Split splitncnn_7 1 2 67 68 69
Convolution conv_32 1 1 69 70 0=128 1=3 4=1 5=1 6=147456
PReLU prelu_76 1 1 70 71 0=128
Convolution conv_33 1 1 71 72 0=128 1=3 4=1 5=1 6=147456
PReLU prelu_77 1 1 72 73 0=128
Convolution conv_34 1 1 73 74 0=128 1=3 4=1 5=1 6=147456
PReLU prelu_78 1 1 74 75 0=128
Convolution conv_35 1 1 75 76 0=128 1=3 4=1 5=1 6=147456
PReLU prelu_79 1 1 76 77 0=128
Convolution conv_36 1 1 77 78 0=128 1=3 4=1 5=1 6=147456
PReLU prelu_80 1 1 78 79 0=128
Convolution conv_37 1 1 79 80 0=128 1=3 4=1 5=1 6=147456
PReLU prelu_81 1 1 80 81 0=128
Convolution conv_38 1 1 81 82 0=128 1=3 4=1 5=1 6=147456
PReLU prelu_82 1 1 82 83 0=128
Convolution conv_39 1 1 83 84 0=128 1=3 4=1 5=1 6=147456
PReLU prelu_83 1 1 84 85 0=128
BinaryOp add_3 2 1 85 68 86
Deconvolution deconv_61 1 1 86 flow1 0=5 1=4 3=2 4=1 5=1 6=10240
Interp upsample_13 1 1 flow1 88 0=2 1=8.000000e+00 2=8.000000e+00
Split splitncnn_8 1 2 88 89 90
Crop slice_108 1 1 90 91 -23309=1,0 -23310=1,4 -23311=1,0
Eltwise add_5 2 1 48 91 93 0=1 -23301=2,1.000000e+00,8.000000e+00
Split splitncnn_9 1 4 93 94 95 96 97
Crop slice_109 1 1 89 98 -23309=1,4 -23310=1,5 -23311=1,0
BinaryOp add_6 2 1 60 98 99
Split splitncnn_10 1 2 99 100 101
Interp upsample_14 1 1 95 102 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp mul_7 1 1 102 103 0=2 1=1 2=5.000000e-01
Crop slice_110 1 1 97 104 -23309=1,2 -23310=1,4 -23311=1,0
rife.Warp warp_3 2 1 10 104 105
Crop slice_111 1 1 96 106 -23309=1,0 -23310=1,2 -23311=1,0
rife.Warp warp_2 2 1 4 106 107
Concat cat_3 4 1 107 105 15 100 108
Interp upsample_15 1 1 108 109 0=2 1=5.000000e-01 2=5.000000e-01
Concat cat_4 2 1 109 103 110
Convolution conv_40 1 1 110 111 0=48 1=3 3=2 4=1 5=1 6=5184
PReLU prelu_84 1 1 111 112 0=48
Convolution conv_41 1 1 112 113 0=96 1=3 3=2 4=1 5=1 6=41472
PReLU prelu_85 1 1 113 114 0=96
Split splitncnn_11 1 2 114 115 116
Convolution conv_42 1 1 116 117 0=96 1=3 4=1 5=1 6=82944
PReLU prelu_86 1 1 117 118 0=96
Convolution conv_43 1 1 118 119 0=96 1=3 4=1 5=1 6=82944
PReLU prelu_87 1 1 119 120 0=96
Convolution conv_44 1 1 120 121 0=96 1=3 4=1 5=1 6=82944
PReLU prelu_88 1 1 121 122 0=96
Convolution conv_45 1 1 122 123 0=96 1=3 4=1 5=1 6=82944
PReLU prelu_89 1 1 123 124 0=96
Convolution conv_46 1 1 124 125 0=96 1=3 4=1 5=1 6=82944
PReLU prelu_90 1 1 125 126 0=96
Convolution conv_47 1 1 126 127 0=96 1=3 4=1 5=1 6=82944
PReLU prelu_91 1 1 127 128 0=96
Convolution conv_48 1 1 128 129 0=96 1=3 4=1 5=1 6=82944
PReLU prelu_92 1 1 129 130 0=96
Convolution conv_49 1 1 130 131 0=96 1=3 4=1 5=1 6=82944
PReLU prelu_93 1 1 131 132 0=96
BinaryOp add_8 2 1 132 115 133
Deconvolution deconv_62 1 1 133 flow2 0=5 1=4 3=2 4=1 5=1 6=7680
Interp upsample_16 1 1 flow2 135 0=2 1=4.000000e+00 2=4.000000e+00
Split splitncnn_12 1 2 135 136 137
Crop slice_112 1 1 137 138 -23309=1,0 -23310=1,4 -23311=1,0
Eltwise add_10 2 1 94 138 140 0=1 -23301=2,1.000000e+00,4.000000e+00
Split splitncnn_13 1 4 140 141 142 143 144
Crop slice_113 1 1 136 145 -23309=1,4 -23310=1,5 -23311=1,0
BinaryOp add_11 2 1 101 145 146
Split splitncnn_14 1 2 146 147 148
Crop slice_114 1 1 144 149 -23309=1,2 -23310=1,4 -23311=1,0
rife.Warp warp_5 2 1 9 149 150
Crop slice_115 1 1 143 151 -23309=1,0 -23310=1,2 -23311=1,0
rife.Warp warp_4 2 1 3 151 152
Concat cat_5 4 1 152 150 16 147 153
Interp upsample_18 1 1 153 154 0=2
Interp upsample_17 1 1 142 155 0=2
Concat cat_6 2 1 154 155 156
Convolution conv_50 1 1 156 157 0=32 1=3 3=2 4=1 5=1 6=3456
PReLU prelu_94 1 1 157 158 0=32
Convolution conv_51 1 1 158 159 0=64 1=3 3=2 4=1 5=1 6=18432
PReLU prelu_95 1 1 159 160 0=64
Split splitncnn_15 1 2 160 161 162
Convolution conv_52 1 1 162 163 0=64 1=3 4=1 5=1 6=36864
PReLU prelu_96 1 1 163 164 0=64
Convolution conv_53 1 1 164 165 0=64 1=3 4=1 5=1 6=36864
PReLU prelu_97 1 1 165 166 0=64
Convolution conv_54 1 1 166 167 0=64 1=3 4=1 5=1 6=36864
PReLU prelu_98 1 1 167 168 0=64
Convolution conv_55 1 1 168 169 0=64 1=3 4=1 5=1 6=36864
PReLU prelu_99 1 1 169 170 0=64
Convolution conv_56 1 1 170 171 0=64 1=3 4=1 5=1 6=36864
PReLU prelu_100 1 1 171 172 0=64
Convolution conv_57 1 1 172 173 0=64 1=3 4=1 5=1 6=36864
PReLU prelu_101 1 1 173 174 0=64
Convolution conv_58 1 1 174 175 0=64 1=3 4=1 5=1 6=36864
PReLU prelu_102 1 1 175 176 0=64
Convolution conv_59 1 1 176 177 0=64 1=3 4=1 5=1 6=36864
PReLU prelu_103 1 1 177 178 0=64
BinaryOp add_12 2 1 178 161 179
Deconvolution deconv_63 1 1 179 flow3 0=5 1=4 3=2 4=1 5=1 6=5120
Interp upsample_19 1 1 flow3 181 0=2 1=2.000000e+00 2=2.000000e+00
Split splitncnn_16 1 2 181 182 183
Crop slice_116 1 1 183 184 -23309=1,0 -23310=1,4 -23311=1,0
Eltwise add_14 2 1 141 184 186 0=1 -23301=2,1.000000e+00,2.000000e+00
Split splitncnn_17 1 2 186 187 188
Crop slice_117 1 1 182 189 -23309=1,4 -23310=1,5 -23311=1,0
BinaryOp add_15 2 1 148 189 190
Sigmoid sigmoid_8 1 1 190 191
Split splitncnn_18 1 2 191 192 193
BinaryOp sub_16 1 1 192 194 0=7 1=1 2=1.000000e+00
Crop slice_119 1 1 187 195 -23309=1,2 -23310=1,4 -23311=1,0
rife.Warp warp_6 2 1 8 195 196
BinaryOp mul_17 2 1 196 194 197 0=2
Crop slice_118 1 1 188 198 -23309=1,0 -23310=1,2 -23311=1,0
rife.Warp warp_7 2 1 2 198 199
BinaryOp mul_18 2 1 199 193 200 0=2
BinaryOp add_19 2 1 200 197 out0

BIN
models/rife/rife/contextnet.bin vendored Normal file

Binary file not shown.

66
models/rife/rife/contextnet.param vendored Normal file
View File

@ -0,0 +1,66 @@
7767517
64 78
Input input.1 0 1 input.1
Split splitncnn_input0 1 2 input.1 input.1_splitncnn_0 input.1_splitncnn_1
Input flow.1 0 1 flow.1
UnaryOp flow.0 1 1 flow.1 flow.0 0=1
Split splitncnn_input1 1 2 flow.0 flow.1_splitncnn_0 flow.1_splitncnn_1
Convolution Conv_0 1 1 input.1_splitncnn_1 42 0=16 1=3 3=2 4=1 6=432
Convolution Conv_1 1 1 input.1_splitncnn_0 43 0=16 1=3 3=2 4=1 5=1 6=432
PReLU PRelu_2 1 1 43 45 0=16
Convolution Conv_3 1 1 45 46 0=16 1=3 4=1 5=1 6=2304
Split splitncnn_0 1 2 46 46_splitncnn_0 46_splitncnn_1
Pooling ReduceMean_5 1 1 46_splitncnn_1 48 0=1 4=1
InnerProduct Conv_6 1 1 48 51 0=16 2=256 9=2 -23310=1,1.170065e+00
InnerProduct Conv_8 1 1 51 53 0=16 2=256 9=4
BinaryOp Mul_10 2 1 46_splitncnn_0 53 54 0=2
BinaryOp Add_11 2 1 54 42 55
PReLU PRelu_12 1 1 55 57 0=16
Split splitncnn_1 1 3 57 57_splitncnn_0 57_splitncnn_1 57_splitncnn_2
rife.Warp Warp_18 2 1 57_splitncnn_2 flow.1_splitncnn_1 f1
Convolution Conv_19 1 1 57_splitncnn_1 64 0=32 1=3 3=2 4=1 6=4608
Convolution Conv_20 1 1 57_splitncnn_0 65 0=32 1=3 3=2 4=1 5=1 6=4608
PReLU PRelu_21 1 1 65 67 0=32
Convolution Conv_22 1 1 67 68 0=32 1=3 4=1 5=1 6=9216
Split splitncnn_2 1 2 68 68_splitncnn_0 68_splitncnn_1
Pooling ReduceMean_24 1 1 68_splitncnn_1 70 0=1 4=1
InnerProduct Conv_25 1 1 70 73 0=16 2=512 9=2 -23310=1,5.760695e-01
InnerProduct Conv_27 1 1 73 75 0=32 2=512 9=4
BinaryOp Mul_29 2 1 68_splitncnn_0 75 76 0=2
BinaryOp Add_30 2 1 76 64 77
PReLU PRelu_31 1 1 77 79 0=32
Split splitncnn_3 1 3 79 79_splitncnn_0 79_splitncnn_1 79_splitncnn_2
Interp Resize_33 1 1 flow.1_splitncnn_0 89 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_35 1 1 89 91 0=2 1=1 2=5.000000e-01
Split splitncnn_4 1 2 91 91_splitncnn_0 91_splitncnn_1
rife.Warp Warp_41 2 1 79_splitncnn_2 91_splitncnn_1 f2
Convolution Conv_42 1 1 79_splitncnn_1 98 0=64 1=3 3=2 4=1 6=18432
Convolution Conv_43 1 1 79_splitncnn_0 99 0=64 1=3 3=2 4=1 5=1 6=18432
PReLU PRelu_44 1 1 99 101 0=64
Convolution Conv_45 1 1 101 102 0=64 1=3 4=1 5=1 6=36864
Split splitncnn_5 1 2 102 102_splitncnn_0 102_splitncnn_1
Pooling ReduceMean_47 1 1 102_splitncnn_1 104 0=1 4=1
InnerProduct Conv_48 1 1 104 107 0=16 2=1024 9=2 -23310=1,3.197831e-01
InnerProduct Conv_50 1 1 107 109 0=64 2=1024 9=4
BinaryOp Mul_52 2 1 102_splitncnn_0 109 110 0=2
BinaryOp Add_53 2 1 110 98 111
PReLU PRelu_54 1 1 111 113 0=64
Split splitncnn_6 1 3 113 113_splitncnn_0 113_splitncnn_1 113_splitncnn_2
Interp Resize_56 1 1 91_splitncnn_0 123 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_58 1 1 123 125 0=2 1=1 2=5.000000e-01
Split splitncnn_7 1 2 125 125_splitncnn_0 125_splitncnn_1
rife.Warp Warp_64 2 1 113_splitncnn_2 125_splitncnn_1 f3
Convolution Conv_65 1 1 113_splitncnn_1 132 0=128 1=3 3=2 4=1 6=73728
Convolution Conv_66 1 1 113_splitncnn_0 133 0=128 1=3 3=2 4=1 5=1 6=73728
PReLU PRelu_67 1 1 133 135 0=128
Convolution Conv_68 1 1 135 136 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_8 1 2 136 136_splitncnn_0 136_splitncnn_1
Pooling ReduceMean_70 1 1 136_splitncnn_1 138 0=1 4=1
InnerProduct Conv_71 1 1 138 141 0=16 2=2048 9=2 -23310=1,3.248079e-01
InnerProduct Conv_73 1 1 141 143 0=128 2=2048 9=4
BinaryOp Mul_75 2 1 136_splitncnn_0 143 144 0=2
BinaryOp Add_76 2 1 144 132 145
PReLU PRelu_77 1 1 145 147 0=128
Interp Resize_79 1 1 125_splitncnn_0 157 0=2 1=5.000000e-01 2=5.000000e-01
BinaryOp Mul_81 1 1 157 159 0=2 1=1 2=5.000000e-01
rife.Warp Warp_87 2 1 147 159 f4

BIN
models/rife/rife/flownet.bin vendored Normal file

Binary file not shown.

239
models/rife/rife/flownet.param vendored Normal file
View File

@ -0,0 +1,239 @@
7767517
237 284
Input input0 0 1 input0
Input input1 0 1 input1
Concat input.1 2 1 input0 input1 input.1
Interp Resize_1 1 1 input.1 343 0=2 1=5.000000e-01 2=5.000000e-01
Split splitncnn_0 1 5 343 343_splitncnn_0 343_splitncnn_1 343_splitncnn_2 343_splitncnn_3 343_splitncnn_4
Interp Resize_3 1 1 343_splitncnn_4 353 0=2 1=2.500000e-01 2=2.500000e-01
Convolution Conv_4 1 1 353 355 0=192 1=3 3=2 4=1 5=1 6=10368
PReLU PRelu_6 1 1 355 357 0=192
Split splitncnn_1 1 2 357 357_splitncnn_0 357_splitncnn_1
Convolution Conv_7 1 1 357_splitncnn_1 359 0=192 1=3 4=1 5=1 6=331776
PReLU PRelu_9 1 1 359 361 0=192
Convolution Conv_10 1 1 361 363 0=192 1=3 4=1 5=1 6=331776
Split splitncnn_2 1 2 363 363_splitncnn_0 363_splitncnn_1
Pooling ReduceMean_13 1 1 363_splitncnn_1 365 0=1 4=1
InnerProduct Conv_14 1 1 365 368 0=16 2=3072 9=2 -23310=1,-9.818018e-04
InnerProduct Conv_16 1 1 368 370 0=192 2=3072 9=4
BinaryOp Mul_18 2 1 363_splitncnn_0 370 371 0=2
BinaryOp Add_19 2 1 371 357_splitncnn_0 372
PReLU PRelu_20 1 1 372 374 0=192
Split splitncnn_3 1 2 374 374_splitncnn_0 374_splitncnn_1
Convolution Conv_21 1 1 374_splitncnn_1 376 0=192 1=3 4=1 5=1 6=331776
PReLU PRelu_23 1 1 376 378 0=192
Convolution Conv_24 1 1 378 380 0=192 1=3 4=1 5=1 6=331776
Split splitncnn_4 1 2 380 380_splitncnn_0 380_splitncnn_1
Pooling ReduceMean_27 1 1 380_splitncnn_1 382 0=1 4=1
InnerProduct Conv_28 1 1 382 385 0=16 2=3072 9=2 -23310=1,1.656540e-01
InnerProduct Conv_30 1 1 385 387 0=192 2=3072 9=4
BinaryOp Mul_32 2 1 380_splitncnn_0 387 388 0=2
BinaryOp Add_33 2 1 388 374_splitncnn_0 389
PReLU PRelu_34 1 1 389 391 0=192
Split splitncnn_5 1 2 391 391_splitncnn_0 391_splitncnn_1
Convolution Conv_35 1 1 391_splitncnn_1 393 0=192 1=3 4=1 5=1 6=331776
PReLU PRelu_37 1 1 393 395 0=192
Convolution Conv_38 1 1 395 397 0=192 1=3 4=1 5=1 6=331776
Split splitncnn_6 1 2 397 397_splitncnn_0 397_splitncnn_1
Pooling ReduceMean_41 1 1 397_splitncnn_1 399 0=1 4=1
InnerProduct Conv_42 1 1 399 402 0=16 2=3072 9=2 -23310=1,3.486148e-01
InnerProduct Conv_44 1 1 402 404 0=192 2=3072 9=4
BinaryOp Mul_46 2 1 397_splitncnn_0 404 405 0=2
BinaryOp Add_47 2 1 405 391_splitncnn_0 406
PReLU PRelu_48 1 1 406 408 0=192
Split splitncnn_7 1 2 408 408_splitncnn_0 408_splitncnn_1
Convolution Conv_49 1 1 408_splitncnn_1 410 0=192 1=3 4=1 5=1 6=331776
PReLU PRelu_51 1 1 410 412 0=192
Convolution Conv_52 1 1 412 414 0=192 1=3 4=1 5=1 6=331776
Split splitncnn_8 1 2 414 414_splitncnn_0 414_splitncnn_1
Pooling ReduceMean_55 1 1 414_splitncnn_1 416 0=1 4=1
InnerProduct Conv_56 1 1 416 419 0=16 2=3072 9=2 -23310=1,4.422835e-02
InnerProduct Conv_58 1 1 419 421 0=192 2=3072 9=4
BinaryOp Mul_60 2 1 414_splitncnn_0 421 422 0=2
BinaryOp Add_61 2 1 422 408_splitncnn_0 423
PReLU PRelu_62 1 1 423 425 0=192
Split splitncnn_9 1 2 425 425_splitncnn_0 425_splitncnn_1
Convolution Conv_63 1 1 425_splitncnn_1 427 0=192 1=3 4=1 5=1 6=331776
PReLU PRelu_65 1 1 427 429 0=192
Convolution Conv_66 1 1 429 431 0=192 1=3 4=1 5=1 6=331776
Split splitncnn_10 1 2 431 431_splitncnn_0 431_splitncnn_1
Pooling ReduceMean_69 1 1 431_splitncnn_1 433 0=1 4=1
InnerProduct Conv_70 1 1 433 436 0=16 2=3072 9=2 -23310=1,1.658438e-01
InnerProduct Conv_72 1 1 436 438 0=192 2=3072 9=4
BinaryOp Mul_74 2 1 431_splitncnn_0 438 439 0=2
BinaryOp Add_75 2 1 439 425_splitncnn_0 440
PReLU PRelu_76 1 1 440 442 0=192
Split splitncnn_11 1 2 442 442_splitncnn_0 442_splitncnn_1
Convolution Conv_77 1 1 442_splitncnn_1 444 0=192 1=3 4=1 5=1 6=331776
PReLU PRelu_79 1 1 444 446 0=192
Convolution Conv_80 1 1 446 448 0=192 1=3 4=1 5=1 6=331776
Split splitncnn_12 1 2 448 448_splitncnn_0 448_splitncnn_1
Pooling ReduceMean_83 1 1 448_splitncnn_1 450 0=1 4=1
InnerProduct Conv_84 1 1 450 453 0=16 2=3072 9=2 -23310=1,2.899390e-01
InnerProduct Conv_86 1 1 453 455 0=192 2=3072 9=4
BinaryOp Mul_88 2 1 448_splitncnn_0 455 456 0=2
BinaryOp Add_89 2 1 456 442_splitncnn_0 457
PReLU PRelu_90 1 1 457 459 0=192
Convolution Conv_91 1 1 459 460 0=8 1=3 4=1 5=1 6=13824
PixelShuffle DepthToSpace_92 1 1 460 461 0=2
Interp Resize_94 1 1 461 471 0=2 1=4.000000e+00 2=4.000000e+00
Split splitncnn_13 1 5 471 471_splitncnn_0 471_splitncnn_1 471_splitncnn_2 471_splitncnn_3 471_splitncnn_4
Crop Slice_99 1 1 343_splitncnn_3 476 -23309=1,0 -23310=1,3 -23311=1,0
rife.Warp Warp_105 2 1 476 471_splitncnn_4 482
Crop Slice_110 1 1 343_splitncnn_2 487 -23309=1,3 -23310=1,2147483647 -23311=1,0
UnaryOp Neg_111 1 1 471_splitncnn_3 488 0=1
rife.Warp Warp_117 2 1 487 488 494
Concat Concat_118 3 1 482 494 471_splitncnn_2 495
Interp Resize_120 1 1 495 505 0=2 1=5.000000e-01 2=5.000000e-01
Convolution Conv_121 1 1 505 507 0=128 1=3 3=2 4=1 5=1 6=9216
PReLU PRelu_123 1 1 507 509 0=128
Split splitncnn_14 1 2 509 509_splitncnn_0 509_splitncnn_1
Convolution Conv_124 1 1 509_splitncnn_1 511 0=128 1=3 4=1 5=1 6=147456
PReLU PRelu_126 1 1 511 513 0=128
Convolution Conv_127 1 1 513 515 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_15 1 2 515 515_splitncnn_0 515_splitncnn_1
Pooling ReduceMean_130 1 1 515_splitncnn_1 517 0=1 4=1
InnerProduct Conv_131 1 1 517 520 0=16 2=2048 9=2 -23310=1,3.783025e-02
InnerProduct Conv_133 1 1 520 522 0=128 2=2048 9=4
BinaryOp Mul_135 2 1 515_splitncnn_0 522 523 0=2
BinaryOp Add_136 2 1 523 509_splitncnn_0 524
PReLU PRelu_137 1 1 524 526 0=128
Split splitncnn_16 1 2 526 526_splitncnn_0 526_splitncnn_1
Convolution Conv_138 1 1 526_splitncnn_1 528 0=128 1=3 4=1 5=1 6=147456
PReLU PRelu_140 1 1 528 530 0=128
Convolution Conv_141 1 1 530 532 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_17 1 2 532 532_splitncnn_0 532_splitncnn_1
Pooling ReduceMean_144 1 1 532_splitncnn_1 534 0=1 4=1
InnerProduct Conv_145 1 1 534 537 0=16 2=2048 9=2 -23310=1,2.474383e-01
InnerProduct Conv_147 1 1 537 539 0=128 2=2048 9=4
BinaryOp Mul_149 2 1 532_splitncnn_0 539 540 0=2
BinaryOp Add_150 2 1 540 526_splitncnn_0 541
PReLU PRelu_151 1 1 541 543 0=128
Split splitncnn_18 1 2 543 543_splitncnn_0 543_splitncnn_1
Convolution Conv_152 1 1 543_splitncnn_1 545 0=128 1=3 4=1 5=1 6=147456
PReLU PRelu_154 1 1 545 547 0=128
Convolution Conv_155 1 1 547 549 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_19 1 2 549 549_splitncnn_0 549_splitncnn_1
Pooling ReduceMean_158 1 1 549_splitncnn_1 551 0=1 4=1
InnerProduct Conv_159 1 1 551 554 0=16 2=2048 9=2 -23310=1,2.253069e-01
InnerProduct Conv_161 1 1 554 556 0=128 2=2048 9=4
BinaryOp Mul_163 2 1 549_splitncnn_0 556 557 0=2
BinaryOp Add_164 2 1 557 543_splitncnn_0 558
PReLU PRelu_165 1 1 558 560 0=128
Split splitncnn_20 1 2 560 560_splitncnn_0 560_splitncnn_1
Convolution Conv_166 1 1 560_splitncnn_1 562 0=128 1=3 4=1 5=1 6=147456
PReLU PRelu_168 1 1 562 564 0=128
Convolution Conv_169 1 1 564 566 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_21 1 2 566 566_splitncnn_0 566_splitncnn_1
Pooling ReduceMean_172 1 1 566_splitncnn_1 568 0=1 4=1
InnerProduct Conv_173 1 1 568 571 0=16 2=2048 9=2 -23310=1,2.221507e-01
InnerProduct Conv_175 1 1 571 573 0=128 2=2048 9=4
BinaryOp Mul_177 2 1 566_splitncnn_0 573 574 0=2
BinaryOp Add_178 2 1 574 560_splitncnn_0 575
PReLU PRelu_179 1 1 575 577 0=128
Split splitncnn_22 1 2 577 577_splitncnn_0 577_splitncnn_1
Convolution Conv_180 1 1 577_splitncnn_1 579 0=128 1=3 4=1 5=1 6=147456
PReLU PRelu_182 1 1 579 581 0=128
Convolution Conv_183 1 1 581 583 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_23 1 2 583 583_splitncnn_0 583_splitncnn_1
Pooling ReduceMean_186 1 1 583_splitncnn_1 585 0=1 4=1
InnerProduct Conv_187 1 1 585 588 0=16 2=2048 9=2 -23310=1,1.850068e-01
InnerProduct Conv_189 1 1 588 590 0=128 2=2048 9=4
BinaryOp Mul_191 2 1 583_splitncnn_0 590 591 0=2
BinaryOp Add_192 2 1 591 577_splitncnn_0 592
PReLU PRelu_193 1 1 592 594 0=128
Split splitncnn_24 1 2 594 594_splitncnn_0 594_splitncnn_1
Convolution Conv_194 1 1 594_splitncnn_1 596 0=128 1=3 4=1 5=1 6=147456
PReLU PRelu_196 1 1 596 598 0=128
Convolution Conv_197 1 1 598 600 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_25 1 2 600 600_splitncnn_0 600_splitncnn_1
Pooling ReduceMean_200 1 1 600_splitncnn_1 602 0=1 4=1
InnerProduct Conv_201 1 1 602 605 0=16 2=2048 9=2 -23310=1,1.788969e-01
InnerProduct Conv_203 1 1 605 607 0=128 2=2048 9=4
BinaryOp Mul_205 2 1 600_splitncnn_0 607 608 0=2
BinaryOp Add_206 2 1 608 594_splitncnn_0 609
PReLU PRelu_207 1 1 609 611 0=128
Convolution Conv_208 1 1 611 612 0=8 1=3 4=1 5=1 6=9216
PixelShuffle DepthToSpace_209 1 1 612 613 0=2
Interp Resize_211 1 1 613 623 0=2 1=2.000000e+00 2=2.000000e+00
Split splitncnn_26 1 2 623 623_splitncnn_0 623_splitncnn_1
BinaryOp Add_212 2 1 471_splitncnn_1 623_splitncnn_1 624
Split splitncnn_27 1 3 624 624_splitncnn_0 624_splitncnn_1 624_splitncnn_2
Crop Slice_217 1 1 343_splitncnn_1 629 -23309=1,0 -23310=1,3 -23311=1,0
rife.Warp Warp_223 2 1 629 624_splitncnn_2 635
Crop Slice_228 1 1 343_splitncnn_0 640 -23309=1,3 -23310=1,2147483647 -23311=1,0
UnaryOp Neg_229 1 1 624_splitncnn_1 641 0=1
rife.Warp Warp_235 2 1 640 641 647
Concat Concat_236 3 1 635 647 624_splitncnn_0 648
Convolution Conv_237 1 1 648 650 0=64 1=3 3=2 4=1 5=1 6=4608
PReLU PRelu_239 1 1 650 652 0=64
Split splitncnn_28 1 2 652 652_splitncnn_0 652_splitncnn_1
Convolution Conv_240 1 1 652_splitncnn_1 654 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_242 1 1 654 656 0=64
Convolution Conv_243 1 1 656 658 0=64 1=3 4=1 5=1 6=36864
Split splitncnn_29 1 2 658 658_splitncnn_0 658_splitncnn_1
Pooling ReduceMean_246 1 1 658_splitncnn_1 660 0=1 4=1
InnerProduct Conv_247 1 1 660 663 0=16 2=1024 9=2 -23310=1,1.606955e-01
InnerProduct Conv_249 1 1 663 665 0=64 2=1024 9=4
BinaryOp Mul_251 2 1 658_splitncnn_0 665 666 0=2
BinaryOp Add_252 2 1 666 652_splitncnn_0 667
PReLU PRelu_253 1 1 667 669 0=64
Split splitncnn_30 1 2 669 669_splitncnn_0 669_splitncnn_1
Convolution Conv_254 1 1 669_splitncnn_1 671 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_256 1 1 671 673 0=64
Convolution Conv_257 1 1 673 675 0=64 1=3 4=1 5=1 6=36864
Split splitncnn_31 1 2 675 675_splitncnn_0 675_splitncnn_1
Pooling ReduceMean_260 1 1 675_splitncnn_1 677 0=1 4=1
InnerProduct Conv_261 1 1 677 680 0=16 2=1024 9=2 -23310=1,3.747779e-01
InnerProduct Conv_263 1 1 680 682 0=64 2=1024 9=4
BinaryOp Mul_265 2 1 675_splitncnn_0 682 683 0=2
BinaryOp Add_266 2 1 683 669_splitncnn_0 684
PReLU PRelu_267 1 1 684 686 0=64
Split splitncnn_32 1 2 686 686_splitncnn_0 686_splitncnn_1
Convolution Conv_268 1 1 686_splitncnn_1 688 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_270 1 1 688 690 0=64
Convolution Conv_271 1 1 690 692 0=64 1=3 4=1 5=1 6=36864
Split splitncnn_33 1 2 692 692_splitncnn_0 692_splitncnn_1
Pooling ReduceMean_274 1 1 692_splitncnn_1 694 0=1 4=1
InnerProduct Conv_275 1 1 694 697 0=16 2=1024 9=2 -23310=1,5.849604e-01
InnerProduct Conv_277 1 1 697 699 0=64 2=1024 9=4
BinaryOp Mul_279 2 1 692_splitncnn_0 699 700 0=2
BinaryOp Add_280 2 1 700 686_splitncnn_0 701
PReLU PRelu_281 1 1 701 703 0=64
Split splitncnn_34 1 2 703 703_splitncnn_0 703_splitncnn_1
Convolution Conv_282 1 1 703_splitncnn_1 705 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_284 1 1 705 707 0=64
Convolution Conv_285 1 1 707 709 0=64 1=3 4=1 5=1 6=36864
Split splitncnn_35 1 2 709 709_splitncnn_0 709_splitncnn_1
Pooling ReduceMean_288 1 1 709_splitncnn_1 711 0=1 4=1
InnerProduct Conv_289 1 1 711 714 0=16 2=1024 9=2 -23310=1,2.789340e-01
InnerProduct Conv_291 1 1 714 716 0=64 2=1024 9=4
BinaryOp Mul_293 2 1 709_splitncnn_0 716 717 0=2
BinaryOp Add_294 2 1 717 703_splitncnn_0 718
PReLU PRelu_295 1 1 718 720 0=64
Split splitncnn_36 1 2 720 720_splitncnn_0 720_splitncnn_1
Convolution Conv_296 1 1 720_splitncnn_1 722 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_298 1 1 722 724 0=64
Convolution Conv_299 1 1 724 726 0=64 1=3 4=1 5=1 6=36864
Split splitncnn_37 1 2 726 726_splitncnn_0 726_splitncnn_1
Pooling ReduceMean_302 1 1 726_splitncnn_1 728 0=1 4=1
InnerProduct Conv_303 1 1 728 731 0=16 2=1024 9=2 -23310=1,4.707932e-01
InnerProduct Conv_305 1 1 731 733 0=64 2=1024 9=4
BinaryOp Mul_307 2 1 726_splitncnn_0 733 734 0=2
BinaryOp Add_308 2 1 734 720_splitncnn_0 735
PReLU PRelu_309 1 1 735 737 0=64
Split splitncnn_38 1 2 737 737_splitncnn_0 737_splitncnn_1
Convolution Conv_310 1 1 737_splitncnn_1 739 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_312 1 1 739 741 0=64
Convolution Conv_313 1 1 741 743 0=64 1=3 4=1 5=1 6=36864
Split splitncnn_39 1 2 743 743_splitncnn_0 743_splitncnn_1
Pooling ReduceMean_316 1 1 743_splitncnn_1 745 0=1 4=1
InnerProduct Conv_317 1 1 745 748 0=16 2=1024 9=2 -23310=1,7.429121e-01
InnerProduct Conv_319 1 1 748 750 0=64 2=1024 9=4
BinaryOp Mul_321 2 1 743_splitncnn_0 750 751 0=2
BinaryOp Add_322 2 1 751 737_splitncnn_0 752
PReLU PRelu_323 1 1 752 754 0=64
Convolution Conv_324 1 1 754 755 0=8 1=3 4=1 5=1 6=4608
PixelShuffle DepthToSpace_325 1 1 755 756 0=2
BinaryOp Add_326 2 1 471_splitncnn_0 623_splitncnn_0 757
BinaryOp Add_327 2 1 757 756 flow

BIN
models/rife/rife/fusionnet.bin vendored Normal file

Binary file not shown.

101
models/rife/rife/fusionnet.param vendored Normal file
View File

@ -0,0 +1,101 @@
7767517
99 116
Input img0 0 1 img0
Input img1 0 1 img1
Input flow 0 1 flow
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 flow 74 0=2 1=2.000000e+00 2=2.000000e+00
BinaryOp Mul_3 1 1 74 76 0=2 1=1 2=2.000000e+00
Split splitncnn_0 1 3 76 76_splitncnn_0 76_splitncnn_1 76_splitncnn_2
rife.Warp Warp_9 2 1 img0 76_splitncnn_2 82
Split splitncnn_1 1 2 82 82_splitncnn_0 82_splitncnn_1
UnaryOp Neg_10 1 1 76_splitncnn_1 83 0=1
rife.Warp Warp_16 2 1 img1 83 89
Split splitncnn_2 1 2 89 89_splitncnn_0 89_splitncnn_1
Concat Concat_17 3 1 82_splitncnn_1 89_splitncnn_1 76_splitncnn_0 90
Split splitncnn_3 1 2 90 90_splitncnn_0 90_splitncnn_1
Convolution Conv_18 1 1 90_splitncnn_1 91 0=32 1=3 3=2 4=1 6=2304
Convolution Conv_19 1 1 90_splitncnn_0 92 0=32 1=3 3=2 4=1 5=1 6=2304
PReLU PRelu_20 1 1 92 94 0=32
Convolution Conv_21 1 1 94 95 0=32 1=3 4=1 5=1 6=9216
Split splitncnn_4 1 2 95 95_splitncnn_0 95_splitncnn_1
Pooling ReduceMean_23 1 1 95_splitncnn_1 97 0=1 4=1
InnerProduct Conv_24 1 1 97 100 0=16 2=512 9=2 -23310=1,8.258036e-02
InnerProduct Conv_26 1 1 100 102 0=32 2=512 9=4
BinaryOp Mul_28 2 1 95_splitncnn_0 102 103 0=2
BinaryOp Add_29 2 1 103 91 104
PReLU PRelu_30 1 1 104 106 0=32
Split splitncnn_5 1 2 106 106_splitncnn_0 106_splitncnn_1
Concat Concat_31 3 1 106_splitncnn_1 3 7 107
Split splitncnn_6 1 2 107 107_splitncnn_0 107_splitncnn_1
Convolution Conv_32 1 1 107_splitncnn_1 108 0=64 1=3 3=2 4=1 6=36864
Convolution Conv_33 1 1 107_splitncnn_0 109 0=64 1=3 3=2 4=1 5=1 6=36864
PReLU PRelu_34 1 1 109 111 0=64
Convolution Conv_35 1 1 111 112 0=64 1=3 4=1 5=1 6=36864
Split splitncnn_7 1 2 112 112_splitncnn_0 112_splitncnn_1
Pooling ReduceMean_37 1 1 112_splitncnn_1 114 0=1 4=1
InnerProduct Conv_38 1 1 114 117 0=16 2=1024 9=2 -23310=1,1.095001e-01
InnerProduct Conv_40 1 1 117 119 0=64 2=1024 9=4
BinaryOp Mul_42 2 1 112_splitncnn_0 119 120 0=2
BinaryOp Add_43 2 1 120 108 121
PReLU PRelu_44 1 1 121 123 0=64
Split splitncnn_8 1 2 123 123_splitncnn_0 123_splitncnn_1
Concat Concat_45 3 1 123_splitncnn_1 4 8 124
Split splitncnn_9 1 2 124 124_splitncnn_0 124_splitncnn_1
Convolution Conv_46 1 1 124_splitncnn_1 125 0=128 1=3 3=2 4=1 6=147456
Convolution Conv_47 1 1 124_splitncnn_0 126 0=128 1=3 3=2 4=1 5=1 6=147456
PReLU PRelu_48 1 1 126 128 0=128
Convolution Conv_49 1 1 128 129 0=128 1=3 4=1 5=1 6=147456
Split splitncnn_10 1 2 129 129_splitncnn_0 129_splitncnn_1
Pooling ReduceMean_51 1 1 129_splitncnn_1 131 0=1 4=1
InnerProduct Conv_52 1 1 131 134 0=16 2=2048 9=2 -23310=1,1.442167e-02
InnerProduct Conv_54 1 1 134 136 0=128 2=2048 9=4
BinaryOp Mul_56 2 1 129_splitncnn_0 136 137 0=2
BinaryOp Add_57 2 1 137 125 138
PReLU PRelu_58 1 1 138 140 0=128
Split splitncnn_11 1 2 140 140_splitncnn_0 140_splitncnn_1
Concat Concat_59 3 1 140_splitncnn_1 5 9 141
Split splitncnn_12 1 2 141 141_splitncnn_0 141_splitncnn_1
Convolution Conv_60 1 1 141_splitncnn_1 142 0=256 1=3 3=2 4=1 6=589824
Convolution Conv_61 1 1 141_splitncnn_0 143 0=256 1=3 3=2 4=1 5=1 6=589824
PReLU PRelu_62 1 1 143 145 0=256
Convolution Conv_63 1 1 145 146 0=256 1=3 4=1 5=1 6=589824
Split splitncnn_13 1 2 146 146_splitncnn_0 146_splitncnn_1
Pooling ReduceMean_65 1 1 146_splitncnn_1 148 0=1 4=1
InnerProduct Conv_66 1 1 148 151 0=16 2=4096 9=2 -23310=1,1.379933e-02
InnerProduct Conv_68 1 1 151 153 0=256 2=4096 9=4
BinaryOp Mul_70 2 1 146_splitncnn_0 153 154 0=2
BinaryOp Add_71 2 1 154 142 155
PReLU PRelu_72 1 1 155 157 0=256
Concat Concat_73 3 1 157 6 10 158
Deconvolution ConvTranspose_74 1 1 158 159 0=128 1=4 3=2 4=1 5=1 6=1048576
PReLU PRelu_75 1 1 159 161 0=128
Concat Concat_76 2 1 161 140_splitncnn_0 162
Deconvolution ConvTranspose_77 1 1 162 163 0=64 1=4 3=2 4=1 5=1 6=262144
PReLU PRelu_78 1 1 163 165 0=64
Concat Concat_79 2 1 165 123_splitncnn_0 166
Deconvolution ConvTranspose_80 1 1 166 167 0=32 1=4 3=2 4=1 5=1 6=65536
PReLU PRelu_81 1 1 167 169 0=32
Concat Concat_82 2 1 169 106_splitncnn_0 170
Deconvolution ConvTranspose_83 1 1 170 171 0=16 1=4 3=2 4=1 5=1 6=16384
PReLU PRelu_84 1 1 171 173 0=16
Convolution Conv_85 1 1 173 175 0=4 1=3 4=1 5=1 6=576 9=4
Split splitncnn_14 1 2 175 175_splitncnn_0 175_splitncnn_1
Crop Slice_91 1 1 175_splitncnn_1 180 -23309=1,0 -23310=1,3 -23311=1,0
BinaryOp Mul_93 1 1 180 182 0=2 1=1 2=2.000000e+00
BinaryOp Sub_95 1 1 182 184 0=1 1=1 2=1.000000e+00
Crop Slice_100 1 1 175_splitncnn_0 189 -23309=1,3 -23310=1,4 -23311=1,0
Split splitncnn_15 1 2 189 189_splitncnn_0 189_splitncnn_1
BinaryOp Mul_101 2 1 82_splitncnn_0 189_splitncnn_1 190 0=2
BinaryOp Sub_103 1 1 189_splitncnn_0 192 0=7 1=1 2=1.000000e+00
BinaryOp Mul_104 2 1 89_splitncnn_0 192 193 0=2
BinaryOp Add_105 2 1 190 193 194
BinaryOp Add_106 2 1 194 184 195
Clip Clip_107 1 1 195 output 0=0.000000e+00 1=1.000000e+00

View File

@ -1,5 +1,7 @@
#include "avutils.h" #include "avutils.h"
#include <cstdint>
extern "C" { extern "C" {
#include <libavcodec/avcodec.h> #include <libavcodec/avcodec.h>
#include <libavutil/pixdesc.h> #include <libavutil/pixdesc.h>
@ -7,6 +9,25 @@ extern "C" {
#include <spdlog/spdlog.h> #include <spdlog/spdlog.h>
#include "conversions.h"
AVRational get_video_frame_rate(AVFormatContext *ifmt_ctx, int in_vstream_idx) {
AVRational frame_rate = ifmt_ctx->streams[in_vstream_idx]->avg_frame_rate;
if (frame_rate.num == 0 && frame_rate.den == 0) {
frame_rate = ifmt_ctx->streams[in_vstream_idx]->r_frame_rate;
}
if (frame_rate.num == 0 && frame_rate.den == 0) {
frame_rate = av_guess_frame_rate(ifmt_ctx, ifmt_ctx->streams[in_vstream_idx], nullptr);
}
if (frame_rate.num == 0 && frame_rate.den == 0) {
frame_rate = ifmt_ctx->streams[in_vstream_idx]->time_base;
}
if (frame_rate.num == 0 && frame_rate.den == 0) {
spdlog::warn("Unable to determine the video's frame rate");
}
return frame_rate;
}
int64_t get_video_frame_count(AVFormatContext *ifmt_ctx, int in_vstream_idx) { int64_t get_video_frame_count(AVFormatContext *ifmt_ctx, int in_vstream_idx) {
// Use the 'nb_frames' field if it is available // Use the 'nb_frames' field if it is available
int64_t nb_frames = ifmt_ctx->streams[in_vstream_idx]->nb_frames; int64_t nb_frames = ifmt_ctx->streams[in_vstream_idx]->nb_frames;
@ -31,19 +52,7 @@ int64_t get_video_frame_count(AVFormatContext *ifmt_ctx, int in_vstream_idx) {
spdlog::debug("Video duration: {}s", duration_secs); spdlog::debug("Video duration: {}s", duration_secs);
// Calculate average FPS // Calculate average FPS
double fps = av_q2d(ifmt_ctx->streams[in_vstream_idx]->avg_frame_rate); double fps = av_q2d(get_video_frame_rate(ifmt_ctx, in_vstream_idx));
if (fps <= 0) {
spdlog::debug("Unable to read the average frame rate from 'avg_frame_rate'");
fps = av_q2d(ifmt_ctx->streams[in_vstream_idx]->r_frame_rate);
}
if (fps <= 0) {
spdlog::debug("Unable to read the average frame rate from 'r_frame_rate'");
fps = av_q2d(av_guess_frame_rate(ifmt_ctx, ifmt_ctx->streams[in_vstream_idx], nullptr));
}
if (fps <= 0) {
spdlog::debug("Unable to estimate the average frame rate with 'av_guess_frame_rate'");
fps = av_q2d(ifmt_ctx->streams[in_vstream_idx]->time_base);
}
if (fps <= 0) { if (fps <= 0) {
spdlog::warn("Unable to estimate the video's average frame rate"); spdlog::warn("Unable to estimate the video's average frame rate");
return -1; return -1;
@ -122,3 +131,58 @@ get_encoder_default_pix_fmt(const AVCodec *encoder, AVPixelFormat target_pix_fmt
return best_pix_fmt; return best_pix_fmt;
} }
float get_frame_diff(AVFrame *frame1, AVFrame *frame2) {
if (!frame1 || !frame2) {
spdlog::error("Invalid frame(s) provided for comparison");
return -1.0f;
}
if (frame1->width != frame2->width || frame1->height != frame2->height) {
spdlog::error("Frame dimensions do not match");
return -1.0f;
}
int width = frame1->width;
int height = frame1->height;
// Convert both frames to the target pixel format using the provided function
AVPixelFormat target_pix_fmt = AV_PIX_FMT_RGB24;
AVFrame *rgb_frame1 = convert_avframe_pix_fmt(frame1, target_pix_fmt);
AVFrame *rgb_frame2 = convert_avframe_pix_fmt(frame2, target_pix_fmt);
if (!rgb_frame1 || !rgb_frame2) {
spdlog::error("Failed to convert frames to target pixel format");
if (rgb_frame1) {
av_frame_free(&rgb_frame1);
}
if (rgb_frame2) {
av_frame_free(&rgb_frame2);
}
return -1.0f;
}
uint64_t sum_diff = 0;
uint64_t max_diff = 0;
// Calculate difference pixel by pixel
for (int y = 0; y < height; y++) {
uint8_t *ptr1 = rgb_frame1->data[0] + y * rgb_frame1->linesize[0];
uint8_t *ptr2 = rgb_frame2->data[0] + y * rgb_frame2->linesize[0];
for (int x = 0; x < width * 3; x++) {
sum_diff += static_cast<uint64_t>(
std::abs(static_cast<int>(ptr1[x]) - static_cast<int>(ptr2[x]))
);
max_diff += 255;
}
}
// Clean up
av_frame_free(&rgb_frame1);
av_frame_free(&rgb_frame2);
// Calculate percentage difference
float percent_diff = (static_cast<float>(sum_diff) / static_cast<float>(max_diff)) * 100.0f;
return percent_diff;
}

View File

@ -33,6 +33,7 @@ int Encoder::init(
AVFormatContext *ifmt_ctx, AVFormatContext *ifmt_ctx,
AVCodecContext *dec_ctx, AVCodecContext *dec_ctx,
EncoderConfig *encoder_config, EncoderConfig *encoder_config,
const ProcessorConfig *processor_config,
int in_vstream_idx int in_vstream_idx
) { ) {
int ret; int ret;
@ -121,18 +122,26 @@ int Encoder::init(
spdlog::debug("Auto-selected pixel format: {}", av_get_pix_fmt_name(enc_ctx_->pix_fmt)); spdlog::debug("Auto-selected pixel format: {}", av_get_pix_fmt_name(enc_ctx_->pix_fmt));
} }
// Set the output video's time base if (processor_config->frm_rate_mul > 0) {
if (dec_ctx->time_base.num > 0 && dec_ctx->time_base.den > 0) { AVRational in_frame_rate = get_video_frame_rate(ifmt_ctx, in_vstream_idx);
enc_ctx_->time_base = dec_ctx->time_base; enc_ctx_->framerate = {
in_frame_rate.num * processor_config->frm_rate_mul, in_frame_rate.den
};
enc_ctx_->time_base = av_inv_q(enc_ctx_->framerate);
} else { } else {
enc_ctx_->time_base = av_inv_q(av_guess_frame_rate(ifmt_ctx, out_vstream, nullptr)); // Set the output video's time base
} if (dec_ctx->time_base.num > 0 && dec_ctx->time_base.den > 0) {
enc_ctx_->time_base = dec_ctx->time_base;
} else {
enc_ctx_->time_base = av_inv_q(av_guess_frame_rate(ifmt_ctx, out_vstream, nullptr));
}
// Set the output video's frame rate // Set the output video's frame rate
if (dec_ctx->framerate.num > 0 && dec_ctx->framerate.den > 0) { if (dec_ctx->framerate.num > 0 && dec_ctx->framerate.den > 0) {
enc_ctx_->framerate = dec_ctx->framerate; enc_ctx_->framerate = dec_ctx->framerate;
} else { } else {
enc_ctx_->framerate = av_guess_frame_rate(ifmt_ctx, out_vstream, nullptr); enc_ctx_->framerate = av_guess_frame_rate(ifmt_ctx, out_vstream, nullptr);
}
} }
// Set extra AVOptions // Set extra AVOptions
@ -230,6 +239,13 @@ int Encoder::init(
} }
} }
// Write the output file header
ret = avformat_write_header(ofmt_ctx_, nullptr);
if (ret < 0) {
spdlog::error("Error writing output file header");
return ret;
}
return 0; return 0;
} }

View File

@ -1,4 +1,4 @@
#include "libplacebo_filter.h" #include "filter_libplacebo.h"
#include <cstdio> #include <cstdio>
@ -8,81 +8,81 @@
#include "fsutils.h" #include "fsutils.h"
#include "libplacebo.h" #include "libplacebo.h"
LibplaceboFilter::LibplaceboFilter( FilterLibplacebo::FilterLibplacebo(
uint32_t vk_device_index, uint32_t vk_device_index,
const std::filesystem::path &shader_path, const std::filesystem::path &shader_path,
int out_width, int width,
int out_height int height
) )
: filter_graph(nullptr), : filter_graph_(nullptr),
buffersrc_ctx(nullptr), buffersrc_ctx_(nullptr),
buffersink_ctx(nullptr), buffersink_ctx_(nullptr),
vk_device_index(vk_device_index), vk_device_index_(vk_device_index),
shader_path(std::move(shader_path)), shader_path_(std::move(shader_path)),
out_width(out_width), width_(width),
out_height(out_height) {} height_(height) {}
LibplaceboFilter::~LibplaceboFilter() { FilterLibplacebo::~FilterLibplacebo() {
if (buffersrc_ctx) { if (buffersrc_ctx_) {
avfilter_free(buffersrc_ctx); avfilter_free(buffersrc_ctx_);
buffersrc_ctx = nullptr; buffersrc_ctx_ = nullptr;
} }
if (buffersink_ctx) { if (buffersink_ctx_) {
avfilter_free(buffersink_ctx); avfilter_free(buffersink_ctx_);
buffersink_ctx = nullptr; buffersink_ctx_ = nullptr;
} }
if (filter_graph) { if (filter_graph_) {
avfilter_graph_free(&filter_graph); avfilter_graph_free(&filter_graph_);
filter_graph = nullptr; filter_graph_ = nullptr;
} }
} }
int LibplaceboFilter::init(AVCodecContext *dec_ctx, AVCodecContext *enc_ctx, AVBufferRef *_) { int FilterLibplacebo::init(AVCodecContext *dec_ctx, AVCodecContext *enc_ctx, AVBufferRef *) {
// Construct the shader path // Construct the shader path
std::filesystem::path shader_full_path; std::filesystem::path shader_full_path;
if (filepath_is_readable(shader_path)) { if (filepath_is_readable(shader_path_)) {
// If the shader path is directly readable, use it // If the shader path is directly readable, use it
shader_full_path = shader_path; shader_full_path = shader_path_;
} else { } else {
// Construct the fallback path using std::filesystem // Construct the fallback path using std::filesystem
shader_full_path = find_resource_file( shader_full_path = find_resource_file(
std::filesystem::path(STR("models")) / STR("libplacebo") / std::filesystem::path(STR("models")) / STR("libplacebo") /
(path_to_string_type(shader_path) + STR(".glsl")) (path_to_string_type(shader_path_) + STR(".glsl"))
); );
} }
// Check if the shader file exists // Check if the shader file exists
if (!std::filesystem::exists(shader_full_path)) { if (!std::filesystem::exists(shader_full_path)) {
spdlog::error("libplacebo shader file not found: '{}'", shader_path.u8string()); spdlog::error("libplacebo shader file not found: '{}'", shader_path_.u8string());
return -1; return -1;
} }
// Save the output time base // Save the output time base
in_time_base = dec_ctx->time_base; in_time_base_ = dec_ctx->time_base;
out_time_base = enc_ctx->time_base; out_time_base_ = enc_ctx->time_base;
// Initialize the libplacebo filter // Initialize the libplacebo filter
int ret = init_libplacebo( int ret = init_libplacebo(
&filter_graph, &filter_graph_,
&buffersrc_ctx, &buffersrc_ctx_,
&buffersink_ctx, &buffersink_ctx_,
dec_ctx, dec_ctx,
out_width, width_,
out_height, height_,
vk_device_index, vk_device_index_,
shader_full_path shader_full_path
); );
// Set these resources to nullptr since they are already freed by `avfilter_graph_free` // Set these resources to nullptr since they are already freed by `avfilter_graph_free`
if (ret < 0) { if (ret < 0) {
buffersrc_ctx = nullptr; buffersrc_ctx_ = nullptr;
buffersink_ctx = nullptr; buffersink_ctx_ = nullptr;
filter_graph = nullptr; filter_graph_ = nullptr;
} }
return ret; return ret;
} }
int LibplaceboFilter::process_frame(AVFrame *in_frame, AVFrame **out_frame) { int FilterLibplacebo::filter(AVFrame *in_frame, AVFrame **out_frame) {
int ret; int ret;
// Get the filtered frame // Get the filtered frame
@ -93,28 +93,28 @@ int LibplaceboFilter::process_frame(AVFrame *in_frame, AVFrame **out_frame) {
} }
// Feed the frame to the filter graph // Feed the frame to the filter graph
ret = av_buffersrc_add_frame(buffersrc_ctx, in_frame); ret = av_buffersrc_add_frame(buffersrc_ctx_, in_frame);
if (ret < 0) { if (ret < 0) {
spdlog::error("Error while feeding the filter graph"); spdlog::error("Error while feeding the filter graph");
av_frame_free(out_frame); av_frame_free(out_frame);
return ret; return ret;
} }
ret = av_buffersink_get_frame(buffersink_ctx, *out_frame); ret = av_buffersink_get_frame(buffersink_ctx_, *out_frame);
if (ret < 0) { if (ret < 0) {
av_frame_free(out_frame); av_frame_free(out_frame);
return ret; return ret;
} }
// Rescale PTS to encoder's time base // Rescale PTS to encoder's time base
(*out_frame)->pts = av_rescale_q((*out_frame)->pts, in_time_base, out_time_base); (*out_frame)->pts = av_rescale_q((*out_frame)->pts, in_time_base_, out_time_base_);
// Return the processed frame to the caller // Return the processed frame to the caller
return 0; return 0;
} }
int LibplaceboFilter::flush(std::vector<AVFrame *> &flushed_frames) { int FilterLibplacebo::flush(std::vector<AVFrame *> &flushed_frames) {
int ret = av_buffersrc_add_frame(buffersrc_ctx, nullptr); int ret = av_buffersrc_add_frame(buffersrc_ctx_, nullptr);
if (ret < 0) { if (ret < 0) {
spdlog::error("Error while flushing filter graph"); spdlog::error("Error while flushing filter graph");
return ret; return ret;
@ -127,7 +127,7 @@ int LibplaceboFilter::flush(std::vector<AVFrame *> &flushed_frames) {
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
} }
ret = av_buffersink_get_frame(buffersink_ctx, filt_frame); ret = av_buffersink_get_frame(buffersink_ctx_, filt_frame);
if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) { if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
av_frame_free(&filt_frame); av_frame_free(&filt_frame);
break; break;
@ -138,7 +138,7 @@ int LibplaceboFilter::flush(std::vector<AVFrame *> &flushed_frames) {
} }
// Rescale PTS to encoder's time base // Rescale PTS to encoder's time base
filt_frame->pts = av_rescale_q(filt_frame->pts, in_time_base, out_time_base); filt_frame->pts = av_rescale_q(filt_frame->pts, in_time_base_, out_time_base_);
// Add to processed frames // Add to processed frames
flushed_frames.push_back(filt_frame); flushed_frames.push_back(filt_frame);
@ -146,3 +146,14 @@ int LibplaceboFilter::flush(std::vector<AVFrame *> &flushed_frames) {
return 0; return 0;
} }
void FilterLibplacebo::get_output_dimensions(
const ProcessorConfig *processor_config,
int,
int,
int &out_width,
int &out_height
) const {
out_width = processor_config->width;
out_height = processor_config->height;
}

View File

@ -1,4 +1,4 @@
#include "realesrgan_filter.h" #include "filter_realesrgan.h"
#include <cstdint> #include <cstdint>
#include <cstdio> #include <cstdio>
@ -9,34 +9,34 @@
#include "conversions.h" #include "conversions.h"
#include "fsutils.h" #include "fsutils.h"
RealesrganFilter::RealesrganFilter( FilterRealesrgan::FilterRealesrgan(
int gpuid, int gpuid,
bool tta_mode, bool tta_mode,
int scaling_factor, int scaling_factor,
const StringType model_name const StringType model_name
) )
: realesrgan(nullptr), : realesrgan_(nullptr),
gpuid(gpuid), gpuid_(gpuid),
tta_mode(tta_mode), tta_mode_(tta_mode),
scaling_factor(scaling_factor), scaling_factor_(scaling_factor),
model_name(std::move(model_name)) {} model_name_(std::move(model_name)) {}
RealesrganFilter::~RealesrganFilter() { FilterRealesrgan::~FilterRealesrgan() {
if (realesrgan) { if (realesrgan_) {
delete realesrgan; delete realesrgan_;
realesrgan = nullptr; realesrgan_ = nullptr;
} }
} }
int RealesrganFilter::init(AVCodecContext *dec_ctx, AVCodecContext *enc_ctx, AVBufferRef *_) { int FilterRealesrgan::init(AVCodecContext *dec_ctx, AVCodecContext *enc_ctx, AVBufferRef *_) {
// Construct the model paths using std::filesystem // Construct the model paths using std::filesystem
std::filesystem::path model_param_path; std::filesystem::path model_param_path;
std::filesystem::path model_bin_path; std::filesystem::path model_bin_path;
StringType param_file_name = StringType param_file_name =
model_name + STR("-x") + to_string_type(scaling_factor) + STR(".param"); model_name_ + STR("-x") + to_string_type(scaling_factor_) + STR(".param");
StringType bin_file_name = StringType bin_file_name =
model_name + STR("-x") + to_string_type(scaling_factor) + STR(".bin"); model_name_ + STR("-x") + to_string_type(scaling_factor_) + STR(".bin");
// Find the model paths by model name if provided // Find the model paths by model name if provided
model_param_path = std::filesystem::path(STR("models")) / STR("realesrgan") / param_file_name; model_param_path = std::filesystem::path(STR("models")) / STR("realesrgan") / param_file_name;
@ -57,39 +57,39 @@ int RealesrganFilter::init(AVCodecContext *dec_ctx, AVCodecContext *enc_ctx, AVB
} }
// Create a new RealESRGAN instance // Create a new RealESRGAN instance
realesrgan = new RealESRGAN(gpuid, tta_mode); realesrgan_ = new RealESRGAN(gpuid_, tta_mode_);
// Store the time bases // Store the time bases
in_time_base = dec_ctx->time_base; in_time_base_ = dec_ctx->time_base;
out_time_base = enc_ctx->time_base; out_time_base_ = enc_ctx->time_base;
out_pix_fmt = enc_ctx->pix_fmt; out_pix_fmt_ = enc_ctx->pix_fmt;
// Load the model // Load the model
if (realesrgan->load(model_param_full_path, model_bin_full_path) != 0) { if (realesrgan_->load(model_param_full_path, model_bin_full_path) != 0) {
spdlog::error("Failed to load RealESRGAN model"); spdlog::error("Failed to load RealESRGAN model");
return -1; return -1;
} }
// Set RealESRGAN parameters // Set RealESRGAN parameters
realesrgan->scale = scaling_factor; realesrgan_->scale = scaling_factor_;
realesrgan->prepadding = 10; realesrgan_->prepadding = 10;
// Calculate tilesize based on GPU heap budget // Calculate tilesize based on GPU heap budget
uint32_t heap_budget = ncnn::get_gpu_device(gpuid)->get_heap_budget(); uint32_t heap_budget = ncnn::get_gpu_device(gpuid_)->get_heap_budget();
if (heap_budget > 1900) { if (heap_budget > 1900) {
realesrgan->tilesize = 200; realesrgan_->tilesize = 200;
} else if (heap_budget > 550) { } else if (heap_budget > 550) {
realesrgan->tilesize = 100; realesrgan_->tilesize = 100;
} else if (heap_budget > 190) { } else if (heap_budget > 190) {
realesrgan->tilesize = 64; realesrgan_->tilesize = 64;
} else { } else {
realesrgan->tilesize = 32; realesrgan_->tilesize = 32;
} }
return 0; return 0;
} }
int RealesrganFilter::process_frame(AVFrame *in_frame, AVFrame **out_frame) { int FilterRealesrgan::filter(AVFrame *in_frame, AVFrame **out_frame) {
int ret; int ret;
// Convert the input frame to RGB24 // Convert the input frame to RGB24
@ -99,23 +99,34 @@ int RealesrganFilter::process_frame(AVFrame *in_frame, AVFrame **out_frame) {
return -1; return -1;
} }
// Allocate space for ouptut ncnn::Mat // Allocate space for output ncnn::Mat
int output_width = in_mat.w * realesrgan->scale; int output_width = in_mat.w * realesrgan_->scale;
int output_height = in_mat.h * realesrgan->scale; int output_height = in_mat.h * realesrgan_->scale;
ncnn::Mat out_mat = ncnn::Mat(output_width, output_height, static_cast<size_t>(3), 3); ncnn::Mat out_mat = ncnn::Mat(output_width, output_height, static_cast<size_t>(3), 3);
ret = realesrgan->process(in_mat, out_mat); ret = realesrgan_->process(in_mat, out_mat);
if (ret != 0) { if (ret != 0) {
spdlog::error("RealESRGAN processing failed"); spdlog::error("RealESRGAN processing failed");
return ret; return ret;
} }
// Convert ncnn::Mat to AVFrame // Convert ncnn::Mat to AVFrame
*out_frame = ncnn_mat_to_avframe(out_mat, out_pix_fmt); *out_frame = ncnn_mat_to_avframe(out_mat, out_pix_fmt_);
// Rescale PTS to encoder's time base // Rescale PTS to encoder's time base
(*out_frame)->pts = av_rescale_q(in_frame->pts, in_time_base, out_time_base); (*out_frame)->pts = av_rescale_q(in_frame->pts, in_time_base_, out_time_base_);
// Return the processed frame to the caller // Return the processed frame to the caller
return ret; return ret;
} }
void FilterRealesrgan::get_output_dimensions(
const ProcessorConfig *,
int in_width,
int in_height,
int &out_width,
int &out_height
) const {
out_width = in_width * scaling_factor_;
out_height = in_height * scaling_factor_;
}

371
src/frames_processor.cpp Normal file
View File

@ -0,0 +1,371 @@
#include "frames_processor.h"
extern "C" {
#include <libavutil/avutil.h>
}
#include <spdlog/spdlog.h>
#include "avutils.h"
// Deleter for AVFrame unique_ptr
auto av_frame_deleter = [](AVFrame *frame) {
if (frame != nullptr) {
av_frame_free(&frame);
frame = nullptr;
}
};
// Deleter for AVPacket unique_ptr
auto av_packet_deleter = [](AVPacket *packet) {
if (packet != nullptr) {
av_packet_unref(packet);
av_packet_free(&packet);
packet = nullptr;
}
};
// Sets the total number of frames to process in the VideoProcessingContext
void set_total_frames(
const ProcessorConfig *processor_config,
VideoProcessingContext *proc_ctx,
AVFormatContext *ifmt_ctx,
int in_vstream_idx,
Processor *processor
) {
spdlog::debug("Estimating the total number of frames to process");
proc_ctx->total_frames = get_video_frame_count(ifmt_ctx, in_vstream_idx);
if (proc_ctx->total_frames <= 0) {
spdlog::warn("Unable to determine the total number of frames");
proc_ctx->total_frames = 0;
} else {
spdlog::debug("{} frames to process", proc_ctx->total_frames);
}
// Set total frames for interpolation
if (processor->get_processing_mode() == PROCESSING_MODE_INTERPOLATE) {
proc_ctx->total_frames *= processor_config->frm_rate_mul;
}
}
int write_frame(
AVFrame *frame,
VideoProcessingContext *proc_ctx,
Encoder &encoder,
bool benchmark
) {
char errbuf[AV_ERROR_MAX_STRING_SIZE];
int ret = 0;
if (!benchmark) {
// Set the frame type to none to let the encoder decide
frame->pict_type = AV_PICTURE_TYPE_NONE;
ret = encoder.write_frame(frame, proc_ctx->processed_frames);
if (ret < 0) {
av_strerror(ret, errbuf, sizeof(errbuf));
spdlog::critical("Error encoding/writing frame: {}", errbuf);
}
}
return ret;
}
int write_raw_packet(
AVPacket *packet,
AVFormatContext *ifmt_ctx,
AVFormatContext *ofmt_ctx,
int *stream_map
) {
char errbuf[AV_ERROR_MAX_STRING_SIZE];
int ret = 0;
AVStream *in_stream = ifmt_ctx->streams[packet->stream_index];
int out_stream_index = stream_map[packet->stream_index];
AVStream *out_stream = ofmt_ctx->streams[out_stream_index];
av_packet_rescale_ts(packet, in_stream->time_base, out_stream->time_base);
packet->stream_index = out_stream_index;
ret = av_interleaved_write_frame(ofmt_ctx, packet);
if (ret < 0) {
av_strerror(ret, errbuf, sizeof(errbuf));
spdlog::critical("Error muxing audio/subtitle packet: {}", errbuf);
}
return ret;
}
int process_filtering(
Processor *processor,
VideoProcessingContext *proc_ctx,
Encoder &encoder,
bool benchmark,
AVFrame *frame,
AVFrame *raw_processed_frame
) {
char errbuf[AV_ERROR_MAX_STRING_SIZE];
int ret = 0;
// Cast the processor to a Filter
Filter *filter = static_cast<Filter *>(processor);
// Process the frame using the filter
ret = filter->filter(frame, &raw_processed_frame);
// Write the processed frame
if (ret < 0 && ret != AVERROR(EAGAIN)) {
av_strerror(ret, errbuf, sizeof(errbuf));
spdlog::critical("Error filtering frame: {}", errbuf);
} else if (ret == 0 && raw_processed_frame != nullptr) {
auto processed_frame = std::unique_ptr<AVFrame, decltype(av_frame_deleter)>(
raw_processed_frame, av_frame_deleter
);
ret = write_frame(processed_frame.get(), proc_ctx, encoder, benchmark);
}
return ret;
}
int process_interpolation(
Processor *processor,
const ProcessorConfig *processor_config,
VideoProcessingContext *proc_ctx,
Encoder &encoder,
bool benchmark,
std::unique_ptr<AVFrame, decltype(av_frame_deleter)> &prev_frame,
AVFrame *frame,
AVFrame *raw_processed_frame
) {
char errbuf[AV_ERROR_MAX_STRING_SIZE];
int ret = 0;
// Cast the processor to an Interpolator
Interpolator *interpolator = static_cast<Interpolator *>(processor);
// Calculate the time step for each frame
float time_step = 1.0f / static_cast<float>(processor_config->frm_rate_mul);
float current_time_step = time_step;
// Check if a scene change is detected
bool skip_frame = false;
if (prev_frame != nullptr) {
float frame_diff = get_frame_diff(prev_frame.get(), frame);
if (frame_diff > processor_config->scn_det_thresh) {
spdlog::debug(
"Scene change detected ({:.2f}%), skipping frame {}",
frame_diff,
proc_ctx->processed_frames
);
skip_frame = true;
}
}
// Write the interpolated frames
for (int i = 0; i < processor_config->frm_rate_mul - 1; i++) {
// Skip interpolation if this is the first frame
if (prev_frame == nullptr) {
break;
}
// Get the interpolated frame from the interpolator
if (!skip_frame) {
ret = interpolator->interpolate(
prev_frame.get(), frame, &raw_processed_frame, current_time_step
);
} else {
ret = 0;
raw_processed_frame = av_frame_clone(prev_frame.get());
}
// Write the interpolated frame
if (ret < 0 && ret != AVERROR(EAGAIN)) {
av_strerror(ret, errbuf, sizeof(errbuf));
spdlog::critical("Error interpolating frame: {}", errbuf);
return ret;
} else if (ret == 0 && raw_processed_frame != nullptr) {
auto processed_frame = std::unique_ptr<AVFrame, decltype(av_frame_deleter)>(
raw_processed_frame, av_frame_deleter
);
processed_frame->pts = proc_ctx->processed_frames;
ret = write_frame(processed_frame.get(), proc_ctx, encoder, benchmark);
if (ret < 0) {
return ret;
}
}
proc_ctx->processed_frames++;
current_time_step += time_step;
}
// Write the original frame
frame->pts = proc_ctx->processed_frames;
ret = write_frame(frame, proc_ctx, encoder, benchmark);
// Update the previous frame with the current frame
prev_frame.reset(av_frame_clone(frame));
return ret;
}
// Process frames using the selected filter.
int process_frames(
const EncoderConfig *encoder_config,
const ProcessorConfig *processor_config,
VideoProcessingContext *proc_ctx,
Decoder &decoder,
Encoder &encoder,
Processor *processor,
bool benchmark
) {
char errbuf[AV_ERROR_MAX_STRING_SIZE];
int ret = 0;
// Get required objects
AVFormatContext *ifmt_ctx = decoder.get_format_context();
AVCodecContext *dec_ctx = decoder.get_codec_context();
int in_vstream_idx = decoder.get_video_stream_index();
AVFormatContext *ofmt_ctx = encoder.get_format_context();
int *stream_map = encoder.get_stream_map();
// Reference to the previous frame does not require allocation
// It will be cloned from the current frame
std::unique_ptr<AVFrame, decltype(av_frame_deleter)> prev_frame(nullptr, av_frame_deleter);
// Allocate space for the decoded frames
std::unique_ptr<AVFrame, decltype(av_frame_deleter)> frame(av_frame_alloc(), av_frame_deleter);
if (frame == nullptr) {
spdlog::critical("Error allocating frame");
return AVERROR(ENOMEM);
}
// Allocate space for the decoded packets
std::unique_ptr<AVPacket, decltype(av_packet_deleter)> packet(
av_packet_alloc(), av_packet_deleter
);
if (packet == nullptr) {
spdlog::critical("Error allocating packet");
return AVERROR(ENOMEM);
}
// Set the total number of frames in the VideoProcessingContext
set_total_frames(processor_config, proc_ctx, ifmt_ctx, in_vstream_idx, processor);
// Read frames from the input file
while (!proc_ctx->abort) {
ret = av_read_frame(ifmt_ctx, packet.get());
if (ret < 0) {
if (ret == AVERROR_EOF) {
spdlog::debug("Reached end of file");
break;
}
av_strerror(ret, errbuf, sizeof(errbuf));
spdlog::critical("Error reading packet: {}", errbuf);
return ret;
}
if (packet->stream_index == in_vstream_idx) {
// Send the packet to the decoder for decoding
ret = avcodec_send_packet(dec_ctx, packet.get());
if (ret < 0) {
av_strerror(ret, errbuf, sizeof(errbuf));
spdlog::critical("Error sending packet to decoder: {}", errbuf);
return ret;
}
// Process frames decoded from the packet
while (!proc_ctx->abort) {
// Sleep for 100 ms if processing is paused
if (proc_ctx->pause) {
std::this_thread::sleep_for(std::chrono::milliseconds(100));
continue;
}
// Receive the decoded frame from the decoder
ret = avcodec_receive_frame(dec_ctx, frame.get());
if (ret == AVERROR(EAGAIN)) {
// No more frames from this packet
break;
} else if (ret < 0) {
av_strerror(ret, errbuf, sizeof(errbuf));
spdlog::critical("Error decoding video frame: {}", errbuf);
return ret;
}
AVFrame *raw_processed_frame = nullptr;
// Process the frame based on the selected processing mode
switch (processor->get_processing_mode()) {
case PROCESSING_MODE_FILTER: {
ret = process_filtering(
processor,
proc_ctx,
encoder,
benchmark,
frame.get(),
raw_processed_frame
);
break;
}
case PROCESSING_MODE_INTERPOLATE: {
ret = process_interpolation(
processor,
processor_config,
proc_ctx,
encoder,
benchmark,
prev_frame,
frame.get(),
raw_processed_frame
);
break;
}
default:
spdlog::critical("Unknown processing mode");
return -1;
}
if (ret < 0 && ret != AVERROR(EAGAIN)) {
return ret;
}
av_frame_unref(frame.get());
proc_ctx->processed_frames++;
spdlog::debug(
"Processed frame {}/{}", proc_ctx->processed_frames, proc_ctx->total_frames
);
}
} else if (encoder_config->copy_streams && stream_map[packet->stream_index] >= 0) {
write_raw_packet(packet.get(), ifmt_ctx, ofmt_ctx, stream_map);
}
av_packet_unref(packet.get());
}
// Flush the filter
std::vector<AVFrame *> raw_flushed_frames;
ret = processor->flush(raw_flushed_frames);
if (ret < 0) {
av_strerror(ret, errbuf, sizeof(errbuf));
spdlog::critical("Error flushing filter: {}", errbuf);
return ret;
}
// Wrap flushed frames in unique_ptrs
std::vector<std::unique_ptr<AVFrame, decltype(av_frame_deleter)>> flushed_frames;
for (AVFrame *raw_frame : raw_flushed_frames) {
flushed_frames.emplace_back(raw_frame, av_frame_deleter);
}
// Encode and write all flushed frames
for (auto &flushed_frame : flushed_frames) {
ret = write_frame(flushed_frame.get(), proc_ctx, encoder, benchmark);
if (ret < 0) {
return ret;
}
proc_ctx->processed_frames++;
}
// Flush the encoder
ret = encoder.flush();
if (ret < 0) {
av_strerror(ret, errbuf, sizeof(errbuf));
spdlog::critical("Error flushing encoder: {}", errbuf);
return ret;
}
return ret;
}

121
src/interpolator_rife.cpp Normal file
View File

@ -0,0 +1,121 @@
#include "interpolator_rife.h"
#include <cstdio>
#include <filesystem>
#include <spdlog/spdlog.h>
#include "conversions.h"
#include "fsutils.h"
InterpolatorRIFE::InterpolatorRIFE(
int gpuid,
bool tta_mode,
bool tta_temporal_mode,
bool uhd_mode,
int num_threads,
bool rife_v2,
bool rife_v4,
const StringType model_name
)
: rife_(nullptr),
gpuid_(gpuid),
tta_mode_(tta_mode),
tta_temporal_mode_(tta_temporal_mode),
uhd_mode_(uhd_mode),
num_threads_(num_threads),
rife_v2_(rife_v2),
rife_v4_(rife_v4),
model_name_(std::move(model_name)) {}
InterpolatorRIFE::~InterpolatorRIFE() {
if (rife_) {
delete rife_;
rife_ = nullptr;
}
}
int InterpolatorRIFE::init(AVCodecContext *dec_ctx, AVCodecContext *enc_ctx, AVBufferRef *) {
// Construct the model directory path using std::filesystem
std::filesystem::path model_param_dir;
// Find the model paths by model name if provided
model_param_dir = std::filesystem::path(STR("models")) / STR("rife") / model_name_;
// Get the full paths using a function that possibly modifies or validates the path
std::filesystem::path model_param_full_path = find_resource_file(model_param_dir);
// Check if the model files exist
if (!std::filesystem::exists(model_param_full_path)) {
spdlog::error("RIFE model param directory not found: {}", model_param_dir.u8string());
return -1;
}
// Create a new RIFE instance
rife_ = new RIFE(
gpuid_, tta_mode_, tta_temporal_mode_, uhd_mode_, num_threads_, rife_v2_, rife_v4_
);
// Store the time bases
in_time_base_ = dec_ctx->time_base;
out_time_base_ = enc_ctx->time_base;
out_pix_fmt_ = enc_ctx->pix_fmt;
// Load the model
if (rife_->load(model_param_full_path) != 0) {
spdlog::error("Failed to load RIFE model");
return -1;
}
return 0;
}
int InterpolatorRIFE::interpolate(
AVFrame *prev_frame,
AVFrame *in_frame,
AVFrame **out_frame,
float time_step
) {
int ret;
ncnn::Mat in_mat1 = avframe_to_ncnn_mat(prev_frame);
if (in_mat1.empty()) {
spdlog::error("Failed to convert AVFrame to ncnn::Mat");
return -1;
}
ncnn::Mat in_mat2 = avframe_to_ncnn_mat(in_frame);
if (in_mat2.empty()) {
spdlog::error("Failed to convert AVFrame to ncnn::Mat");
return -1;
}
// Allocate space for output ncnn::Mat
ncnn::Mat out_mat = ncnn::Mat(in_mat2.w, in_mat2.h, static_cast<size_t>(3), 3);
ret = rife_->process(in_mat1, in_mat2, time_step, out_mat);
if (ret != 0) {
spdlog::error("RIFE processing failed");
return ret;
}
// Convert ncnn::Mat to AVFrame
*out_frame = ncnn_mat_to_avframe(out_mat, out_pix_fmt_);
// Rescale PTS to encoder's time base
(*out_frame)->pts = av_rescale_q(in_frame->pts, in_time_base_, out_time_base_);
// Return the processed frame to the caller
return ret;
}
void InterpolatorRIFE::get_output_dimensions(
const ProcessorConfig *,
int in_width,
int in_height,
int &out_width,
int &out_height
) const {
out_width = in_width;
out_height = in_height;
}

View File

@ -3,7 +3,6 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <thread>
extern "C" { extern "C" {
#include <libavutil/avutil.h> #include <libavutil/avutil.h>
@ -11,199 +10,13 @@ extern "C" {
#include <spdlog/spdlog.h> #include <spdlog/spdlog.h>
#include "avutils.h"
#include "decoder.h" #include "decoder.h"
#include "encoder.h" #include "encoder.h"
#include "filter.h" #include "frames_processor.h"
#include "libplacebo_filter.h" #include "processor.h"
#include "realesrgan_filter.h" #include "processor_factory.h"
// Process frames using the selected filter. static void set_log_level(Libvideo2xLogLevel log_level) {
static int process_frames(
EncoderConfig *encoder_config,
VideoProcessingContext *proc_ctx,
Decoder &decoder,
Encoder &encoder,
Filter *filter,
bool benchmark = false
) {
char errbuf[AV_ERROR_MAX_STRING_SIZE];
int ret = 0;
// Get required objects
AVFormatContext *ifmt_ctx = decoder.get_format_context();
AVCodecContext *dec_ctx = decoder.get_codec_context();
int in_vstream_idx = decoder.get_video_stream_index();
AVFormatContext *ofmt_ctx = encoder.get_format_context();
int *stream_map = encoder.get_stream_map();
// Get total number of frames
spdlog::debug("Reading total number of frames");
proc_ctx->total_frames = get_video_frame_count(ifmt_ctx, in_vstream_idx);
if (proc_ctx->total_frames <= 0) {
spdlog::warn("Unable to determine the total number of frames");
} else {
spdlog::debug("{} frames to process", proc_ctx->total_frames);
}
// Allocate frame and packet
auto av_frame_deleter = [](AVFrame *frame) { av_frame_free(&frame); };
std::unique_ptr<AVFrame, decltype(av_frame_deleter)> frame(av_frame_alloc(), av_frame_deleter);
if (!frame) {
ret = AVERROR(ENOMEM);
return ret;
}
auto av_packet_deleter = [](AVPacket *packet) { av_packet_free(&packet); };
std::unique_ptr<AVPacket, decltype(av_packet_deleter)> packet(
av_packet_alloc(), av_packet_deleter
);
if (!packet) {
spdlog::critical("Could not allocate AVPacket");
return AVERROR(ENOMEM);
}
// Read frames from the input file
while (!proc_ctx->abort) {
ret = av_read_frame(ifmt_ctx, packet.get());
if (ret < 0) {
if (ret == AVERROR_EOF) {
spdlog::debug("Reached end of file");
break;
}
av_strerror(ret, errbuf, sizeof(errbuf));
spdlog::critical("Error reading packet: {}", errbuf);
return ret;
}
if (packet->stream_index == in_vstream_idx) {
ret = avcodec_send_packet(dec_ctx, packet.get());
if (ret < 0) {
av_strerror(ret, errbuf, sizeof(errbuf));
spdlog::critical("Error sending packet to decoder: {}", errbuf);
av_packet_unref(packet.get());
return ret;
}
while (!proc_ctx->abort) {
if (proc_ctx->pause) {
std::this_thread::sleep_for(std::chrono::milliseconds(100));
continue;
}
ret = avcodec_receive_frame(dec_ctx, frame.get());
if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
spdlog::debug("Frame not ready");
break;
} else if (ret < 0) {
av_strerror(ret, errbuf, sizeof(errbuf));
spdlog::critical("Error decoding video frame: {}", errbuf);
av_packet_unref(packet.get());
return ret;
}
AVFrame *raw_processed_frame = nullptr;
ret = filter->process_frame(frame.get(), &raw_processed_frame);
if (ret < 0 && ret != AVERROR(EAGAIN)) {
av_strerror(ret, errbuf, sizeof(errbuf));
av_packet_unref(packet.get());
return ret;
} else if (ret == 0 && raw_processed_frame != nullptr) {
auto processed_frame = std::unique_ptr<AVFrame, decltype(av_frame_deleter)>(
raw_processed_frame, av_frame_deleter
);
if (!benchmark) {
ret =
encoder.write_frame(processed_frame.get(), proc_ctx->processed_frames);
if (ret < 0) {
av_strerror(ret, errbuf, sizeof(errbuf));
spdlog::critical("Error encoding/writing frame: {}", errbuf);
av_packet_unref(packet.get());
return ret;
}
}
proc_ctx->processed_frames++;
}
av_frame_unref(frame.get());
spdlog::debug(
"Processed frame {}/{}", proc_ctx->processed_frames, proc_ctx->total_frames
);
}
} else if (encoder_config->copy_streams && stream_map[packet->stream_index] >= 0) {
AVStream *in_stream = ifmt_ctx->streams[packet->stream_index];
int out_stream_index = stream_map[packet->stream_index];
AVStream *out_stream = ofmt_ctx->streams[out_stream_index];
av_packet_rescale_ts(packet.get(), in_stream->time_base, out_stream->time_base);
packet->stream_index = out_stream_index;
ret = av_interleaved_write_frame(ofmt_ctx, packet.get());
if (ret < 0) {
av_strerror(ret, errbuf, sizeof(errbuf));
spdlog::critical("Error muxing audio/subtitle packet: {}", errbuf);
av_packet_unref(packet.get());
return ret;
}
}
av_packet_unref(packet.get());
}
// Flush the filter
std::vector<AVFrame *> raw_flushed_frames;
ret = filter->flush(raw_flushed_frames);
if (ret < 0) {
av_strerror(ret, errbuf, sizeof(errbuf));
spdlog::critical("Error flushing filter: {}", errbuf);
return ret;
}
// Wrap flushed frames in unique_ptrs
std::vector<std::unique_ptr<AVFrame, decltype(av_frame_deleter)>> flushed_frames;
for (AVFrame *raw_frame : raw_flushed_frames) {
flushed_frames.emplace_back(raw_frame, av_frame_deleter);
}
// Encode and write all flushed frames
for (auto &flushed_frame : flushed_frames) {
ret = encoder.write_frame(flushed_frame.get(), proc_ctx->processed_frames);
if (ret < 0) {
av_strerror(ret, errbuf, sizeof(errbuf));
spdlog::critical("Error encoding/writing flushed frame: {}", errbuf);
return ret;
}
proc_ctx->processed_frames++;
}
// Flush the encoder
ret = encoder.flush();
if (ret < 0) {
av_strerror(ret, errbuf, sizeof(errbuf));
spdlog::critical("Error flushing encoder: {}", errbuf);
return ret;
}
return ret;
}
extern "C" int process_video(
const CharType *in_fname,
const CharType *out_fname,
Libvideo2xLogLevel log_level,
bool benchmark,
uint32_t vk_device_index,
AVHWDeviceType hw_type,
const FilterConfig *filter_config,
EncoderConfig *encoder_config,
VideoProcessingContext *proc_ctx
) {
char errbuf[AV_ERROR_MAX_STRING_SIZE];
int ret = 0;
// Set the log level for FFmpeg and spdlog
switch (log_level) { switch (log_level) {
case LIBVIDEO2X_LOG_LEVEL_TRACE: case LIBVIDEO2X_LOG_LEVEL_TRACE:
av_log_set_level(AV_LOG_TRACE); av_log_set_level(AV_LOG_TRACE);
@ -238,13 +51,32 @@ extern "C" int process_video(
spdlog::set_level(spdlog::level::info); spdlog::set_level(spdlog::level::info);
break; break;
} }
}
extern "C" int process_video(
const CharType *in_fname,
const CharType *out_fname,
Libvideo2xLogLevel log_level,
bool benchmark,
uint32_t vk_device_index,
AVHWDeviceType hw_type,
const ProcessorConfig *processor_config,
EncoderConfig *encoder_config,
VideoProcessingContext *proc_ctx
) {
char errbuf[AV_ERROR_MAX_STRING_SIZE];
int ret = 0;
// Set the log level for FFmpeg and spdlog
set_log_level(log_level);
// Convert the file names to std::filesystem::path // Convert the file names to std::filesystem::path
std::filesystem::path in_fpath(in_fname); std::filesystem::path in_fpath(in_fname);
std::filesystem::path out_fpath(out_fname); std::filesystem::path out_fpath(out_fname);
// Create a smart pointer to manage the hardware device context
auto hw_ctx_deleter = [](AVBufferRef *ref) { auto hw_ctx_deleter = [](AVBufferRef *ref) {
if (ref) { if (ref != nullptr) {
av_buffer_unref(&ref); av_buffer_unref(&ref);
} }
}; };
@ -275,22 +107,24 @@ extern "C" int process_video(
AVCodecContext *dec_ctx = decoder.get_codec_context(); AVCodecContext *dec_ctx = decoder.get_codec_context();
int in_vstream_idx = decoder.get_video_stream_index(); int in_vstream_idx = decoder.get_video_stream_index();
// Create and initialize the appropriate filter
std::unique_ptr<Processor> processor(
ProcessorFactory::instance().create_processor(processor_config, vk_device_index)
);
if (processor == nullptr) {
spdlog::critical("Failed to create filter instance");
return -1;
}
// Initialize output dimensions based on filter configuration // Initialize output dimensions based on filter configuration
int output_width = 0, output_height = 0; int output_width = 0, output_height = 0;
switch (filter_config->filter_type) { processor->get_output_dimensions(
case FILTER_LIBPLACEBO: processor_config, dec_ctx->width, dec_ctx->height, output_width, output_height
output_width = filter_config->config.libplacebo.out_width; );
output_height = filter_config->config.libplacebo.out_height; if (output_width <= 0 || output_height <= 0) {
break; spdlog::critical("Failed to determine the output dimensions");
case FILTER_REALESRGAN: return -1;
output_width = dec_ctx->width * filter_config->config.realesrgan.scaling_factor;
output_height = dec_ctx->height * filter_config->config.realesrgan.scaling_factor;
break;
default:
spdlog::critical("Unknown filter type");
return -1;
} }
spdlog::debug("Output video dimensions: {}x{}", output_width, output_height);
// Update encoder configuration with output dimensions // Update encoder configuration with output dimensions
encoder_config->width = output_width; encoder_config->width = output_width;
@ -298,67 +132,26 @@ extern "C" int process_video(
// Initialize the encoder // Initialize the encoder
Encoder encoder; Encoder encoder;
ret = encoder.init(hw_ctx.get(), out_fpath, ifmt_ctx, dec_ctx, encoder_config, in_vstream_idx); ret = encoder.init(
hw_ctx.get(), out_fpath, ifmt_ctx, dec_ctx, encoder_config, processor_config, in_vstream_idx
);
if (ret < 0) { if (ret < 0) {
av_strerror(ret, errbuf, sizeof(errbuf)); av_strerror(ret, errbuf, sizeof(errbuf));
spdlog::critical("Failed to initialize encoder: {}", errbuf); spdlog::critical("Failed to initialize encoder: {}", errbuf);
return ret; return ret;
} }
// Write the output file header
ret = avformat_write_header(encoder.get_format_context(), NULL);
if (ret < 0) {
av_strerror(ret, errbuf, sizeof(errbuf));
spdlog::critical("Error occurred when opening output file: {}", errbuf);
return ret;
}
// Create and initialize the appropriate filter
std::unique_ptr<Filter> filter;
if (filter_config->filter_type == FILTER_LIBPLACEBO) {
const auto &config = filter_config->config.libplacebo;
if (!config.shader_path) {
spdlog::critical("Shader path must be provided for the libplacebo filter");
return -1;
}
filter = std::make_unique<LibplaceboFilter>(
vk_device_index,
std::filesystem::path(config.shader_path),
config.out_width,
config.out_height
);
} else if (filter_config->filter_type == FILTER_REALESRGAN) {
const auto &config = filter_config->config.realesrgan;
if (!config.model_name) {
spdlog::critical("Model name must be provided for the RealESRGAN filter");
return -1;
}
filter = std::make_unique<RealesrganFilter>(
static_cast<int>(vk_device_index),
config.tta_mode,
config.scaling_factor,
config.model_name
);
} else {
spdlog::critical("Unknown filter type");
return -1;
}
// Check if the filter instance was created successfully
if (filter == nullptr) {
spdlog::critical("Failed to create filter instance");
return -1;
}
// Initialize the filter // Initialize the filter
ret = filter->init(dec_ctx, encoder.get_encoder_context(), hw_ctx.get()); ret = processor->init(dec_ctx, encoder.get_encoder_context(), hw_ctx.get());
if (ret < 0) { if (ret < 0) {
spdlog::critical("Failed to initialize filter"); spdlog::critical("Failed to initialize filter");
return ret; return ret;
} }
// Process frames using the encoder and decoder // Process frames using the encoder and decoder
ret = process_frames(encoder_config, proc_ctx, decoder, encoder, filter.get(), benchmark); ret = process_frames(
encoder_config, processor_config, proc_ctx, decoder, encoder, processor.get(), benchmark
);
if (ret < 0) { if (ret < 0) {
av_strerror(ret, errbuf, sizeof(errbuf)); av_strerror(ret, errbuf, sizeof(errbuf));
spdlog::critical("Error processing frames: {}", errbuf); spdlog::critical("Error processing frames: {}", errbuf);

112
src/processor_factory.cpp Normal file
View File

@ -0,0 +1,112 @@
#include "processor_factory.h"
#include <spdlog/spdlog.h>
#include <utility>
#include "filter_libplacebo.h"
#include "filter_realesrgan.h"
#include "interpolator_rife.h"
// Access the singleton instance
ProcessorFactory &ProcessorFactory::instance() {
static ProcessorFactory factory;
// Ensure default processors are registered only once
static bool initialized = false;
if (!initialized) {
ProcessorFactory::init_default_processors(factory);
initialized = true;
}
return factory;
}
// Register a processor type and its creator
void ProcessorFactory::register_processor(ProcessorType type, Creator creator) {
creators[type] = std::move(creator);
}
// Create a processor instance
std::unique_ptr<Processor> ProcessorFactory::create_processor(
const ProcessorConfig *processor_config,
uint32_t vk_device_index
) const {
auto it = creators.find(processor_config->processor_type);
if (it == creators.end()) {
spdlog::critical(
"Processor type not registered: {}", static_cast<int>(processor_config->processor_type)
);
return nullptr;
}
// Call the corresponding creator function
return it->second(processor_config, vk_device_index);
}
// Initialize default processors
void ProcessorFactory::init_default_processors(ProcessorFactory &factory) {
factory.register_processor(
PROCESSOR_LIBPLACEBO,
[](const ProcessorConfig *config, uint32_t vk_device_index) -> std::unique_ptr<Processor> {
const auto &cfg = config->config.libplacebo;
if (!cfg.shader_path) {
spdlog::critical("Shader path must be provided for the libplacebo filter");
return nullptr;
}
if (config->width <= 0 || config->height <= 0) {
spdlog::critical(
"Output width and height must be provided for the libplacebo filter"
);
return nullptr;
}
return std::make_unique<FilterLibplacebo>(
vk_device_index,
std::filesystem::path(cfg.shader_path),
config->width,
config->height
);
}
);
factory.register_processor(
PROCESSOR_REALESRGAN,
[](const ProcessorConfig *config, uint32_t vk_device_index) -> std::unique_ptr<Processor> {
const auto &cfg = config->config.realesrgan;
if (config->scaling_factor <= 0) {
spdlog::critical("Scaling factor must be provided for the RealESRGAN filter");
return nullptr;
}
if (!cfg.model_name) {
spdlog::critical("Model name must be provided for the RealESRGAN filter");
return nullptr;
}
return std::make_unique<FilterRealesrgan>(
static_cast<int>(vk_device_index),
cfg.tta_mode,
config->scaling_factor,
cfg.model_name
);
}
);
factory.register_processor(
PROCESSOR_RIFE,
[](const ProcessorConfig *config, uint32_t vk_device_index) -> std::unique_ptr<Processor> {
const auto &cfg = config->config.rife;
if (!cfg.model_name) {
spdlog::critical("Model name must be provided for the RIFE filter");
return nullptr;
}
return std::make_unique<InterpolatorRIFE>(
static_cast<int>(vk_device_index),
cfg.tta_mode,
cfg.tta_temporal_mode,
cfg.uhd_mode,
cfg.num_threads,
cfg.rife_v2,
cfg.rife_v4,
cfg.model_name
);
}
);
}

1
third_party/librife_ncnn_vulkan vendored Submodule

@ -0,0 +1 @@
Subproject commit f2edda49a5fd817a7137509e54e70d2e30d9b684

View File

@ -2,12 +2,12 @@
#include <chrono> #include <chrono>
#include <csignal> #include <csignal>
#include <cstdarg> #include <cstdarg>
#include <cstdint>
#include <cstdio> #include <cstdio>
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
#include <filesystem> #include <filesystem>
#include <iostream> #include <iostream>
#include <memory>
#include <mutex> #include <mutex>
#include <string> #include <string>
#include <thread> #include <thread>
@ -62,9 +62,9 @@ struct Arguments {
// General options // General options
std::filesystem::path in_fname; std::filesystem::path in_fname;
std::filesystem::path out_fname; std::filesystem::path out_fname;
StringType filter_type; StringType processor_type;
uint32_t gpu_id = 0;
StringType hwaccel = STR("none"); StringType hwaccel = STR("none");
uint32_t vk_device_index = 0;
bool no_copy_streams = false; bool no_copy_streams = false;
bool benchmark = false; bool benchmark = false;
@ -85,14 +85,22 @@ struct Arguments {
int delay = 0; int delay = 0;
std::vector<std::pair<StringType, StringType>> extra_options; std::vector<std::pair<StringType, StringType>> extra_options;
// libplacebo options // General processing options
std::filesystem::path shader_path;
int width = 0; int width = 0;
int height = 0; int height = 0;
int scaling_factor = 0;
int frm_rate_mul = 2;
float scn_det_thresh = 0.0f;
// libplacebo options
std::filesystem::path libplacebo_shader_path;
// RealESRGAN options // RealESRGAN options
StringType model_name; StringType realesrgan_model_name = STR("realesr-animevideov3");
int scaling_factor = 0;
// RIFE options
StringType rife_model_name = STR("rife-v4.6");
bool rife_uhd_mode = false;
}; };
// Set UNIX terminal input to non-blocking mode // Set UNIX terminal input to non-blocking mode
@ -156,6 +164,23 @@ bool is_valid_realesrgan_model(const StringType &model) {
return valid_realesrgan_models.count(model) > 0; return valid_realesrgan_models.count(model) > 0;
} }
bool is_valid_rife_model(const StringType &model) {
static const std::unordered_set<StringType> valid_realesrgan_models = {
STR("rife"),
STR("rife-HD"),
STR("rife-UHD"),
STR("rife-anime"),
STR("rife-v2"),
STR("rife-v2.3"),
STR("rife-v2.4"),
STR("rife-v3.0"),
STR("rife-v3.1"),
STR("rife-v4"),
STR("rife-v4.6"),
};
return valid_realesrgan_models.count(model) > 0;
}
enum Libvideo2xLogLevel parse_log_level(const StringType &level_name) { enum Libvideo2xLogLevel parse_log_level(const StringType &level_name) {
if (level_name == STR("trace")) { if (level_name == STR("trace")) {
return LIBVIDEO2X_LOG_LEVEL_TRACE; return LIBVIDEO2X_LOG_LEVEL_TRACE;
@ -177,48 +202,54 @@ enum Libvideo2xLogLevel parse_log_level(const StringType &level_name) {
} }
} }
int list_gpus() { int enumerate_vulkan_devices(VkInstance *instance, std::vector<VkPhysicalDevice> &devices) {
// Create a Vulkan instance // Create a Vulkan instance
VkInstance instance;
VkInstanceCreateInfo create_info{}; VkInstanceCreateInfo create_info{};
create_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO; create_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
if (vkCreateInstance(&create_info, nullptr, &instance) != VK_SUCCESS) {
spdlog::critical("Failed to create Vulkan instance."); VkResult result = vkCreateInstance(&create_info, nullptr, instance);
if (result != VK_SUCCESS) {
spdlog::error("Failed to create Vulkan instance.");
return -1; return -1;
} }
// Enumerate physical devices // Enumerate physical devices
uint32_t device_count = 0; uint32_t device_count = 0;
VkResult result = vkEnumeratePhysicalDevices(instance, &device_count, nullptr); result = vkEnumeratePhysicalDevices(*instance, &device_count, nullptr);
if (result != VK_SUCCESS || device_count == 0) {
spdlog::error("Failed to enumerate Vulkan physical devices or no devices available.");
vkDestroyInstance(*instance, nullptr);
return -1;
}
devices.resize(device_count);
result = vkEnumeratePhysicalDevices(*instance, &device_count, devices.data());
if (result != VK_SUCCESS) { if (result != VK_SUCCESS) {
spdlog::critical("Failed to enumerate Vulkan physical devices."); spdlog::error("Failed to retrieve Vulkan physical devices.");
vkDestroyInstance(instance, nullptr); vkDestroyInstance(*instance, nullptr);
return -1; return -1;
} }
// Check if any devices are found return 0;
if (device_count == 0) { }
spdlog::critical("No Vulkan physical devices found.");
vkDestroyInstance(instance, nullptr); int list_vulkan_devices() {
return -1; VkInstance instance;
std::vector<VkPhysicalDevice> physical_devices;
int result = enumerate_vulkan_devices(&instance, physical_devices);
if (result != 0) {
return result;
} }
// Get physical device properties uint32_t device_count = static_cast<uint32_t>(physical_devices.size());
std::vector<VkPhysicalDevice> physical_devices(device_count);
result = vkEnumeratePhysicalDevices(instance, &device_count, physical_devices.data());
if (result != VK_SUCCESS) {
spdlog::critical("Failed to enumerate Vulkan physical devices.");
vkDestroyInstance(instance, nullptr);
return -1;
}
// List GPU information // List Vulkan device information
for (uint32_t i = 0; i < device_count; i++) { for (uint32_t i = 0; i < device_count; i++) {
VkPhysicalDevice device = physical_devices[i]; VkPhysicalDevice device = physical_devices[i];
VkPhysicalDeviceProperties device_properties; VkPhysicalDeviceProperties device_properties;
vkGetPhysicalDeviceProperties(device, &device_properties); vkGetPhysicalDeviceProperties(device, &device_properties);
// Print GPU ID and name // Print Vulkan device ID and name
std::cout << i << ". " << device_properties.deviceName << std::endl; std::cout << i << ". " << device_properties.deviceName << std::endl;
std::cout << "\tType: "; std::cout << "\tType: ";
switch (device_properties.deviceType) { switch (device_properties.deviceType) {
@ -256,32 +287,34 @@ int list_gpus() {
return 0; return 0;
} }
int is_valid_gpu_id(uint32_t gpu_id) { int get_vulkan_device_prop(uint32_t vk_device_index, VkPhysicalDeviceProperties *dev_props) {
// Create a Vulkan instance if (dev_props == nullptr) {
VkInstance instance; spdlog::error("Invalid device properties pointer.");
VkInstanceCreateInfo create_info{};
create_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
if (vkCreateInstance(&create_info, nullptr, &instance) != VK_SUCCESS) {
spdlog::error("Failed to create Vulkan instance.");
return -1; return -1;
} }
// Enumerate physical devices VkInstance instance;
uint32_t device_count = 0; std::vector<VkPhysicalDevice> devices;
VkResult result = vkEnumeratePhysicalDevices(instance, &device_count, nullptr); int result = enumerate_vulkan_devices(&instance, devices);
if (result != VK_SUCCESS) { if (result != 0) {
spdlog::error("Failed to enumerate Vulkan physical devices."); return result;
vkDestroyInstance(instance, nullptr);
return -1;
} }
uint32_t device_count = static_cast<uint32_t>(devices.size());
// Check if the Vulkan device ID is valid
if (vk_device_index >= device_count) {
vkDestroyInstance(instance, nullptr);
return -2;
}
// Get device properties for the specified Vulkan device ID
vkGetPhysicalDeviceProperties(devices[vk_device_index], dev_props);
// Clean up Vulkan instance // Clean up Vulkan instance
vkDestroyInstance(instance, nullptr); vkDestroyInstance(instance, nullptr);
if (gpu_id >= device_count) { return 0;
return 0;
}
return 1;
} }
// Wrapper function for video processing thread // Wrapper function for video processing thread
@ -289,7 +322,7 @@ void process_video_thread(
Arguments *arguments, Arguments *arguments,
int *proc_ret, int *proc_ret,
AVHWDeviceType hw_device_type, AVHWDeviceType hw_device_type,
FilterConfig *filter_config, ProcessorConfig *filter_config,
EncoderConfig *encoder_config, EncoderConfig *encoder_config,
VideoProcessingContext *proc_ctx VideoProcessingContext *proc_ctx
) { ) {
@ -314,7 +347,7 @@ void process_video_thread(
out_fname, out_fname,
log_level, log_level,
arguments->benchmark, arguments->benchmark,
arguments->gpu_id, arguments->vk_device_index,
hw_device_type, hw_device_type,
filter_config, filter_config,
encoder_config, encoder_config,
@ -355,17 +388,17 @@ int main(int argc, char **argv) {
"info"), "Set verbosity level (trace, debug, info, warn, error, critical, none)") "info"), "Set verbosity level (trace, debug, info, warn, error, critical, none)")
("no-progress", po::bool_switch(&arguments.no_progress), ("no-progress", po::bool_switch(&arguments.no_progress),
"Do not display the progress bar") "Do not display the progress bar")
("list-gpus,l", "List the available GPUs") ("list-devices,l", "List the available Vulkan devices (GPUs)")
// General Processing Options // General Processing Options
("input,i", PO_STR_VALUE<StringType>(), "Input video file path") ("input,i", PO_STR_VALUE<StringType>(), "Input video file path")
("output,o", PO_STR_VALUE<StringType>(), "Output video file path") ("output,o", PO_STR_VALUE<StringType>(), "Output video file path")
("filter,f", PO_STR_VALUE<StringType>(&arguments.filter_type), ("processor,p", PO_STR_VALUE<StringType>(&arguments.processor_type),
"Filter to use: 'libplacebo' or 'realesrgan'") "Processor to use: 'libplacebo', 'realesrgan', or 'rife'")
("gpu,g", po::value<uint32_t>(&arguments.gpu_id)->default_value(0),
"GPU ID (Vulkan device index)")
("hwaccel,a", PO_STR_VALUE<StringType>(&arguments.hwaccel)->default_value(STR("none"), ("hwaccel,a", PO_STR_VALUE<StringType>(&arguments.hwaccel)->default_value(STR("none"),
"none"), "Hardware acceleration method (mostly for decoding)") "none"), "Hardware acceleration method (mostly for decoding)")
("device,d", po::value<uint32_t>(&arguments.vk_device_index)->default_value(0),
"Vulkan device index (GPU ID)")
("benchmark,b", po::bool_switch(&arguments.benchmark), ("benchmark,b", po::bool_switch(&arguments.benchmark),
"Discard processed frames and calculate average FPS; " "Discard processed frames and calculate average FPS; "
"useful for detecting encoder bottlenecks") "useful for detecting encoder bottlenecks")
@ -407,27 +440,56 @@ int main(int argc, char **argv) {
"Additional AVOption(s) for the encoder (format: -e key=value)") "Additional AVOption(s) for the encoder (format: -e key=value)")
; ;
po::options_description libplacebo_opts("libplacebo options"); po::options_description upscale_opts("Upscaling options");
libplacebo_opts.add_options() upscale_opts.add_options()
("shader,s", PO_STR_VALUE<StringType>(), "Name/path of the GLSL shader file to use")
("width,w", po::value<int>(&arguments.width), "Output width") ("width,w", po::value<int>(&arguments.width), "Output width")
("height,h", po::value<int>(&arguments.height), "Output height") ("height,h", po::value<int>(&arguments.height), "Output height")
("scaling-factor,s", po::value<int>(&arguments.scaling_factor), "Scaling factor")
;
po::options_description interp_opts("Frame interpolation options");
interp_opts.add_options()
("frame-rate-mul,m",
po::value<int>(&arguments.frm_rate_mul)->default_value(2),
"Frame rate multiplier")
("scene-thresh,t", po::value<float>(&arguments.scn_det_thresh)->default_value(10.0f),
"Scene detection threshold")
;
po::options_description libplacebo_opts("libplacebo options");
libplacebo_opts.add_options()
("libplacebo-shader", PO_STR_VALUE<StringType>(),
"Name/path of the GLSL shader file to use")
; ;
// RealESRGAN options // RealESRGAN options
po::options_description realesrgan_opts("RealESRGAN options"); po::options_description realesrgan_opts("RealESRGAN options");
realesrgan_opts.add_options() realesrgan_opts.add_options()
("model,m", PO_STR_VALUE<StringType>(&arguments.model_name), "Name of the model to use") ("realesrgan-model", PO_STR_VALUE<StringType>(&arguments.realesrgan_model_name),
("scale,r", po::value<int>(&arguments.scaling_factor), "Scaling factor (2, 3, or 4)") "Name of the RealESRGAN model to use")
;
// RIFE options
po::options_description rife_opts("RIFE options");
rife_opts.add_options()
("rife-model", PO_STR_VALUE<StringType>(&arguments.rife_model_name),
"Name of the RIFE model to use")
("rife-uhd", po::bool_switch(&arguments.rife_uhd_mode),
"Enable Ultra HD mode")
; ;
// clang-format on // clang-format on
// Combine all options // Combine all options
all_opts.add(encoder_opts).add(libplacebo_opts).add(realesrgan_opts); all_opts.add(encoder_opts)
.add(upscale_opts)
.add(interp_opts)
.add(libplacebo_opts)
.add(realesrgan_opts)
.add(rife_opts);
// Positional arguments // Positional arguments
po::positional_options_description p; po::positional_options_description p;
p.add("input", 1).add("output", 1).add("filter", 1); p.add("input", 1).add("output", 1).add("processor", 1);
#ifdef _WIN32 #ifdef _WIN32
po::variables_map vm; po::variables_map vm;
@ -460,13 +522,19 @@ int main(int argc, char **argv) {
return 0; return 0;
} }
if (vm.count("list-gpus")) { if (vm.count("list-devices")) {
return list_gpus(); return list_vulkan_devices();
} }
// Print program banner
spdlog::info("Video2X version {}", LIBVIDEO2X_VERSION_STRING);
// spdlog::info("Copyright (C) 2018-2024 K4YT3X and contributors.");
// spdlog::info("Licensed under GNU AGPL version 3.");
// Assign positional arguments // Assign positional arguments
if (vm.count("input")) { if (vm.count("input")) {
arguments.in_fname = std::filesystem::path(vm["input"].as<StringType>()); arguments.in_fname = std::filesystem::path(vm["input"].as<StringType>());
spdlog::info("Processing file: {}", arguments.in_fname.u8string());
} else { } else {
spdlog::critical("Input file path is required."); spdlog::critical("Input file path is required.");
return 1; return 1;
@ -479,12 +547,12 @@ int main(int argc, char **argv) {
return 1; return 1;
} }
if (!vm.count("filter")) { if (!vm.count("processor")) {
spdlog::critical("Filter type is required (libplacebo or realesrgan)."); spdlog::critical("Processor type is required (libplacebo, realesrgan, or rife).");
return 1; return 1;
} }
// Parse avoptions // Parse extra AVOptions
if (vm.count("extra-encoder-option")) { if (vm.count("extra-encoder-option")) {
for (const auto &opt : vm["extra-encoder-option"].as<std::vector<StringType>>()) { for (const auto &opt : vm["extra-encoder-option"].as<std::vector<StringType>>()) {
size_t eq_pos = opt.find('='); size_t eq_pos = opt.find('=');
@ -499,16 +567,21 @@ int main(int argc, char **argv) {
} }
} }
if (vm.count("shader")) { if (vm.count("libplacebo-shader")) {
arguments.shader_path = std::filesystem::path(vm["shader"].as<StringType>()); arguments.libplacebo_shader_path =
std::filesystem::path(vm["libplacebo-shader"].as<StringType>());
} }
if (vm.count("model")) { if (vm.count("libplacebo-model")) {
if (!is_valid_realesrgan_model(vm["model"].as<StringType>())) { if (!is_valid_realesrgan_model(vm["realesrgan-model"].as<StringType>())) {
spdlog::critical( spdlog::critical("Invalid model specified.");
"Invalid model specified. Must be 'realesrgan-plus', " return 1;
"'realesrgan-plus-anime', or 'realesr-animevideov3'." }
); }
if (vm.count("rife-model")) {
if (!is_valid_rife_model(vm["rife-model"].as<StringType>())) {
spdlog::critical("Invalid RIFE model specified.");
return 1; return 1;
} }
} }
@ -521,36 +594,59 @@ int main(int argc, char **argv) {
} }
// Additional validations // Additional validations
if (arguments.filter_type == STR("libplacebo")) { if (arguments.width < 0 || arguments.height < 0) {
if (arguments.shader_path.empty() || arguments.width == 0 || arguments.height == 0) { spdlog::critical("Invalid output resolution specified.");
spdlog::critical( return 1;
"For libplacebo, shader name/path (-s), width (-w), " }
"and height (-h) are required." if (arguments.scaling_factor < 0) {
); spdlog::critical("Invalid scaling factor specified.");
return 1; return 1;
} }
} else if (arguments.filter_type == STR("realesrgan")) { if (arguments.frm_rate_mul <= 1) {
if (arguments.scaling_factor == 0 || arguments.model_name.empty()) { spdlog::critical("Invalid frame rate multiplier specified.");
spdlog::critical("For realesrgan, scaling factor (-r) and model (-m) are required."); return 1;
}
if (arguments.scn_det_thresh < 0.0f || arguments.scn_det_thresh > 100.0f) {
spdlog::critical("Invalid scene detection threshold specified.");
return 1;
}
if (arguments.processor_type == STR("libplacebo")) {
if (arguments.libplacebo_shader_path.empty() || arguments.width == 0 ||
arguments.height == 0) {
spdlog::critical("Shader name/path, width, and height are required for libplacebo.");
return 1; return 1;
} }
} else if (arguments.processor_type == STR("realesrgan")) {
if (arguments.scaling_factor != 2 && arguments.scaling_factor != 3 && if (arguments.scaling_factor != 2 && arguments.scaling_factor != 3 &&
arguments.scaling_factor != 4) { arguments.scaling_factor != 4) {
spdlog::critical("Scaling factor must be 2, 3, or 4."); spdlog::critical("Scaling factor must be 2, 3, or 4 for RealESRGAN.");
return 1; return 1;
} }
} else { } else if (arguments.processor_type != STR("rife")) {
spdlog::critical("Invalid filter type specified. Must be 'libplacebo' or 'realesrgan'."); spdlog::critical(
"Invalid processor specified. Must be 'libplacebo', 'realesrgan', or 'rife'."
);
return 1; return 1;
} }
// Validate GPU ID // Validate GPU ID
int gpu_status = is_valid_gpu_id(arguments.gpu_id); VkPhysicalDeviceProperties dev_props;
if (gpu_status < 0) { int get_vulkan_dev_ret = get_vulkan_device_prop(arguments.vk_device_index, &dev_props);
spdlog::warn("Unable to validate GPU ID."); if (get_vulkan_dev_ret != 0) {
} else if (arguments.gpu_id > 0 && gpu_status == 0) { if (get_vulkan_dev_ret == -2) {
spdlog::critical("Invalid GPU ID specified."); spdlog::critical("Invalid Vulkan device ID specified.");
return 1; return 1;
} else {
spdlog::warn("Unable to validate Vulkan device ID.");
return 1;
}
} else {
// Warn if the selected device is a CPU
spdlog::info("Using Vulkan device: {} ({})", dev_props.deviceName, dev_props.deviceID);
if (dev_props.deviceType == VK_PHYSICAL_DEVICE_TYPE_CPU) {
spdlog::warn("The selected Vulkan device is a CPU device.");
}
} }
// Validate bitrate // Validate bitrate
@ -605,36 +701,59 @@ int main(int argc, char **argv) {
break; break;
} }
// Print program version and processing information
spdlog::info("Video2X version {}", LIBVIDEO2X_VERSION_STRING);
spdlog::info("Processing file: {}", arguments.in_fname.u8string());
#ifdef _WIN32 #ifdef _WIN32
std::wstring shader_path_str = arguments.shader_path.wstring(); std::wstring shader_path_str = arguments.libplacebo_shader_path.wstring();
#else #else
std::string shader_path_str = arguments.shader_path.string(); std::string shader_path_str = arguments.libplacebo_shader_path.string();
#endif #endif
// Setup filter configurations based on the parsed arguments // Setup filter configurations based on the parsed arguments
FilterConfig filter_config; ProcessorConfig processor_config;
if (arguments.filter_type == STR("libplacebo")) { processor_config.width = arguments.width;
filter_config.filter_type = FILTER_LIBPLACEBO; processor_config.height = arguments.height;
filter_config.config.libplacebo.out_width = arguments.width; processor_config.scaling_factor = arguments.scaling_factor;
filter_config.config.libplacebo.out_height = arguments.height; processor_config.frm_rate_mul = arguments.frm_rate_mul;
filter_config.config.libplacebo.shader_path = shader_path_str.c_str(); processor_config.scn_det_thresh = arguments.scn_det_thresh;
} else if (arguments.filter_type == STR("realesrgan")) {
filter_config.filter_type = FILTER_REALESRGAN; if (arguments.processor_type == STR("libplacebo")) {
filter_config.config.realesrgan.tta_mode = false; processor_config.processor_type = PROCESSOR_LIBPLACEBO;
filter_config.config.realesrgan.scaling_factor = arguments.scaling_factor; processor_config.config.libplacebo.shader_path = shader_path_str.c_str();
filter_config.config.realesrgan.model_name = arguments.model_name.c_str(); } else if (arguments.processor_type == STR("realesrgan")) {
processor_config.processor_type = PROCESSOR_REALESRGAN;
processor_config.config.realesrgan.tta_mode = false;
processor_config.config.realesrgan.model_name = arguments.realesrgan_model_name.c_str();
} else if (arguments.processor_type == STR("rife")) {
processor_config.processor_type = PROCESSOR_RIFE;
processor_config.config.rife.tta_mode = false;
processor_config.config.rife.tta_temporal_mode = false;
processor_config.config.rife.uhd_mode = arguments.rife_uhd_mode;
processor_config.config.rife.num_threads = 0;
processor_config.config.rife.model_name = arguments.rife_model_name.c_str();
bool rife_v2 = false;
bool rife_v4 = false;
if (arguments.rife_model_name.find(STR("rife-v2")) != StringType::npos) {
rife_v2 = true;
} else if (arguments.rife_model_name.find(STR("rife-v3")) != StringType::npos) {
rife_v2 = true;
} else if (arguments.rife_model_name.find(STR("rife-v4")) != StringType::npos) {
rife_v4 = true;
} else if (arguments.rife_model_name.find(STR("rife")) == StringType::npos) {
spdlog::critical("Unknown RIFE model generation.");
return 1;
}
processor_config.config.rife.rife_v2 = rife_v2;
processor_config.config.rife.rife_v4 = rife_v4;
} }
// Setup encoder configuration // Setup encoder configuration
EncoderConfig encoder_config; EncoderConfig encoder_config;
encoder_config.codec = codec->id; encoder_config.codec = codec->id;
encoder_config.copy_streams = !arguments.no_copy_streams; encoder_config.copy_streams = !arguments.no_copy_streams;
encoder_config.width = arguments.width; encoder_config.width = 0;
encoder_config.height = arguments.height; encoder_config.height = 0;
encoder_config.pix_fmt = pix_fmt; encoder_config.pix_fmt = pix_fmt;
encoder_config.bit_rate = arguments.bit_rate; encoder_config.bit_rate = arguments.bit_rate;
encoder_config.rc_buffer_size = arguments.rc_buffer_size; encoder_config.rc_buffer_size = arguments.rc_buffer_size;
@ -713,7 +832,7 @@ int main(int argc, char **argv) {
&arguments, &arguments,
&proc_ret, &proc_ret,
hw_device_type, hw_device_type,
&filter_config, &processor_config,
&encoder_config, &encoder_config,
&proc_ctx &proc_ctx
); );