├── .gitignore ├── postcss.config.js ├── src ├── tflite │ ├── tflite_web_api_cc.wasm │ ├── tflite_web_api_cc_simd.wasm │ └── content_detection_mobilenet_v3.tflite ├── img │ ├── hero-screenshot-anime4k-small.png │ ├── play.svg │ ├── download-icon.svg │ ├── refresh.svg │ ├── chrome.svg │ ├── full-screen.svg │ ├── question.svg │ ├── folder.svg │ ├── logo.svg │ ├── edge.svg │ ├── loading.svg │ └── utils.py ├── index.css ├── videoEncoder.js ├── demuxer_mp4.js ├── lib │ └── image-compare-viewer.min.css ├── weights │ ├── cnn-2x-s-an.json │ ├── cnn-2x-s-3d.json │ ├── cnn-2x-s-rl.json │ ├── cnn-2x-m-an.json │ ├── cnn-2x-m-3d.json │ └── cnn-2x-m-rl.json ├── worker.js ├── index.html └── index.js ├── tailwind.config.js ├── README.md ├── package.json ├── Gruntfile.js └── webpack.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .idea 3 | dist 4 | /yarn-error.log 5 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } -------------------------------------------------------------------------------- /src/tflite/tflite_web_api_cc.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sb2702/free-ai-video-upscaler/HEAD/src/tflite/tflite_web_api_cc.wasm -------------------------------------------------------------------------------- /src/tflite/tflite_web_api_cc_simd.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sb2702/free-ai-video-upscaler/HEAD/src/tflite/tflite_web_api_cc_simd.wasm -------------------------------------------------------------------------------- /src/img/hero-screenshot-anime4k-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sb2702/free-ai-video-upscaler/HEAD/src/img/hero-screenshot-anime4k-small.png -------------------------------------------------------------------------------- /src/tflite/content_detection_mobilenet_v3.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sb2702/free-ai-video-upscaler/HEAD/src/tflite/content_detection_mobilenet_v3.tflite -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | 2 | @tailwind base; 3 | @tailwind components; 4 | @tailwind utilities; 5 | 6 | video { 7 | width: 100%; 8 | height: 100%; 9 | object-fit: fill; 10 | } 11 | 12 | #loading{ 13 | width: 100%; 14 | } 15 | 16 | #download-link{ 17 | position: relative; 18 | margin: auto; 19 | width: 100%; 20 | display: flex; 21 | } -------------------------------------------------------------------------------- /src/img/play.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/img/download-icon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ["./src/**/*.{html,js}"], 4 | theme: { 5 | extend: { 6 | fontFamily: { 7 | 'manrope': ['Manrope', 'sans-serif'], 8 | }, 9 | colors: { 10 | 'primary': '#1e3a8a', 11 | 'text-primary': '#1e3a8a', 12 | 'primary-blue': '#1e3a8a', 13 | 'light-blue': '#bfdbfe', 14 | 'gray-light': '#F5F5F5', 15 | 'gray-border': '#c8c8d5', 16 | 'gray-text': '#999', 17 | } 18 | }, 19 | }, 20 | plugins: [], 21 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Free AI Video Upscaler 2 | 3 | A simple, quick and free no-nonsense tool for upscaling video with AI upscaling algorithms like [Anime4K](https://github.com/bloc97/Anime4K) right in your browser- no signups, no downloads just choose a video and download your upscaled video after it's done processing. 4 | 5 | You can get started at 👉 [Free AI Video Upscaler](https://free.upscaler.video/) 👈 6 | 7 | 8 | 9 | Based on my [WebSR](https://github.com/sb2702/websr) SDK. 10 | -------------------------------------------------------------------------------- /src/img/refresh.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/img/chrome.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/img/full-screen.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/img/question.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/videoEncoder.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | self.onmessage = ({data}) => { 6 | 7 | if(data.cmd === 'init'){ 8 | 9 | self.videoEncoder = new VideoEncoder({ 10 | output: (chunk, meta) => { 11 | 12 | const buffer = new ArrayBuffer(chunk.byteLength); 13 | 14 | chunk.copyTo(buffer); 15 | 16 | postMessage({ 17 | cmd: 'encoded', 18 | buffer: buffer, 19 | type: chunk.type, 20 | timestamp: chunk.timestamp, 21 | duration: chunk.duration, 22 | meta: meta 23 | }, [buffer]) 24 | 25 | 26 | }, 27 | error: (e) => { 28 | postMessage({ 29 | cmd: 'error', 30 | msg: e.message 31 | }) 32 | } 33 | }); 34 | 35 | 36 | self.videoEncoder.configure(data.config); 37 | 38 | 39 | } else if(data.cmd === 'encode'){ 40 | 41 | const upscaled_frame = new VideoFrame(data.bitmap,{ timestamp: data.timestamp}); 42 | 43 | self.videoEncoder.encode(upscaled_frame, { keyFrame: data.isKeyFrame}); 44 | 45 | upscaled_frame.close(); 46 | 47 | 48 | } else if (data.cmd === 'flush'){ 49 | 50 | self.videoEncoder.flush(); 51 | } 52 | 53 | 54 | } 55 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "free-video-upscaler", 3 | "version": "0.0.1", 4 | "description": "Free tool to upscale videos in the browser", 5 | "main": "src/main.js", 6 | "scripts": { 7 | "build": "webpack", 8 | "serve": "webpack-dev-server" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/sb2702/free-ai-video-upscaler.git" 13 | }, 14 | "author": "Sam Bhattacharyya", 15 | "license": "MIT", 16 | "bugs": { 17 | "url": "https://github.com/sb2702/free-ai-video-upscaler/issues" 18 | }, 19 | "homepage": "https://github.com/sb2702/free-ai-video-upscaler#readme", 20 | "dependencies": { 21 | "@babel/core": "^7.1.6", 22 | "@popperjs/core": "^2.11.8", 23 | "@tensorflow/tfjs-backend-cpu": "^4.15.0", 24 | "@tensorflow/tfjs-core": "^4.15.0", 25 | "@tensorflow/tfjs-tflite": "0.0.1-alpha.9", 26 | "alpinejs": "3.4.2", 27 | "babel-loader": "^9.1.3", 28 | "bootstrap": "^5.3.2", 29 | "clean-webpack-plugin": "^4.0.0", 30 | "copy-webpack-plugin": "^11.0.0", 31 | "grunt": "^1.6.1", 32 | "grunt-aws-s3": "^2.0.2", 33 | "grunt-cloudfront": "^0.2.2", 34 | "html-webpack-plugin": "^5.5.4", 35 | "jquery": "^3.7.1", 36 | "mp4-muxer": "^3.0.2", 37 | "mp4box": "^0.5.2", 38 | "popper.js": "^1.16.1", 39 | "style-loader": "^3.3.3", 40 | "webpack": "^5.89.0", 41 | "webpack-cli": "^5.1.4", 42 | "webpack-dev-server": "^4.15.1" 43 | }, 44 | "devDependencies": { 45 | "autoprefixer": "^10.4.21", 46 | "css-loader": "^6.8.1", 47 | "postcss": "^8.5.6", 48 | "postcss-loader": "^8.1.1", 49 | "tailwindcss": "^3.4.17" 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = function (grunt) { 3 | 4 | 5 | grunt.loadNpmTasks('grunt-aws-s3'); 6 | grunt.loadNpmTasks('grunt-cloudfront'); 7 | 8 | 9 | grunt.initConfig({ 10 | 11 | aws_s3: { 12 | options: { 13 | accessKeyId: process.env.AWS_KEY_PERSONAL, 14 | secretAccessKey: process.env.AWS_SECRET_PERSONAL, 15 | region: 'us-east-1', 16 | uploadConcurrency: 5, // 5 simultaneous uploads 17 | downloadConcurrency: 5 // 5 simultaneous downloads 18 | }, 19 | production: { 20 | options: { 21 | bucket: 'free.upscaler.video', 22 | differential: true // Only uploads the files that have changed 23 | }, 24 | files: [ 25 | {expand: true, 26 | cwd: 'dist/', 27 | src: ['**', '!*~'], 28 | dest: '/'} 29 | ] 30 | }, 31 | }, 32 | 33 | cloudfront: { 34 | options: { 35 | region:'us-east-1', // your AWS region 36 | distributionId:"E1PI5O74ZD5EVI", // DistributionID where files are stored 37 | listInvalidations:true, // if you want to see the status of invalidations 38 | listDistributions:false, // if you want to see your distributions list in the console 39 | version:"1.0", // if you want to invalidate a specific version (file-1.0.js), 40 | credentials: { 41 | accessKeyId: process.env.AWS_KEY_PERSONAL, 42 | secretAccessKey: process.env.AWS_SECRET_PERSONAL, 43 | } 44 | 45 | }, 46 | production: { 47 | CallerReference: Date.now().toString(), 48 | Paths: { 49 | Quantity: 1, 50 | Items: [ '/*' ] 51 | } 52 | }, 53 | }, 54 | 55 | 56 | 57 | 58 | }); 59 | 60 | grunt.registerTask('push', ['aws_s3:production', 'cloudfront:production']); 61 | 62 | 63 | 64 | }; 65 | -------------------------------------------------------------------------------- /src/img/folder.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const webpack = require('webpack'); 3 | 4 | const CopyWebpackPlugin = require('copy-webpack-plugin'); 5 | const { CleanWebpackPlugin } = require('clean-webpack-plugin'); 6 | const HtmlWebpackPlugin = require('html-webpack-plugin'); 7 | 8 | 9 | module.exports = { 10 | entry: [ "./src/index.js", './src/worker.js'], 11 | output: { 12 | libraryExport: "default", 13 | path: path.resolve(__dirname, './dist'), 14 | filename: "main.js" 15 | }, 16 | module: { 17 | 18 | rules: [ 19 | { 20 | test: /\.js$/, 21 | exclude: /node_modules/, 22 | use: { 23 | loader: "babel-loader" 24 | }, 25 | }, 26 | 27 | { 28 | test: /\.css$/i, 29 | use: ["style-loader", "css-loader", "postcss-loader"], 30 | } 31 | 32 | ], 33 | 34 | }, 35 | 36 | plugins: [ 37 | 38 | new HtmlWebpackPlugin({ 39 | template: 'src/index.html' 40 | }), 41 | 42 | new CleanWebpackPlugin({ 43 | cleanStaleWebpackAssets: false 44 | }), 45 | new CopyWebpackPlugin( { 46 | patterns: [ 47 | { from: "src/*.js", to: path.basename('[name].js') }, 48 | { from: "src/img/*.svg", to: path.basename('[name].svg') }, 49 | { from: "src/img/*.png", to: path.basename('[name].png') }, 50 | { from: "src/tflite/**", to: path.basename('[name][ext]') }, 51 | 52 | ] 53 | }) 54 | 55 | ], 56 | resolve: { 57 | extensions: [".ts", ".tsx", ".js", ".css"] 58 | }, 59 | 60 | devServer: { 61 | static: { 62 | directory: path.join(__dirname, 'dist'), 63 | }, 64 | compress: true, 65 | port: 8080, 66 | allowedHosts: "all", 67 | }, 68 | 69 | mode: 'development' 70 | 71 | }; 72 | -------------------------------------------------------------------------------- /src/img/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/img/edge.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/demuxer_mp4.js: -------------------------------------------------------------------------------- 1 | import MP4Box from 'mp4box' 2 | import {DataStream} from 'mp4box' 3 | 4 | 5 | // Demuxes the first video track of an MP4 file using MP4Box, calling 6 | // `onConfig()` and `onChunk()` with appropriate WebCodecs objects. 7 | class MP4Demuxer { 8 | onConfig = null; 9 | onData = null; 10 | setStatus = null; 11 | file = null; 12 | 13 | constructor(buffer, type, {onConfig, onData, setStatus}) { 14 | this.onConfig = onConfig; 15 | this.onData = onData; 16 | this.setStatus = setStatus; 17 | 18 | this.type = type; 19 | // Configure an MP4Box File for demuxing. 20 | this.file = MP4Box.createFile(); 21 | this.file.onError = error => setStatus("demux", error); 22 | this.file.onReady = this.onReady.bind(this); 23 | this.file.onSamples = this.onSamples.bind(this); 24 | buffer.fileStart = 0; 25 | this.file.appendBuffer(buffer); 26 | this.file.flush(); 27 | 28 | } 29 | 30 | // Get the appropriate `description` for a specific track. Assumes that the 31 | // track is H.264, H.265, VP8, VP9, or AV1. 32 | description(track) { 33 | const trak = this.file.getTrackById(track.id); 34 | for (const entry of trak.mdia.minf.stbl.stsd.entries) { 35 | const box = entry.avcC || entry.hvcC || entry.vpcC || entry.av1C; 36 | if (box) { 37 | const stream = new DataStream(undefined, 0, DataStream.BIG_ENDIAN); 38 | box.write(stream); 39 | return new Uint8Array(stream.buffer, 8); // Remove the box header. 40 | } 41 | } 42 | throw new Error("avcC, hvcC, vpcC, or av1C box not found"); 43 | } 44 | 45 | onReady(info) { 46 | this.setStatus("demux", "Ready"); 47 | 48 | 49 | const track = this.type === 'video'? info.videoTracks[0] : info.audioTracks[0]; 50 | let config ={}; 51 | 52 | if(track.type === 'video'){ 53 | config = { 54 | codec: track.codec, 55 | codedHeight: track.video.height, 56 | codedWidth: track.video.width, 57 | description: this.description(track), 58 | } 59 | } else { 60 | config = { 61 | codec: track.codec, 62 | sampleRate: track.audio.sample_rate, 63 | numberOfChannels: track.audio.channel_count 64 | } 65 | } 66 | 67 | this.onConfig(config); 68 | 69 | this.file.setExtractionOptions(track.id); 70 | this.file.start(); 71 | } 72 | 73 | onSamples(track_id, ref, samples) { 74 | // Generate and emit an EncodedVideoChunk for each demuxed sample. 75 | 76 | const chunks = []; 77 | 78 | const Chunk = this.type === 'video'? EncodedVideoChunk : EncodedAudioChunk; 79 | 80 | for (const sample of samples) { 81 | 82 | chunks.push(new Chunk({ 83 | type: sample.is_sync ? "key" : "delta", 84 | timestamp: 1e6 * sample.cts / sample.timescale, 85 | duration: 1e6 * sample.duration / sample.timescale, 86 | data: sample.data 87 | })); 88 | 89 | } 90 | 91 | this.onData(chunks); 92 | } 93 | 94 | flush(){ 95 | 96 | this.file.flush(); 97 | } 98 | } 99 | 100 | export { 101 | MP4Demuxer 102 | } -------------------------------------------------------------------------------- /src/img/loading.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /src/lib/image-compare-viewer.min.css: -------------------------------------------------------------------------------- 1 | .icv{position:relative;overflow:hidden;cursor:row-resize}.icv__icv--vertical{cursor:row-resize}.icv__icv--horizontal{cursor:col-resize}.icv__img{pointer-events:none;-o-user-select:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;max-width:none;width:100%;margin:0 !important;padding:0 !important;border:0 !important;border-radius:0 !important;top:0;display:block}.icv__is--fluid .icv__img{display:none}.icv__img-a{height:auto;position:static;z-index:1;left:0px}.icv__img-b{height:100%;position:absolute;z-index:2;left:auto;right:0px;width:auto}.icv__icv--vertical .icv__img-b{width:100%;height:auto}.icv__imposter{z-index:4;position:absolute;top:0px;left:0px;width:100%;height:100%}.icv__wrapper{position:absolute;width:100%;height:100%;right:0px;top:0px;overflow:hidden;background-size:cover;background-position:center center;z-index:3}.icv__is--fluid .icv__wrapper,.icv__icv--vertical .icv__wrapper{width:100% !important}.icv__is--fluid .icv__wrapper,.icv__icv--horizontal .icv__wrapper{height:100% !important}.icv__fluidwrapper{background-size:cover;background-position:center;position:absolute;top:0;left:0;width:100%;height:100%}.icv__control{position:absolute;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;height:100%;top:0px;z-index:5}.icv__icv--vertical .icv__control{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;left:0;width:100%}.icv__control-line{height:50%;width:2px;z-index:6}.icv__icv--vertical .icv__control-line{width:50%}.icv__theme-wrapper{width:100%;height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:absolute;-webkit-transition:all 0.1s ease-out 0s;transition:all 0.1s ease-out 0s;z-index:5}.icv__icv--vertical .icv__theme-wrapper{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.icv__arrow-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-transition:all 0.1s ease-out 0s;transition:all 0.1s ease-out 0s}.icv__arrow-a{-webkit-transform:scale(1.5) rotateZ(180deg);transform:scale(1.5) rotateZ(180deg);height:20px;width:20px;-webkit-filter:drop-shadow(0px 3px 5px rgba(0,0,0,0.33));filter:drop-shadow(0px -3px 5px rgba(0,0,0,0.33))}.icv__arrow-b{-webkit-transform:scale(1.5) rotateZ(0deg);transform:scale(1.5) rotateZ(0deg);height:20px;width:20px;-webkit-filter:drop-shadow(0px 3px 5px rgba(0,0,0,0.33));filter:drop-shadow(0px 3px 5px rgba(0,0,0,0.33))}.icv__circle{width:50px;height:50px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-negative:0;flex-shrink:0;border-radius:999px}.icv__label{position:absolute;bottom:1rem;z-index:12;background:rgba(0,0,0,0.33);color:white;border-radius:3px;padding:0.5rem 0.75rem;font-size:0.85rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.icv__label.vertical{bottom:auto;left:1rem}.icv__label.on-hover{-webkit-transform:scale(0);transform:scale(0);-webkit-transition:0.25s cubic-bezier(0.68, 0.26, 0.58, 1.22);transition:0.25s cubic-bezier(0.68, 0.26, 0.58, 1.22)}.icv:hover .icv__label.on-hover{-webkit-transform:scale(1);transform:scale(1)}.icv__label-before{left:1rem}.icv__label-after{right:1rem}.icv__label-before.vertical{top:1rem}.icv__label-after.vertical{bottom:1rem;right:auto}.icv__body{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none} 2 | 3 | 4 | /*# sourceMappingURL=image-compare-viewer.min.css.map*/ -------------------------------------------------------------------------------- /src/img/utils.py: -------------------------------------------------------------------------------- 1 | from PIL import Image 2 | import IPython 3 | from io import BytesIO 4 | import numpy as np 5 | import math 6 | import os 7 | import tensorflow as tf 8 | 9 | 10 | #Takes as input an image/array of size [height, width, channels] with range of 0-255 11 | def show_image(img, width=None, height=None, fmt='png'): 12 | if width is None: 13 | width = img.shape[-2] 14 | if height is None: 15 | height = img.shape[-3] 16 | f = BytesIO() 17 | Image.fromarray(np.clip(np.array(img), 0, 255).astype(np.uint8)).save(f, fmt) 18 | IPython.display.display(IPython.display.Image(data=f.getvalue(), width=width, height=height)) 19 | 20 | #Takes as input images of size [batch, height, width, channels] with range of 0-255 21 | def show_images(images, show_max=5, scale=1, val_range=[0, 255]): 22 | 23 | #Convert to numpy array, force eager execution when using tensorflow 24 | images = np.array(images) 25 | #Normalize images 26 | images = np.clip(((images - val_range[0]) / (val_range[1] - val_range[0])) * 255, 0, 255).astype(np.uint8) 27 | 28 | #Adding channel missing axis automatically 29 | if images.shape[-1] != 3 and images.shape[-1] != 1: 30 | if len(images.shape) > 3: 31 | return 32 | images = images[...,np.newaxis] 33 | 34 | #Adding batch missing axis automatically 35 | if len(images.shape) == 3: 36 | images = images[np.newaxis,...] 37 | 38 | #Compute max numbers of images to show 39 | show_max = min(show_max, len(images)) 40 | 41 | #Concatenate images in x-axis (horizontally) 42 | images = np.concatenate(images[:show_max], axis=-2) 43 | 44 | #Remove extra axis if necessary 45 | if images.shape[-1] == 1: 46 | images = images[..., 0] 47 | 48 | show_image(images, images.shape[1]*scale, images.shape[0]*scale) 49 | 50 | def check_is_image(obj): 51 | if tf.is_tensor(obj): 52 | tshape = tf.shape(obj) 53 | if len(tshape) == 3: 54 | if tshape[-1] == 1 or tshape[-1] == 3: 55 | return True 56 | return False 57 | 58 | def check_is_batch(obj): 59 | if tf.is_tensor(obj): 60 | tshape = tf.shape(obj) 61 | if len(tshape) == 4: 62 | if tshape[-1] == 1 or tshape[-1] == 3: 63 | return True 64 | return False 65 | 66 | def recursive_max_horizontal_size(tree): 67 | if check_is_batch(tree) or check_is_image(tree): 68 | return tf.shape(tree)[-3] 69 | else: 70 | max_val = 0 71 | for ex in tree: 72 | max_val = max(recursive_max_horizontal_size(ex), max_val) 73 | return max_val 74 | 75 | def preview_dataset(dataset, show_max=5, scale=1, normalize_scale=True, val_range=[0, 255]): 76 | dataset_example = list(dataset.prefetch(tf.data.AUTOTUNE).take(show_max)) #Take from dataset, might be slow and unoptimized if dataset is not created from generator... 77 | 78 | target_size = recursive_max_horizontal_size(dataset_example) if normalize_scale else None 79 | return preview_dataset_list(dataset_example, min(show_max, len(dataset_example)), scale, float(target_size), val_range) 80 | 81 | 82 | def preview_dataset_list(dataset_list, show_max, scale, target_size, val_range): 83 | #Take a single example out of dataset 84 | dataset_example = dataset_list[0] 85 | 86 | #Dataset gives out a tensor 87 | if tf.is_tensor(dataset_example): 88 | 89 | #Compute scaled size if asked 90 | tshape = tf.shape(dataset_example) 91 | if target_size is not None and len(tshape) >= 3: 92 | scale = target_size / float(tshape[-3]) * scale 93 | 94 | #If it is a batch 95 | if check_is_batch(dataset_example): 96 | #Show the batch directly 97 | show_images(dataset_example, show_max, scale, val_range) 98 | #If not a batch 99 | elif check_is_image(dataset_example): 100 | #Show list 101 | show_images(dataset_list, show_max, scale, val_range) 102 | 103 | #Dataset does not give out a tensor 104 | else: 105 | #Call function recursively with inner pairs 106 | for k in range(len(dataset_example)): 107 | sublist = [dataset_list[i][k] for i in range(len(dataset_list))] 108 | preview_dataset_list(sublist, show_max, scale, target_size, val_range) 109 | 110 | 111 | 112 | def get_gaussian_kernel(shape=(7, 7), sigma=1.0): 113 | m, n = [(sh - 1.0) / 2.0 for sh in shape] 114 | x = tf.expand_dims(tf.range(-n, n + 1,dtype=tf.float32), 1) 115 | y = tf.expand_dims(tf.range(-m, m + 1,dtype=tf.float32), 0) 116 | 117 | h = tf.exp(tf.math.divide_no_nan(-((x*x) + (y*y)), 2 * sigma * sigma)) 118 | h = tf.math.divide_no_nan(h,tf.reduce_sum(h)) 119 | return h 120 | 121 | def get_lanczos_kernel(shape=(7, 7), sigma=1.0): 122 | m, n = [(sh - 1.0) / 2.0 for sh in shape] 123 | x = tf.expand_dims(tf.range(-n, n + 1,dtype=tf.float32), 1) 124 | y = tf.expand_dims(tf.range(-m, m + 1,dtype=tf.float32), 0) 125 | 126 | d = tf.math.sqrt((x * x) + (y * y)) 127 | h = tf.experimental.numpy.sinc(d) * tf.experimental.numpy.sinc(d / sigma) 128 | h = tf.math.divide_no_nan(h, tf.reduce_sum(h)) 129 | return h 130 | 131 | def gaussian_blur_no_pad(inp, shape=(7, 7), sigma=1.0): 132 | 133 | #Add axis if rank is 3 instead of 4 134 | imgshape = tf.shape(inp) 135 | if len(imgshape) == 3: 136 | inp = inp[tf.newaxis,...] 137 | 138 | in_channel = tf.shape(inp)[-1] 139 | k = get_gaussian_kernel(shape, sigma) 140 | k = tf.expand_dims(k, axis=-1) 141 | k = tf.repeat(k, in_channel, axis=-1) 142 | k = tf.reshape(k, (*shape, in_channel, 1)) 143 | conv = tf.nn.depthwise_conv2d(inp, k, strides=[1,1,1,1], padding="VALID") 144 | 145 | #Remove axis if added beforehand 146 | if len(imgshape) == 3: 147 | conv = conv[0] 148 | 149 | return conv 150 | 151 | def lanczos_ring_no_pad(inp, shape=(7, 7), sigma=1.0): 152 | 153 | #Add axis if rank is 3 instead of 4 154 | imgshape = tf.shape(inp) 155 | if len(imgshape) == 3: 156 | inp = inp[tf.newaxis,...] 157 | 158 | in_channel = tf.shape(inp)[-1] 159 | k = get_lanczos_kernel(shape, sigma) 160 | k = tf.expand_dims(k, axis=-1) 161 | k = tf.repeat(k, in_channel, axis=-1) 162 | k = tf.reshape(k, (*shape, in_channel, 1)) 163 | conv = tf.nn.depthwise_conv2d(inp, k, strides=[1,1,1,1], padding="VALID") 164 | 165 | #Remove axis if added beforehand 166 | if len(imgshape) == 3: 167 | conv = conv[0] 168 | 169 | return conv 170 | 171 | #Shape should be odd integer to prevent padding errors 172 | def degrade_ring(img, sigma, shape=(7, 7), do_clip=True): 173 | 174 | #Padding to preserve size of the input, pad with reflect to prevent image mean shift 175 | img = tf.pad(img, [[shape[0]//2, shape[0]//2], [shape[1]//2, shape[1]//2], [0, 0]], mode="REFLECT") 176 | img = lanczos_ring_no_pad(img, shape, sigma) 177 | 178 | if do_clip: 179 | img = tf.clip_by_value(img, 0, 1) 180 | 181 | return img 182 | 183 | #Shape should be odd integer to prevent padding errors 184 | def degrade_blur_gaussian(img, sigma, shape=(7, 7), do_clip=True): 185 | 186 | #Padding to preserve size of the input, pad with reflect to prevent image mean shift 187 | img = tf.pad(img, [[shape[0]//2, shape[0]//2], [shape[1]//2, shape[1]//2], [0, 0]], mode="REFLECT") 188 | img = gaussian_blur_no_pad(img, shape, sigma) 189 | 190 | if do_clip: 191 | img = tf.clip_by_value(img, 0, 1) 192 | 193 | return img 194 | 195 | def degrade_noise_gaussian(img, sigma, color=True, low_freq_sigma=None, low_freq_shape=(7, 7), do_clip=True): 196 | 197 | imgshape = tf.shape(img) 198 | if color: 199 | rg = tf.random.normal(imgshape, mean=0, stddev=rs) 200 | else: 201 | rg = tf.random.normal(imgshape[:-1], mean=0, stddev=rs)[..., tf.newaxis] 202 | 203 | #Low frequency blur if requested 204 | if low_freq_sigma is not None: 205 | rg = degrade_blur_gaussian(rg, low_freq_sigma, low_freq_shape, do_clip=False) 206 | 207 | img = img + rg 208 | 209 | if do_clip: 210 | img = tf.clip_by_value(img, 0, 1) 211 | 212 | return img 213 | 214 | def degrade_rgb_to_yuv(img, jpeg_factor=None, chroma_subsampling=True, chroma_method="area", do_clip=True): 215 | img_yuv = tf.image.rgb_to_yuv(img) 216 | img_y, img_u, img_v = tf.split(img_yuv, 3, axis=-1) 217 | 218 | imgshape = tf.shape(img) 219 | yuvshape = tf.shape(img_yuv) 220 | 221 | if chroma_subsampling: 222 | img_u = tf.image.resize(img_u, [yuvshape[-3]//2, yuvshape[-2]//2], method=chroma_method) 223 | img_v = tf.image.resize(img_v, [yuvshape[-3]//2, yuvshape[-2]//2], method=chroma_method) 224 | 225 | if jpeg_factor is not None: 226 | img_y = tf.image.adjust_jpeg_quality(img_y, jpeg_factor) 227 | 228 | img_u = img_u + 0.5 229 | img_v = img_v + 0.5 230 | 231 | if jpeg_factor is not None: 232 | img_u = tf.image.adjust_jpeg_quality(img_u, jpeg_factor) 233 | img_v = tf.image.adjust_jpeg_quality(img_v, jpeg_factor) 234 | 235 | if do_clip: 236 | img_y = tf.clip_by_value(img_y, 0, 1) 237 | img_u = tf.clip_by_value(img_u, 0, 1) 238 | img_v = tf.clip_by_value(img_v, 0, 1) 239 | 240 | return (img_y, img_u, img_v) 241 | 242 | def degrade_yuv_to_rgb(img, chroma_method="bicubic", do_clip=True): 243 | img_y, img_u, img_v = img 244 | img_uv = tf.concat([img_u, img_v], axis=-1) 245 | 246 | yshape = tf.shape(img_y) 247 | uvshape = tf.shape(img_uv) 248 | 249 | if yshape[-3] != uvshape[-3] or yshape[-2] != uvshape[-2]: 250 | img_uv = tf.image.resize(img_uv, [yshape[-3], yshape[-2]], method=chroma_method) 251 | 252 | img_uv = img_uv - 0.5 253 | img_yuv = tf.concat([img_y, img_uv], axis=-1) 254 | 255 | img = tf.image.yuv_to_rgb(img_yuv) 256 | 257 | if do_clip: 258 | img = tf.clip_by_value(img, 0, 1) 259 | 260 | return img -------------------------------------------------------------------------------- /src/weights/cnn-2x-s-an.json: -------------------------------------------------------------------------------- 1 | {"name": "anime4k/cnn-2x-s", "layers": {"conv2d_tf": {"name": "conv2d_tf", "type": "conv", "inputs": ["input_image"], "output": "conv2d_tf", "weights": [-0.0057322932, 0.12928207, -0.056848746, 0.18680117, -0.0306273, 0.25602463, 0.053723164, 0.20419341, 0.0018709862, 0.022848232, -0.04105527, 0.10169034, 0.0, 0.0, 0.0, 0.0, 0.009471417, -0.12957802, 0.096014425, 0.21836184, 0.00021601951, -0.22997683, 0.23666254, 0.41192335, 0.021762101, 0.0047863554, 0.008233427, 0.108514786, 0.0, 0.0, 0.0, 0.0, -0.01156376, -0.18988979, 0.04614705, -0.044767227, 0.01050636, -0.26426336, 0.23741047, 0.0027636609, -0.027718676, -0.14202335, -0.016650287, -0.06637125, 0.0, 0.0, 0.0, 0.0, 0.057809234, -0.11033858, 0.056533534, -0.06292466, 0.13880666, -0.18710336, 0.2441031, -0.25326246, 0.0032683122, -0.026437074, 0.0023248852, 7.640766e-05, 0.0, 0.0, 0.0, 0.0, -0.49110603, 0.4429004, -0.44015464, -0.41174838, -0.87738293, 0.7808468, -1.0929365, -0.59699076, -0.18409836, 0.185138, -0.11773224, -0.17097276, 0.0, 0.0, 0.0, 0.0, 0.10580959, -0.055947904, -0.03431237, -0.080236495, 0.14862584, -0.15393938, -0.18872876, -0.3170681, 0.03559387, -0.003990826, 0.021298569, 0.012844483, 0.0, 0.0, 0.0, 0.0, -0.040715586, -0.25781113, 0.08896714, -0.1225879, -0.15790503, -0.54010904, 0.29588607, 0.10401059, 0.003413123, -0.108357325, 0.0112870345, -0.11888622, 0.0, 0.0, 0.0, 0.0, 0.0049315444, 0.02376202, -0.08224771, 0.121118225, -0.041512914, -0.027994309, -0.585988, -0.069672115, -0.017247835, 0.0056576864, 0.04319012, 0.055003505, 0.0, 0.0, 0.0, 0.0, 0.37521392, 0.15916082, 0.059708964, 0.19046007, 0.8120325, 0.38343868, 0.3436578, 0.5287958, 0.16570656, 0.06957687, 0.014022592, 0.074799836, 0.0, 0.0, 0.0, 0.0], "bias": [-0.01050964, -0.00939481, 0.17684458, 0.027366742]}, "conv2d_1_tf": {"name": "conv2d_1_tf", "type": "conv", "inputs": ["conv2d_tf"], "output": "conv2d_1_tf", "weights": [-0.011029496, 0.05866063, -0.09460646, -0.017664742, -0.022488879, 0.18384217, -0.00397663, -0.064733066, 0.08466802, 0.10667488, 8.0212536e-05, 0.0908869, 0.13580276, 0.00097438256, 0.12176522, -0.08218466, 0.16062798, -0.10190268, 0.03280682, 0.05621916, -0.009684231, -0.08464307, 0.17058301, -0.096469186, 0.1967505, -0.1450099, 0.093607284, -0.28240147, -0.21377413, 0.10079291, -0.1741522, 0.17330575, -0.060160473, 0.06316997, 0.0046929033, -0.049405966, 0.13851729, 0.06830702, -0.0586872, -0.040827133, 0.007052838, -0.03576886, -0.111261636, 0.039155316, -0.07380389, -0.09369825, 0.04471156, 0.09678487, -0.36683616, -0.035950605, -0.24414362, -0.009159744, 0.19335322, -0.099253505, 0.075083904, -0.00076695543, 0.65291303, -0.25599423, 0.19827642, 0.065899536, -0.07423247, -0.068967685, 0.0050554527, -0.060272824, -0.020688485, -0.83178276, 0.11104878, 0.26454413, 0.13655476, 0.37675047, -0.22219229, -0.01751935, 0.44552696, 0.92510307, 0.16063261, -0.62011045, 0.19366647, -0.06996067, -0.2504841, 0.00803723, 0.0051537007, -0.057168536, -0.16110587, 0.25232598, -0.04447099, 0.11997351, 0.14808103, -0.34443566, -0.26212573, -0.21970181, 0.2724405, 0.21050811, -0.07949061, -0.064808235, -0.21208277, -0.0042361654, -0.0888952, -0.20169449, 0.19144905, -0.016882861, -0.013283103, 0.07552998, -0.24686803, 0.012453213, -0.065454446, -0.016123284, -0.47316182, 0.070926026, 0.09219782, 0.13118166, 0.074736096, 0.0077910526, 0.5832154, 0.1138069, -0.039765622, 0.3182784, -0.25497997, 0.0013993139, 0.39285088, -0.48511526, -0.39891505, -0.19094779, -0.082146175, -0.20826934, 0.020590555, -0.0012490178, -0.4398621, 0.14377014, 0.21917395, 3.4314657e-05, 0.25734863, -0.3433305, 0.015720673, 0.2676127, -0.06807297, 0.15040149, -0.23638041, -0.0050233034, -0.13666134, 0.4542111, -0.033572577, -0.08450588, -0.23341487, 0.053490847, -0.17482175, 0.057647135, 0.33135444, 0.0850751, -0.1718849, -0.0854123, 0.036795795, -0.13874969, -0.10903869, -0.19007301, -0.06064334, -0.03786032, -0.036696054, 0.07844446, 0.012523185, -0.01562906, -0.04411997, -0.10331819, 0.10050193, 0.12406485, 0.07431592, 0.30109692, -0.17511666, -0.13263564, -0.10192587, 0.07821255, -0.22415096, 0.25552443, 0.17881326, -0.13914281, 0.109979235, -0.0016463579, -0.01911644, -0.15412527, 0.028903123, 0.20831817, 0.00375175, 0.08110953, 0.074919395, -0.17581624, -0.015677985, 0.06504228, 0.08817818, -0.12518327, -0.09537373, 0.028905088, -0.051288474, 0.054334078, 0.2852779, -0.28924024, 0.36805123, 0.21079305, -0.28336474, 0.1679663, -0.08641141, -0.10699407, -0.16090055, 0.1287612, -0.15910125, 0.05734755, 0.15883245, 0.0053026294, 0.080674745, 0.0505137, 0.17639062, 0.3790122, -0.19588692, -0.020314282, 0.26197383, 0.09014768, 0.19696823, -0.41025418, -0.08308115, -0.33279485, -0.22528782, 0.06172439, -0.1365661, -0.13094363, -0.005086559, 0.089024484, 0.05262993, 0.0006296959, 0.1657725, -0.32591924, 0.12126701, 0.061543245, -0.10526848, 0.041583937, 0.094976954, 0.09416157, -0.22019257, -0.058390073, -0.2073888, 0.057273377, 0.19558284, 0.004208022, 0.30005738, 0.18478931, -0.23342943, 0.22455733, -0.016488122, 0.099634305, 0.31620836, -0.15731157, 0.09595808, 0.0013774688, 0.48273298, -0.07027936, -0.18764344, -0.26194447, -0.11794225, -0.012173601, 0.117986746, -0.13846518, -0.019614812, -0.3011192, 0.5501164, 0.3408611, -0.40090847, 0.15706886, 0.13050972, 0.051776595, 0.20792943, 0.23389706, -0.22965533, -0.053367328, 0.3911586, -0.032988597, 0.054753624, -0.008485731, -0.2451672, 0.17528129, 0.13657846, 0.010480436, 0.07651423, -0.43316832, 0.12736236, 0.13804524, 0.12529011, -0.30946237, -0.14423579, 0.08403089, 0.24335162, 0.057288036], "bias": [0.012077211, 0.013045883, 0.0380778, -0.02908858]}, "conv2d_2_tf": {"name": "conv2d_2_tf", "type": "conv", "inputs": ["conv2d_1_tf"], "output": "conv2d_2_tf", "weights": [-0.036115196, -0.06971895, -0.07508942, 0.016036168, 0.12120111, 0.24536026, 0.044755507, -0.20663576, 0.029635755, -0.15427187, 0.027148994, -0.20795093, 0.10170582, 0.077919215, 0.66063017, -0.4632968, -0.0052889925, -0.019060908, -0.08660142, -0.022095207, -0.08097976, -0.015142803, -0.18552722, -0.078493506, -0.16293915, -0.20099808, -0.08370822, 0.3701389, 0.09094984, 0.2487225, 0.24338846, 0.044003833, -0.061406493, -0.017232792, -0.10917424, 0.11203319, 0.040699825, -0.019294346, 0.084953666, -0.018133596, 0.07209552, 0.016069936, 0.17805555, -0.089537814, 0.15809004, 0.1027023, 0.15044671, -0.15530108, 0.0948676, -0.040305693, -0.005591629, -0.048048403, -0.07547777, 0.056606572, 0.021390207, 0.32600567, -0.20805131, -0.099587254, 0.029613169, 0.0092129605, -0.29429698, -0.09898621, 0.44470885, -0.89487344, -0.122259885, 0.11445877, 0.06666907, 0.1869428, -0.1553992, -0.1658741, 0.2988138, -0.57746625, -0.34609964, 0.11169158, -0.41877756, 0.38075635, 0.21293911, 0.09640372, -0.12754214, -0.08026104, 0.15128808, 0.050087795, 0.09219755, -0.18080945, 0.0044571217, -0.046019405, -0.1289922, 0.20305426, 0.19601224, 0.04667917, 0.17465587, 0.027672665, 0.18441725, 0.06845396, 0.11288585, -0.23283863, -0.072962, -0.06639447, 0.049347494, -0.1386401, 0.10396071, 0.08187777, -0.04280746, 0.07390891, 0.06628344, 0.037797406, 0.021885803, -0.013147403, 0.22376558, 0.36243078, 0.12874891, -0.0023783944, 0.074945286, 0.16045591, -0.11798349, 0.12910712, 0.054760084, -0.095626175, -0.047832094, 0.03493912, 0.11817307, 0.037452437, -0.14301221, -0.027356789, -0.052390423, 0.11373512, 0.07686775, 0.010008694, -0.023999173, -0.091900624, 0.02388157, 0.03173873, 0.0065633506, -0.033716757, -0.1198324, 0.12057766, 0.026465805, -0.07517131, -0.07760598, 0.060463097, 0.07345541, 0.046037503, 0.21101558, -0.26785463, 0.15544604, -0.03902825, 0.04630384, -0.25173616, -0.0691359, 0.07476507, 0.009071253, 0.089964196, -0.26539803, -0.3958477, -0.22155671, 0.20735882, -0.105860494, -0.003996804, -0.044815883, 0.39544627, 0.6169709, 0.23717614, -0.37884676, -0.7484867, 0.020169826, -0.30718836, 1.0965588, -0.20711036, -0.39149985, -0.06843563, -0.06522909, 0.103805855, 0.03265825, -0.15137726, 0.12837899, -0.01294922, -0.23638196, -0.4560866, -0.11948684, -0.1464144, 0.10690008, 0.007835961, 0.11864342, -0.13101323, -0.16509797, 0.075027354, 0.08122998, 0.13451207, 0.0011890623, 0.052157886, 0.08372405, -0.07085038, -0.21997726, -0.16488647, -0.0291317, 0.17997476, 0.1493211, 0.027494298, 0.0034613227, -0.3207727, 0.18699001, 0.14728633, -0.042895135, -0.07612043, 0.125076, -0.14714554, -0.03480009, -0.22753975, -0.5342686, -0.7426105, -0.38294584, 0.42549992, 0.46053204, 0.7867879, 0.106234804, -0.041163098, 0.5198579, -0.5219404, 0.14809476, -0.41802374, 0.06810794, -0.15122683, -0.047409, 0.13178343, -0.50428164, 0.18220626, 0.35510704, -0.081787474, 0.03155813, 0.019284263, 0.0032388573, -0.20513348, -0.05385551, 0.17803182, -0.26206362, 0.2870375, 0.008557827, 0.08401449, -0.027598893, -0.010791235, 0.16657415, 0.067647465, 0.093076974, -0.14438486, -0.10017002, 0.0022367141, 0.03250936, -0.052794546, -0.009178676, -0.019673595, -0.0016697067, -0.15424626, -0.112123474, -0.11079971, 0.011987111, -0.11747758, -0.023021797, -0.058703423, -0.037978355, -0.062433913, -0.13130441, 0.048656322, 0.056839373, 0.109036915, -0.07823158, 0.14785293, 0.058555078, -0.11679035, -0.14002073, 0.07395252, 0.098268874, -0.06710464, 0.14906375, 0.030001195, -0.10338215, 0.0662968, -0.161953, -0.13682815, 0.09563142, 0.009514228, -0.009491218, 0.06737101, -0.1393389, 0.15231515, -0.073147796, 0.00767062, 0.028675212, 0.014213088], "bias": [0.018736731, -0.0026039074, 0.050130025, -0.055364225]}, "conv2d_last_tf": {"name": "conv2d_last_tf", "type": "conv", "inputs": ["conv2d_2_tf"], "output": "conv2d_last_tf", "weights": [0.019100675, -0.014241565, 0.004667036, -0.03865062, 0.106731094, 0.026099661, 0.014594411, -0.011881356, 0.0040967264, -0.004626336, 0.006469508, 0.010875305, -0.033909045, -0.085905954, 0.07861378, 0.019452631, 0.20777655, -0.060354974, 0.0023840065, -0.064121604, -0.17397617, 0.019293457, -0.09707183, 0.080641985, 0.01025124, -0.017382381, 0.008661793, -0.010995665, 0.21943407, -0.115574986, 0.14471593, -0.068836235, 0.057942886, -0.06311754, 0.2253396, -0.04159292, -0.020731755, 0.007877151, 0.041525815, 0.025278691, 0.03041967, -0.025137542, 0.024364179, -0.024543528, 0.029438615, -0.015506873, 0.081686, -0.07812221, 0.054237515, 0.0676094, -0.0047708177, 0.0043467237, -0.10032304, -0.020498628, 0.04240586, 0.07272254, 0.0784221, 0.017945962, -0.022310399, -0.013134622, 0.015638694, -0.10001543, 0.1043031, 0.05898838, -0.021652509, 0.35796642, 0.059497777, 0.23948468, 0.15454951, -0.10017235, -0.19072174, -0.44812536, -0.03974552, 0.04529369, 0.22207436, 0.026222564, -0.09705454, 0.5623026, -0.3354105, -0.017278556, -0.053682446, -0.03411237, -0.09399936, 0.15128824, -0.07463, -0.042020727, 0.0031783928, 0.13481957, -0.07731454, 0.044114403, -0.23085599, 0.060444202, -0.15015422, 0.0018040676, -0.18684982, 0.2812511, 0.0029329916, 0.001596018, 0.0007512241, 0.016544111, -0.04876942, -0.05272409, 0.037884697, 0.049948208, 0.015518177, 0.11368592, -0.03815777, -0.013149978, -0.027638039, 0.107719295, -0.04115787, 0.02745414, 0.016691081, 0.010204119, 0.04078854, 0.01613337, 0.03325829, 0.0114824055, -0.017286912, -0.07284126, -0.110984206, -0.21041764, 0.0089543555, 0.18986733, 0.01537506, -0.2059135, 0.029074017, 0.013117443, 0.013965926, 0.029871881, 0.0034499036, -0.011343668, 0.022120327, -0.0068748263, 0.009324342, -0.039081004, 0.08032371, 0.050809264, 0.035050742, -0.2032847, 0.06305391, -0.021958945, 0.038569167, -0.22465245, 0.046307724, -0.012419472, 0.007673863, -0.042344846, 0.011042414, 0.016994251, -0.018166406, -0.016955731, -0.13240299, 0.01768431, -0.027607648, 0.0699927, -0.02840628, 0.004414203, 0.0049618417, 0.011084679, -0.119954154, -0.007455482, -0.031108133, -0.009946449, 0.0077065965, 0.01660345, 0.032943666, 0.016376585, 0.10273124, 0.1556573, -0.24643841, 0.107307844, -0.068235755, 0.0561896, -0.0104672015, 0.042693343, -0.01634601, 0.04195375, -0.10401894, 0.047641944, -0.034602515, -0.0034419263, -0.010457858, 0.015194475, -0.03962551, -0.030031368, 0.16036317, 0.019283568, -0.05877721, 0.016504882, -0.15523468, 0.018161612, -0.08083991, 0.0024665035, -0.049373373, 0.030371357, 0.0113322195, -0.014676956, 0.011646689, -0.01142667, 0.124930486, 0.06625774, -0.045840867, -0.009693036, -0.012649251, -0.07388084, 0.008790075, 0.0013844534, -0.33941835, -0.2763476, -0.118311435, -0.063535266, 0.20936015, 0.13731301, 0.13443594, 0.07464433, 0.059650812, -0.36973104, 0.16444235, -0.37082872, 0.06432777, -0.18283032, -0.044489607, -0.13895285, 0.13533665, 0.08268915, -0.03675727, -0.14348659, 0.0186255, -0.05051692, 0.056702953, 0.0061717895, 0.047663026, -0.088188455, 0.23254345, -0.014015464, 0.08400204, -0.0073777726, 0.2202068, -0.12366078, 0.04361004, 0.046543695, 0.0064863074, -0.03358146, -0.022602187, 0.018138997, -0.011071864, 0.010244091, -0.019814799, -0.17250171, 0.040823266, -0.040131986, 0.010125854, 0.020660749, 0.0020435036, -0.010819304, -0.004810193, -0.11286074, 0.051985834, 0.04788631, -0.023950428, 0.036145125, -0.038203828, 0.052401308, 0.022986965, 0.26420745, -0.06076917, -0.09252999, 0.03164547, 0.15652153, -0.037934, -0.0035418556, 0.03358366, -0.005219482, 0.007060882, -0.06569114, -0.02941682, 0.00966056, -0.0153679885, 0.019905418, -0.107232265, -0.03405676, -0.044340115, 0.26892832, -0.04723829, -0.02589829, 0.004563232, 0.19318114], "bias": [-0.00346731, -0.0046263863, -0.004627155, -0.0057769152]}, "pixel_shuffle": {"name": "pixel_shuffle", "type": "pixel_shuffle", "inputs": ["conv2d_last_tf"], "output": "canvas"}}} -------------------------------------------------------------------------------- /src/weights/cnn-2x-s-3d.json: -------------------------------------------------------------------------------- 1 | {"name": "anime4k/cnn-2x-s", "layers": {"conv2d_tf": {"name": "conv2d_tf", "type": "conv", "inputs": ["input_image"], "output": "conv2d_tf", "weights": [-0.0022612927, 0.056973718, -0.018455653, 0.14739583, -0.122750364, 0.23741247, 0.15598795, 0.05692804, 0.18175821, 0.13481095, -0.08827108, 0.05554242, 0.0, 0.0, 0.0, 0.0, 0.04206811, 0.23834495, 0.13003352, -0.077002496, 0.17685443, -0.20654015, 0.06842113, 0.2903542, -0.26250055, 0.13811174, 0.26133212, -0.02114791, 0.0, 0.0, 0.0, 0.0, 0.093419984, -0.07030613, 0.29529554, -0.04851454, -0.18972242, 0.14136502, -0.04747689, -0.06364426, 0.22331561, -0.10553665, 0.16183273, 0.05455794, 0.0, 0.0, 0.0, 0.0, 0.24077286, 0.23530032, -0.058636595, -0.37148198, -0.06763021, 0.3874437, 0.15182178, -0.5923735, -0.13545403, 0.15376179, 0.21833488, -0.2147259, 0.0, 0.0, 0.0, 0.0, -0.2060378, 0.20107107, -0.57699513, 0.17214543, 0.26857927, 0.21768239, -0.54763824, 0.022310967, 0.24290903, 0.0074973702, -0.73197544, 0.16953811, 0.0, 0.0, 0.0, 0.0, -0.53420544, -0.09096746, -0.25905782, 0.13050057, -0.21312474, -0.046465185, -0.19382372, -0.079869874, -0.48216957, 0.036481928, -0.2352641, -0.059043337, 0.0, 0.0, 0.0, 0.0, -0.030450007, -0.10884538, 0.18111393, -0.1775848, 0.27219498, -0.09239544, -0.026854752, -0.14357966, -0.1850866, 0.1308016, 0.028251573, -0.21514907, 0.0, 0.0, 0.0, 0.0, -0.10568889, 0.15597937, 0.27339727, 0.0804553, 0.04280254, -0.08279245, 0.20513073, 0.055260282, 0.31278867, -0.24821152, 0.29145843, 0.10567111, 0.0, 0.0, 0.0, 0.0, 0.25927135, -0.16821514, 0.005973275, -0.11551916, -0.49868804, 0.103718266, 0.1801412, 0.06371136, -0.06251711, 0.058491655, 0.08287211, -0.04250653, 0.0, 0.0, 0.0, 0.0], "bias": [0.42747816, -0.50199944, -0.008679179, 0.002979711]}, "conv2d_1_tf": {"name": "conv2d_1_tf", "type": "conv", "inputs": ["conv2d_tf"], "output": "conv2d_1_tf", "weights": [0.14501162, 0.08745608, 0.047154814, 0.11138436, -0.030867573, -0.0009166872, 0.055052515, -0.12617113, -0.104578145, 0.0068466533, 0.013762538, 0.111968696, 0.07529147, 0.006874992, 0.15803319, 0.19343081, 0.10959786, -0.057358194, 0.061577655, -0.008993094, 0.048110843, -0.0864788, 0.01113672, -0.22644496, -0.12960532, 0.030239241, -0.08421794, -0.13423525, -0.07145387, 0.044097863, 0.009972901, 0.04685787, -0.023261277, 0.03164763, 0.028907845, -0.0102096815, 0.1474105, -0.03114013, 0.15159902, -0.086211964, 0.04718239, 0.0018872966, 0.03155034, 0.028671373, 0.08148231, 0.17568494, 0.047075186, 0.34778616, 0.036335807, -0.094797246, -0.4159549, 0.24694933, 0.24209529, -0.07121227, 0.1532561, 0.3843501, -0.07694775, 0.19775048, -0.32267457, -0.09720791, 0.020951513, -0.09151028, 0.3170201, 0.1605608, -0.07707157, 0.043557756, 0.05671068, -0.01463445, -0.26492572, 0.18719704, -0.095243685, 0.4080296, 0.41637594, 0.11404859, -0.033315994, 0.066214, 0.021033298, 0.18487465, -0.18571156, -0.54635674, 0.068084195, -0.096393734, 0.0035257551, 0.012287477, -0.07196971, 0.025817184, -0.07986198, 0.07784954, -0.16452111, 0.031261202, 0.023056887, -0.0522975, -0.009634468, -0.31535807, -0.12919909, 0.033792194, 0.10813535, -0.05337902, 0.06076626, 0.07202521, 0.09736061, -0.08541826, -0.027104156, 0.10542381, -0.005607362, -0.11555167, 0.14021239, 0.18931355, -0.017547207, -0.108811274, -0.03125718, 0.14564131, -0.1093017, 0.013502633, 0.018116413, 0.018391598, -0.18378423, -0.401403, 0.012552945, 0.15719055, -0.0228895, 0.02655741, -0.043465126, -0.044321306, 0.23494045, -0.15205893, 0.18678686, 0.3955797, -0.02278326, 0.039361916, 0.011373453, 0.013933539, 0.11071886, 0.11702748, -0.12705022, 0.19540352, -0.07263767, 0.041922275, 0.009229501, 0.024164628, 0.10296556, 0.16725765, -0.0818962, -0.0047961213, 0.29457232, 0.13599043, -0.008714703, -0.16847761, 0.040908597, -0.04422869, 0.011877597, 0.075768694, 0.14954948, 0.040835135, 0.0846475, -0.22214502, -0.056186993, 0.0638945, -0.0042281435, -0.23239982, -0.06668496, 0.1756623, 0.007815604, -0.25763178, -0.04470249, 0.06488682, 0.028682206, 0.16186592, -0.011941624, -0.06400568, 0.10282864, 0.039630037, 0.19423516, -0.031500183, 0.106168106, 0.036937393, 0.09141408, -0.010553094, 0.1342473, -0.043508966, -0.17903467, 0.08791904, -0.036400225, 0.028037839, -0.029616812, -0.026422223, -0.022944598, -0.010333497, -0.031189896, 0.03240508, -0.0785576, 0.015098909, -0.041526146, 0.26786005, -0.46808454, -0.22427405, -0.22540379, 0.1254596, 0.08504417, -0.4350252, 0.008509114, -0.11203634, -0.26448494, 0.08993352, -0.06692775, 0.0062625394, -0.1925751, -0.19362088, 0.018179841, -0.05096496, 0.0597967, -0.05776889, 0.035965182, -0.065931715, -0.37168455, -0.10637159, -0.23258503, 0.09219399, 0.12451923, -0.04139515, 0.11661162, -0.40143165, -0.19453132, 0.16580793, -0.12704377, -0.058811054, -0.030635664, 0.040619805, 0.18785484, 0.019730633, 0.0033181638, 0.03790057, 0.073501006, 0.006731647, 0.028191924, -0.010616595, -0.29848912, 0.10158166, 0.059347004, 0.0060802675, -0.15607527, 0.13109104, 0.11584357, -0.20041798, -0.08759147, 0.2311201, -0.10415703, -0.17287001, -0.13570547, -0.0013140697, 0.031969193, -0.06712297, 0.03109821, 0.07168353, -0.02632724, -0.04616807, -0.11833851, 0.06912322, 0.06699686, -0.045669388, -0.27883604, -0.2241475, 0.023967598, 0.012623573, 0.061143085, 0.04902685, 0.0778742, 0.021383097, -0.08681259, 0.10467826, -0.065506324, -0.049228683, -0.0019070295, 0.029631872, 0.060760606, -0.030946832, 0.2994689, -0.12840995, 0.21215108, -0.0053534615, -0.0021973972, 0.017675998, -0.034374226, -0.024978062, -0.0024610686, 0.06933817, -0.017244197, 0.02603358], "bias": [-0.02344713, -0.019138234, 0.027307548, -0.016841773]}, "conv2d_2_tf": {"name": "conv2d_2_tf", "type": "conv", "inputs": ["conv2d_1_tf"], "output": "conv2d_2_tf", "weights": [-0.039890725, -0.043177314, -0.048805468, 0.09799249, -0.10349542, -0.0062729074, 0.039693516, -0.30216882, -0.042738833, 0.0037364126, -0.30656242, 0.062134158, -0.114294335, 0.016868334, 0.09991796, -0.16585416, -0.007722792, 0.0026812176, 0.17971657, -0.113222905, 0.082076594, -0.17681628, 0.04895819, -0.019178009, 0.0021760853, 0.007935037, 0.085299194, 0.5795741, 0.12266421, -0.02705999, 0.10337303, 0.008091079, 0.107033685, -0.114926584, 0.120950684, 0.08321136, 0.110764876, -0.18382913, 0.055194996, 0.0058637825, 0.0027986306, 0.023781013, -0.09152976, -0.004664087, -0.030794349, 0.19648388, -0.106206514, 0.011675214, 0.16479693, 0.02723046, -0.33223322, 0.2810804, -0.026157184, -0.06415624, -0.27675617, 0.12207766, -0.12737454, 0.060046714, -0.25152156, -0.34489653, -0.09127256, 0.0072614057, -0.11668148, 0.043664586, -0.32403904, -0.04402432, -0.0707074, -0.34870082, -0.32919306, 0.122477666, 0.046921723, 0.060934648, 0.1780341, 0.06262362, 0.27952728, -0.49787056, 0.12264163, 0.26361758, 0.040308613, -0.021964962, 0.15004724, 0.1592199, 0.105700396, -0.0025329862, 0.23848045, -0.21546772, -0.044658013, -0.15791084, 0.14626935, -0.378461, -0.49246082, -0.34476835, -0.20195667, 0.40457812, 0.020117834, 0.0108911805, -0.1275007, -0.031887986, -0.105828516, -0.09993916, -0.0789705, 0.02988785, -0.100113094, 0.124891564, 0.012250016, -0.06847648, -0.08420542, -0.03661604, 0.021004545, -0.014452873, -0.2746848, 0.14506856, -0.14512329, 0.026058046, 0.14578882, 0.071553744, 0.20983543, 0.066319995, -0.04972493, 0.122568, 0.28537628, -0.16746223, 0.19239922, 0.24576762, 0.0882917, -0.058981728, 0.04752188, 0.10322665, 0.021030637, -0.003970932, 0.06960414, 0.12663887, 0.09693644, -0.03999947, 0.0800375, 0.030332638, -0.07900574, -0.22498104, 0.19432296, 0.054668345, -0.01763416, -0.15721561, 0.10118607, 0.11219367, -0.009966864, 0.09320021, -0.07938437, -0.06566463, 0.09310864, 0.0053221164, -0.2099144, 0.05373579, 0.027946053, -0.023884319, 0.04834163, -0.0780051, 0.0857735, 0.012755161, 0.01023881, -0.00383303, -0.016435744, 0.018559936, -0.2176067, -0.0054557296, -0.07195422, 0.0692162, 0.075846516, 0.27307245, 0.07175624, -0.114486076, 0.25018236, -0.03749313, -0.06727194, 0.07871246, -0.0007490986, -0.03001509, -0.032647822, 0.023190917, -0.01774768, 0.030920718, -0.07061917, 0.09621561, -0.06816064, 0.068008244, 0.0014368364, -0.14475296, 0.17289262, -0.038543962, -0.027464092, -0.01796397, -0.044793665, -0.011956431, 0.054812565, -0.053032372, 0.30748066, -0.08687006, 0.10202706, 0.0029041155, -0.115486674, -0.2645544, 0.015263432, 0.031279057, 0.08800576, -0.019194532, 0.11362799, 0.075985774, 0.19539891, -0.18878466, 0.09173534, -0.04460677, -0.07309785, -0.24413848, 0.12608801, -0.271749, 0.13912252, -0.17045498, -0.12514752, 0.12182009, -0.1299306, 0.17265181, -0.06879836, -0.18997647, -0.20725493, 0.31907147, 0.033339124, -0.14780758, -0.1370739, 0.0036579582, -0.060550068, -0.0691961, -0.057228908, 0.0072487923, -0.0023379368, 0.24429576, -0.07613118, 0.03434058, -0.03181958, 0.28133467, 0.030435372, 0.19488539, 0.019704228, 0.010165714, -0.16066891, -0.00033899263, 0.031808436, -0.078739755, 0.017008947, -0.13978824, 0.0050396374, 0.020338936, 0.04410693, 0.0062177656, 0.08468023, -0.03923981, 0.079581976, -0.13034168, 0.059460845, -0.13999806, 0.0931573, 0.058956064, 0.024247985, -0.11563655, 0.2314946, -0.03302071, 0.07996316, 0.036187988, -0.10050295, -0.079407915, -0.31566983, -0.12541561, 0.23554285, 0.015490853, 0.007953412, -0.03289111, -0.0072260373, -0.012021925, 0.05149689, -0.08714197, -0.027808966, -0.11511536, -0.03929646, 0.009873328, -0.046901885, 0.0073965453, -0.14423016, 0.19622529, -0.05005727, 0.033949886], "bias": [-0.019906262, 0.08126011, -0.075884655, 0.077329986]}, "conv2d_last_tf": {"name": "conv2d_last_tf", "type": "conv", "inputs": ["conv2d_2_tf"], "output": "conv2d_last_tf", "weights": [0.07133183, 0.0016752428, 0.030318232, -0.004665937, -0.008498871, -0.004686025, -0.0049808132, 0.01026427, 0.040732212, -0.025563983, 0.009165312, -0.023605285, -0.0027995454, -0.014552136, 0.0018952736, -0.007138619, 0.35493535, -0.051033985, -0.025372216, -0.13312422, 0.06611496, -0.06637084, -0.037630543, -0.098976664, 0.10229619, -0.058466848, 0.006023955, -0.05835095, -0.046110857, -0.019532626, -0.022395106, -0.0156295, 0.0827311, -0.12388043, 0.20617028, -0.08633087, -0.00845795, -0.05211151, 0.07228622, -0.024161061, -0.15596767, -0.032723315, 0.0824215, -0.018796502, 0.04874821, 0.029739998, -0.026829267, 0.0032474198, -0.18656045, -0.061627988, -0.0131399855, 0.022818392, -0.16671775, -0.12671314, -0.030139195, -0.07633152, -0.049449783, 0.060048047, -0.041132163, 0.018467933, 0.00706779, 0.0071395696, -0.0031093734, -0.0017418416, -0.02175176, 0.42608225, -0.38475314, -0.17486429, 0.08835236, 0.26913866, -0.052896827, 0.10517906, 0.03877792, 0.3373339, -0.21059902, 0.045664266, 0.06415432, 0.023228332, 0.021828908, 0.023149688, -0.019138306, 0.16306506, -0.0053943414, 0.31638545, 0.018365094, 0.010707725, 0.048904505, 0.120486036, 0.02113893, -0.10962796, 0.33141395, 0.37216178, -0.07611497, -0.060026426, -0.08608253, -0.11521967, 0.0040507875, -0.06653388, 0.0328962, 0.028937623, 0.008927692, -0.04355819, 0.045102023, 0.04109595, 0.0652753, 0.015634527, 0.0053549972, -0.011333132, 0.01361146, -0.005396795, 0.004093436, 0.0060322816, -0.0036383586, -0.02336341, -0.017201578, -0.09791569, -0.04473304, -0.01203167, -0.041311555, -0.04416123, -0.036245298, -0.15497433, 0.07333805, -0.10112623, 0.020933554, -0.041745007, 0.012103272, -0.023739012, -0.008241564, -0.020595504, -0.0006782346, -0.048773807, 0.032936696, 0.047348764, 0.014033427, 0.011907407, 0.009618167, -0.018901952, 0.0070362766, 0.012340666, 0.0007619144, -0.054605827, -3.5334226e-05, -0.11021157, -0.048151687, -0.00899592, -0.004861141, 0.0056142793, 0.24385378, -0.08306673, -0.077574156, -0.14646773, -0.028775515, 0.007798171, -0.0075264857, 0.010917652, 0.005639496, 0.019948693, -0.0059442986, 0.006675507, -0.14258675, 0.034797378, -0.030165274, 0.05438797, -0.13830562, -0.05885979, 0.472122, 0.12036084, 0.0038416793, 0.013200719, -0.007353924, 0.009592606, -0.093894, 0.04937326, 0.035649754, 0.063901626, -0.039864738, 0.11054946, -0.2538933, 0.037129845, 0.050585154, 0.03805274, -0.07598586, -0.005057814, -0.06129648, 0.023126397, 0.017604494, 0.0459354, -0.048549283, 0.032077175, -0.19834857, 0.031708207, -0.0026005239, 0.061327945, 0.016378205, 0.043482546, 0.10108919, 0.5256725, -0.12822926, 0.06952174, 0.0119123, -0.036401983, 0.010400451, -0.008723761, 0.03431269, -0.009913041, 0.02409113, -0.000766891, 0.11117759, 0.07032405, 0.003704779, 0.11167844, -0.62188756, -0.3739269, 0.0055819405, 0.53674835, -0.04958438, -0.09760491, -0.017153075, -0.070211254, -0.005483809, -0.27343768, 0.080283344, -0.052245308, -0.02541872, -0.099812746, 0.018636622, -0.23931229, 0.010976857, 0.065530084, -0.23205467, -0.15788494, -0.076372266, -0.1713204, -0.03509762, -0.11451107, 0.47551468, 0.044099037, 0.26833785, -0.2527794, 0.0069955545, -0.031639207, 0.015470223, 0.007268053, 0.019889759, 0.016428472, -0.037464887, -0.08534919, -0.004240394, 0.00026963078, -0.0024600318, -0.011556767, 0.0037855022, 0.049952496, -0.024932005, 0.0048597357, 0.042872604, 0.115187086, -0.02432247, -0.051830772, 0.079605766, -0.119161814, 0.11996451, 0.060810324, 0.013078134, 0.0399184, -0.004383816, 0.015711276, -0.064008184, -0.0558677, 0.052412614, 0.08316313, 0.004131363, -0.0018747074, 0.043883406, 0.1256532, -0.0029544404, -0.0032028174, 0.029340198, -0.048101995, -0.033351574, -0.010286912, 0.010283533, 0.06574089, -0.008085968, 0.18071443, -0.096568786, 0.0052498854], "bias": [0.013215065, 0.015816139, 0.008702354, 0.0117013585]}, "pixel_shuffle": {"name": "pixel_shuffle", "type": "pixel_shuffle", "inputs": ["conv2d_last_tf"], "output": "canvas"}}} -------------------------------------------------------------------------------- /src/weights/cnn-2x-s-rl.json: -------------------------------------------------------------------------------- 1 | {"name": "anime4k/cnn-2x-s", "layers": {"conv2d_tf": {"name": "conv2d_tf", "type": "conv", "inputs": ["input_image"], "output": "conv2d_tf", "weights": [-0.25782192, 0.15356855, -0.07591801, 0.025576258, 0.15639038, -0.003467518, 0.12388964, -0.074463956, 0.1363419, 0.10602972, -0.08083917, -0.0098574, 0.0, 0.0, 0.0, 0.0, 0.23684815, -0.06991441, -0.26512906, 0.04322338, 0.13556279, -0.35494795, -0.13624676, 0.020295974, -0.0999787, -0.04245641, -0.1272923, 0.10147985, 0.0, 0.0, 0.0, 0.0, 0.12914264, 0.09177784, 0.3579164, -0.11445263, -0.16305687, 0.052706085, 0.36622983, -0.0011837523, 0.033064514, 0.096229866, 0.0552606, -0.034237757, 0.0, 0.0, 0.0, 0.0, 0.27514997, -0.1300823, 0.027395383, 0.12283199, 0.5383546, 0.09842804, -0.12462158, -0.17170155, -0.01863094, -0.10540424, 0.18628319, 0.12033461, 0.0, 0.0, 0.0, 0.0, -0.43199503, -0.41099274, -0.3517322, -0.44664156, -0.4758843, -0.24648757, -0.3566836, -0.017266102, -0.20802185, -0.3654689, -0.19757888, -0.29120144, 0.0, 0.0, 0.0, 0.0, -0.15593381, -0.18778, 0.2499271, -0.037658677, 0.14603312, 0.015572719, 0.10806066, -0.4077356, -0.1000264, -0.12753147, 0.18192403, -0.24150863, 0.0, 0.0, 0.0, 0.0, 0.07505814, 0.015251832, 0.09499054, 0.044957004, -0.18697514, 0.02458684, -0.02497988, -0.029909676, -0.05428892, 0.106657036, -0.06808904, -0.041664355, 0.0, 0.0, 0.0, 0.0, -0.20078097, 0.03437222, 0.038230244, 0.10970939, -0.43864843, -0.13626677, 0.17990443, 0.41581368, 0.024597576, 0.11880136, -0.10763169, 0.19922386, 0.0, 0.0, 0.0, 0.0, 0.3384449, 0.14787383, -0.08111384, 0.32002708, 0.33851552, 0.0048022484, -0.1369224, 0.37011376, 0.25997162, 0.06434332, 0.15082477, 0.2148611, 0.0, 0.0, 0.0, 0.0], "bias": [-0.09206034, 0.14355598, 0.10932139, 0.0016021392]}, "conv2d_1_tf": {"name": "conv2d_1_tf", "type": "conv", "inputs": ["conv2d_tf"], "output": "conv2d_1_tf", "weights": [-0.095783316, 0.16888501, 0.05321395, -0.030030794, -0.08823816, -0.045243666, -0.06268558, 0.21276858, -0.0624856, -0.01006017, 0.0030589101, -0.058050346, -0.10185547, 0.013074036, -0.060340375, -0.059404477, -0.082710035, -0.3164221, -0.14149888, -0.0500287, 0.1165336, -0.24514209, -0.22980696, -0.08769986, -0.12874982, 0.026991324, -0.051623344, -0.09652709, -0.13059464, -0.1155648, -0.15023601, -0.2606064, 0.13881665, 0.06292556, -0.073230885, 0.030548356, -0.1894414, 0.20438747, -0.1020142, 0.038716204, 0.047450725, -0.042745817, -0.009961303, 0.0043113427, -0.103798516, 0.0057283384, 0.025602754, 0.06838202, -0.084471785, 0.1186411, -0.023158437, -0.019586418, 0.14019564, -0.20072576, -0.09657145, -0.03009908, -0.13227277, -0.08167413, -0.036809705, 0.15459986, -0.1175294, -0.0159718, -0.07684084, 0.0029121442, 0.38679013, -0.086696684, 0.040943615, -0.10347326, -0.113701634, -0.16794261, 0.46800423, -0.4380119, -0.063318215, -0.07943689, 0.014833392, 0.09416196, 0.088914625, 0.021966234, -0.0046327873, -0.2657651, -0.22693971, 0.1888593, 0.14114356, -0.052431874, 0.019335985, 0.15687473, 0.14059441, -0.049555086, -0.032860175, 0.03814611, 0.19610809, -0.07544432, 0.19492854, -0.0364603, -0.0852338, 0.0940062, 0.01977914, 0.07460088, 0.00649084, -0.0076678796, -0.042637978, 0.13390307, -0.12892081, 0.1885971, -0.26436746, -0.054088645, -0.05617448, -0.11635425, 0.10515732, 0.070723996, -0.011394824, -0.058781527, 0.036073864, 0.20427327, -0.05082124, -0.07998257, -0.11126785, -0.32909214, 0.16723558, -0.06990673, 0.068846, 0.07962057, -0.09518244, 0.1964481, -0.18227482, 0.0012983003, -0.010337137, 0.059369925, -0.017423645, -0.015004898, -0.12347797, 0.03555082, 0.16950843, 0.3905411, 0.31619287, 0.07669911, 0.06830832, -0.15560928, 0.011061299, -0.0471216, -0.019609185, -0.10293927, -0.0074584717, 0.025274256, 0.0401996, 0.04994626, 0.04033721, -0.031158779, -0.020250803, -0.04343525, 0.008512854, -0.025068643, 0.024087055, 0.14313996, -0.017925745, 0.14695233, 0.17547527, -0.12131518, 0.08256627, 0.024314117, 0.073618114, 0.11204843, 0.029775916, -0.06307828, -0.048083175, 0.17052896, -0.016592458, 0.04766689, 0.264522, -0.07116043, -0.027477346, 0.11058124, 0.26533633, -0.009387501, 0.19483726, 0.059977174, -0.12358764, -0.025961788, 0.04777405, -0.08508629, 0.18727924, -0.02720344, -0.07284181, 0.08025612, -0.012793925, -0.02129287, -0.014057591, -0.10034754, 0.057004917, 0.0037808765, -0.03774303, -0.003233076, -0.017357104, -0.0037230153, -0.006728777, -0.037507925, -0.009744604, 0.07082, -0.03264124, -0.14104879, 0.37448314, 0.12911771, 0.02214634, -0.43490615, 0.12378615, 0.094145015, -0.07473948, 0.0048840935, -0.099796765, 0.05870187, -0.11705587, 0.05676388, 0.023533033, -0.032874126, -0.06726595, 0.012210867, -0.09490625, 0.09094358, -0.10220125, 0.064988695, -0.097893566, -0.023668293, -0.27130198, 0.18235227, 0.07178437, -0.07974578, -0.21608166, 0.13351338, 0.07526229, -0.013628629, 0.20969899, 0.019102097, 0.061184246, -0.077816315, -0.058578897, 0.08472013, -0.09029159, -0.01493887, -0.042308304, 0.03848113, -0.027789878, -0.0044137137, -0.0030754514, -0.006060567, -0.01770495, -0.051728148, -0.032258607, 0.064617366, 0.23122711, 0.040738184, 0.15502764, 0.21253884, -0.12689447, -0.08567449, -0.006541312, -0.014126494, -0.08846451, -0.17581989, -0.047366638, 0.056032777, 0.0049541816, 0.103834994, 0.011160568, -0.20149869, -0.03680919, 0.11885247, -0.046462476, 0.009605025, 0.14940645, -0.044990983, -0.037811413, -0.08661162, 0.023013419, -0.052682307, -0.03203398, -0.043496504, -0.1349578, -0.17172538, -0.17879523, 0.21643111, -0.0155471265, -0.008405172, 0.019038785, -0.05223506, 0.023275878, 0.086747654, -0.00067952886, -0.0013614862], "bias": [0.13366194, 0.022167688, 0.11364382, -0.045134373]}, "conv2d_2_tf": {"name": "conv2d_2_tf", "type": "conv", "inputs": ["conv2d_1_tf"], "output": "conv2d_2_tf", "weights": [0.018081615, -0.031769957, 0.05144124, -0.025816452, -0.039106533, -0.050274406, -0.065614015, -0.088266864, -0.040171333, 0.1106379, -0.0021244187, 0.11543723, -0.026104383, 0.03029067, 0.08974213, -0.0069493195, 0.06433004, -0.026995622, 0.033668466, -0.08997319, -0.05384461, -0.026176913, 0.07331034, -0.058712658, 0.012216638, 0.030077064, -0.025484731, 0.0018738217, 0.08482327, -0.17558886, -0.17459233, -0.09984253, 0.054582573, -0.042619534, 0.055247027, 0.06356166, 0.012152095, 0.006808657, 0.027511848, 0.073387064, -0.08751413, -0.022223407, 0.008103992, -0.069629885, -0.079628915, -0.021626571, -0.021268845, -0.030826148, -0.14635786, 0.08361176, 0.066524506, -0.07377028, -0.15053652, -0.13100408, 0.09675235, 0.00027864674, 0.19956341, -0.007999431, 0.073624924, -0.001895251, 0.19572824, 0.03638301, -0.10610642, 0.04292223, 0.15438163, 0.08407602, 0.056655943, -0.33321005, 0.33041573, 0.2548884, -0.17800403, 0.30633608, -0.22003457, 0.05061705, -0.03651565, 0.0065600933, 0.017606616, 0.06768895, 0.5691907, -0.17214595, -0.05458103, 0.16453339, -0.04111917, 0.20812407, 0.013891808, 0.09410433, 0.1522046, 0.08840278, -0.018491337, -0.076047175, -0.0005723384, -0.08426212, -0.021960663, 0.023532113, -0.12043091, 0.0032672407, 0.023001617, -0.034299374, 0.03986703, 0.03071231, -0.21734677, 0.021190403, 0.005215461, 0.058005486, 0.04081261, 0.02569102, -0.04355934, -0.060548868, 0.008341788, 0.026760796, 0.04458609, -0.01115665, 0.11233273, -0.01906864, 0.09398081, 0.06819409, 0.019238537, -0.05764515, 0.043324605, -0.21080177, 0.27889618, -0.07814272, -0.068084374, -0.06037449, -0.17266804, -0.09697104, -0.1170827, 0.12653, -0.0036601466, 0.08717545, -0.0024659461, 0.16102274, 0.08488012, 0.043442234, -0.04122472, -0.050218143, -0.07279206, -0.02560889, 0.036580704, 0.104572326, 0.027072486, 0.016370235, 0.18123996, 0.11025829, -0.1149299, -0.017900668, 0.015534425, -0.095895536, 0.07048569, -0.062331, 0.04553862, -0.032343406, 0.088176094, -0.048079737, 0.12617311, -0.04132005, 0.0062068882, 0.01708988, -0.02381668, -0.030413443, -0.013116309, 0.157335, 0.06723322, 0.10667058, 0.11172739, -0.10998553, 0.013814527, -0.013849574, 0.112702034, -0.0853054, 0.058502346, -0.043469913, -0.011657744, 0.015098544, -0.039531693, -0.0035229698, 0.07779144, -0.055555973, -0.026495637, -0.15291798, -0.00049165805, -0.0033505608, 0.08782142, 0.07859329, 0.09714689, -0.03181169, -0.019750256, 0.0046689645, 0.0033582263, -0.010986004, -0.026285233, 0.020578338, 0.19152828, -0.03829832, -0.014844683, 0.04572372, -0.11676504, 0.056663405, 0.039130587, -0.06873469, -0.019175392, 0.11949952, -0.16221642, -0.013848131, 0.045552727, -0.01829211, -0.074232034, 0.097643614, 0.0753252, -0.219453, 0.023489105, 0.045214765, -0.030867143, -0.0014863429, 0.15984835, -0.20806198, -0.4584214, -0.23549774, -0.070944555, -0.009731023, 0.022488693, -0.0325928, -0.22915451, 0.05783311, 0.4040287, -0.3118451, 0.22767776, -0.33548522, -0.048629083, 0.05879754, 0.013987306, -0.029643238, 0.05192528, 0.15724757, -0.04822283, 0.14274885, 0.17047863, 0.046393782, -0.023621213, 0.042642027, 0.0023853392, 0.049386635, 0.04677393, -0.124370515, 0.10894599, -0.07490734, -0.035044543, 0.05695772, 0.20198797, -0.015100173, 0.109232314, 0.005309688, -0.03179252, 0.025696728, -0.060645018, -0.0733947, 0.13513088, 0.016257457, -0.044195246, -0.1490124, 0.02926755, 0.08068265, -0.09878639, 0.16509725, -0.16751625, 0.13661104, 0.0457461, 0.05761465, -0.06855517, 0.036832098, 0.048906684, -0.09588021, 0.29585376, 0.04046166, 0.023989853, -0.25414857, -0.11650252, -0.012470665, 0.12085607, -0.069395676, 0.11406071, -0.04554574, -0.027153894, -0.09211985, -0.022301102, -0.0059714606, -0.09186783, -0.040806565], "bias": [-0.056549765, -0.0053346683, 0.019626498, -0.012940037]}, "conv2d_last_tf": {"name": "conv2d_last_tf", "type": "conv", "inputs": ["conv2d_2_tf"], "output": "conv2d_last_tf", "weights": [-0.09362407, 0.045048997, 0.09252767, 0.080966026, -0.16283144, 0.09403403, -0.032130003, 0.09952803, 0.054498773, -0.0041744793, -0.03767589, -0.05087093, 0.06481625, -0.04098635, -0.06372801, -0.08584238, 0.008185351, 0.103927135, -0.1804778, 0.04795084, -0.04855831, 0.038795277, -0.25485697, -0.010558377, -0.07520853, -0.051489826, 0.034435336, -0.005912859, -0.015145009, -0.0258694, 0.18752252, 0.04076107, -0.04216908, 0.0075422656, -0.02473321, 0.015238207, 9.0934e-05, 0.0023638105, 0.073520586, 0.042121936, -0.01200849, -0.03706034, -0.044135068, -0.041447222, -0.013637472, -0.019342473, -0.07747536, -0.036268447, 0.036391072, -0.18927266, 0.13587691, 0.08096209, 0.06439177, -0.2908896, -0.06973464, -0.23225115, 0.13841452, 0.12849136, 0.08581614, 0.06025845, 0.097867645, 0.16927785, -0.03452574, -0.013464359, 0.24477667, 0.059683662, -0.0025752734, -0.3073235, 0.16182162, 0.0022546072, 0.21766037, -0.14283347, -0.1321918, -0.19941518, 0.036677722, -0.029048327, 0.03489051, 0.088669844, 0.21060215, 0.3554047, 0.049834397, -0.029553086, 0.20620745, 0.09379281, -0.054436304, -0.02097732, -0.01627259, 0.025568074, -0.047271255, 0.007645887, -0.13007429, -0.07569466, 0.019185433, 0.057641905, -0.008841205, -0.003354539, -0.023258183, 0.07722945, -0.030804327, 0.0408924, -0.057619967, 0.03368266, -0.038357995, -0.029495537, 0.010476963, 0.055117104, -0.011140922, 0.012352922, 0.02009993, 0.049572486, 0.0036506809, 0.0020128677, -0.013000835, 0.09444343, 0.01647098, 0.10176735, -0.014701012, 0.07943037, -0.11909997, 0.034825593, 0.029748242, 0.035332583, 0.042481225, 0.09497471, 0.01014985, -0.006225312, 0.03728534, 0.056773733, -0.033387236, -0.008005432, -0.06574406, 0.015142725, 0.043867856, -0.033512697, 0.081776984, 0.03133687, 0.012288687, 0.01581362, 0.014276593, -0.0009263756, 0.013118152, 0.0079352185, 0.011505377, 0.001254793, 0.01239975, -0.05470689, -0.00797266, -0.047456637, 0.12261839, -0.042948633, -0.11118943, -0.10735508, 0.07783824, 0.0024855367, 0.02082297, -0.009631133, -0.045850966, 0.0068659848, 0.027352441, 0.04494572, -0.012744962, -0.053986877, -0.017385004, -0.07804561, 0.0049650315, -0.03623705, 0.27425712, 0.07154156, 0.10045924, -0.044778407, 0.15781008, 0.0039459267, 0.054236885, -0.034448825, -0.059281576, -0.08069212, 0.022572113, -0.013545801, 0.038023613, -0.0019694387, 0.023034055, 0.008799326, -0.04872249, -0.031919606, -0.052767444, 0.05394788, -0.046899736, -0.013010691, 0.029814035, 0.017518083, 0.0662321, 0.0215406, -0.011713052, 0.065085575, -0.052023057, -0.005666435, 0.34917894, 0.32539153, 0.10203473, 0.0128748035, -0.4283522, -0.10256199, -0.09660082, -0.055379707, -0.052143507, -0.05580267, -0.0377891, -0.012782267, -0.057250477, 0.0026475552, 0.03364903, 0.095551684, -0.196663, -0.08477187, 0.094992556, 0.26069313, 0.20734991, 0.42528167, -0.31397697, 0.21473847, -0.2633356, -0.056702074, -0.1608836, -0.06556487, -0.064558335, -0.0074351113, -0.10084129, -0.025016544, 0.055379853, 0.02109734, 0.017266473, -0.035040837, 0.087944604, -0.06419977, 0.27585572, 0.11039916, 0.0027713268, -0.01987368, -0.12509765, -0.048652213, -0.021216474, -0.039353807, -0.00016417191, -0.015282616, -0.03383242, 0.18852775, -0.054262143, 0.060590442, 0.07434088, -0.18329303, 0.08882645, 0.10172523, 0.011587715, -0.036059815, 0.010161462, -0.026263025, -0.034913294, -0.028530115, -0.050323308, -0.03485921, -0.059130218, -0.1052172, 0.034727484, 0.09636715, -0.009355378, -0.08328378, -0.018469354, -0.3793854, 0.0123696355, -0.11376425, 0.023209028, -0.04596226, 0.019992355, 0.0005862636, 0.022716032, -0.0073214257, -0.08092167, 0.029061595, -0.12437811, -0.025695901, -0.056365624, -0.015389642, -0.03804987, 0.045304283, 0.0009684118, -0.0012951726, 0.011638488, -0.06881104], "bias": [0.01088573, 0.012155733, 0.011036726, 0.012341176]}, "pixel_shuffle": {"name": "pixel_shuffle", "type": "pixel_shuffle", "inputs": ["conv2d_last_tf"], "output": "canvas"}}} -------------------------------------------------------------------------------- /src/worker.js: -------------------------------------------------------------------------------- 1 | 2 | import {MP4Demuxer} from "./demuxer_mp4"; 3 | import {ArrayBufferTarget, FileSystemWritableFileStreamTarget, Muxer} from "mp4-muxer"; 4 | import WebSR from "../../websr/"; 5 | 6 | 7 | let gpu; 8 | let websr; 9 | let upscaled_canvas; 10 | let original_canvas; 11 | let resolution; 12 | let ctx; 13 | 14 | 15 | 16 | 17 | function getMP4Data(data, type, duration) { 18 | 19 | console.log("Fetching chunks"); 20 | 21 | return new Promise(function (resolve, reject) { 22 | 23 | let configToReturn; 24 | let dataToReturn =[]; 25 | let lastChunk = false; 26 | 27 | 28 | 29 | 30 | 31 | 32 | const demuxer = new MP4Demuxer(data, type, { 33 | onConfig(config) { 34 | configToReturn = config; 35 | if(configToReturn && lastChunk) return resolve({config: configToReturn, encoded_chunks: dataToReturn}); 36 | }, 37 | onData(chunks) { 38 | 39 | for(let chunk of chunks){ 40 | dataToReturn.push(chunk); 41 | } 42 | 43 | let last_time = chunks[chunks.length-1].timestamp/(1000*1000); 44 | 45 | 46 | if(Math.abs(duration - last_time) < 1) lastChunk = true; 47 | 48 | if(configToReturn && lastChunk) return resolve({config: configToReturn, encoded_chunks: dataToReturn}); 49 | }, 50 | setStatus: function (){} 51 | }); 52 | 53 | 54 | }); 55 | 56 | 57 | } 58 | 59 | 60 | const weights = require('./weights/cnn-2x-m-rl.json'); 61 | 62 | 63 | async function isSupported(){ 64 | gpu = await WebSR.initWebGPU(); 65 | 66 | postMessage({cmd: 'isSupported', data: gpu !== false}); 67 | } 68 | 69 | 70 | 71 | async function init(config){ 72 | 73 | if(!gpu) gpu = await WebSR.initWebGPU(); 74 | 75 | websr = new WebSR({ 76 | network_name: "anime4k/cnn-2x-m", 77 | weights, 78 | resolution: config.resolution, 79 | gpu: gpu, 80 | canvas: config.upscaled 81 | }); 82 | 83 | resolution = config.resolution; 84 | upscaled_canvas = config.upscaled; 85 | original_canvas = config.original; 86 | 87 | 88 | ctx = original_canvas.getContext('bitmaprenderer'); 89 | 90 | 91 | 92 | const bitmap2 = await createImageBitmap(config.bitmap, { 93 | resizeHeight: config.resolution.height*2, 94 | resizeWidth: config.resolution.width*2, 95 | }); 96 | await websr.render(config.bitmap); 97 | 98 | ctx.transferFromImageBitmap(bitmap2) 99 | 100 | 101 | } 102 | 103 | 104 | self.onmessage = async function (event){ 105 | 106 | 107 | if(!event.data.cmd) return; 108 | 109 | 110 | if(event.data.cmd === 'init'){ 111 | await init(event.data.data); 112 | } else if(event.data.cmd === 'isSupported'){ 113 | await isSupported(); 114 | } else if (event.data.cmd === 'process'){ 115 | await initRecording(event.data.data, event.data.duration, event.data.handle) 116 | } else if(event.data.cmd === 'network'){ 117 | await switchNetwork(event.data.data.name, event.data.data.weights, event.data.data.bitmap) 118 | } 119 | 120 | 121 | 122 | } 123 | 124 | async function switchNetwork(name, weights, bitmap){ 125 | 126 | 127 | websr.switchNetwork(name, weights); 128 | 129 | 130 | await websr.render(bitmap); 131 | 132 | } 133 | 134 | 135 | async function initRecording( data, duration, handle){ 136 | 137 | 138 | 139 | let bitrate = 5e6 * (resolution.width*resolution.height*4)/(1280*720); 140 | 141 | let videoData; 142 | let audioData; 143 | let writer; 144 | 145 | 146 | if(handle){ 147 | writer = await handle.createWritable(); 148 | } 149 | 150 | 151 | try { 152 | audioData = await getMP4Data(data, 'audio', duration); 153 | 154 | } catch (e) { 155 | console.log('No audio track found, skipping....'); 156 | 157 | } 158 | 159 | 160 | console.log("Audio data", audioData); 161 | 162 | try{ 163 | console.log("Truing to send data"); 164 | videoData = await getMP4Data(data, 'video', duration); 165 | } catch (e) { 166 | console.warn('No video data found'); 167 | postMessage({cmd: 'error', data: 'No video found'}); 168 | 169 | } 170 | 171 | console.log("Video data") 172 | const config = videoData.config; 173 | const encoded_chunks = videoData.encoded_chunks; 174 | 175 | 176 | const target = writer ? new FileSystemWritableFileStreamTarget(writer) : new ArrayBufferTarget(); 177 | 178 | 179 | const muxerOptions = 180 | { 181 | target: target, 182 | video: { 183 | codec: 'avc', 184 | width: resolution.width*2, 185 | height: resolution.height*2 186 | }, 187 | firstTimestampBehavior: 'offset', 188 | fastStart: 'in-memory' 189 | }; 190 | 191 | if(audioData){ 192 | muxerOptions.audio = { 193 | 194 | codec: 'aac', 195 | numberOfChannels: audioData.config.numberOfChannels, 196 | sampleRate: audioData.config.sampleRate 197 | 198 | } 199 | } 200 | 201 | 202 | const muxer = new Muxer(muxerOptions); 203 | 204 | 205 | let codec_string = resolution.width*resolution.height *4 > 921600 ? 'avc1.42003e': 'avc1.42001f'; 206 | 207 | 208 | 209 | const videoEncoderConfig = { 210 | codec: codec_string, 211 | width: resolution.width*2, 212 | height: resolution.height*2, 213 | bitrate: Math.round(bitrate), 214 | framerate: 1e6/videoData.encoded_chunks[0].duration, 215 | }; 216 | 217 | 218 | 219 | 220 | 221 | const decode_callbacks = []; 222 | 223 | // Set up a VideoDecoer. 224 | const decoder = new VideoDecoder({ 225 | output(frame) { 226 | 227 | const callback = decode_callbacks.shift(); 228 | callback(frame); 229 | }, 230 | error(e) { 231 | console.log("Decoder error"); 232 | console.log(e); 233 | 234 | postMessage({cmd: 'error', data: e.message}); 235 | 236 | } 237 | }); 238 | 239 | 240 | const encode_callbacks = []; 241 | 242 | const encoder = new VideoEncoder({ 243 | output: (chunk, meta) => { 244 | const callback = encode_callbacks.shift(); 245 | 246 | try { 247 | muxer.addVideoChunk(chunk, meta); 248 | } catch (e) { 249 | 250 | 251 | console.log("Muxing error"); 252 | console.log(e); 253 | postMessage({cmd: 'error', data: e.message}); 254 | } 255 | 256 | 257 | callback(); 258 | }, 259 | error: (e) => { 260 | 261 | console.log("Encoder error"); 262 | console.log(e); 263 | postMessage({cmd: 'error', data: e.message}); 264 | 265 | } 266 | }); 267 | 268 | 269 | encoder.configure(videoEncoderConfig); 270 | 271 | decoder.configure(config); 272 | 273 | 274 | const decode_promises = []; 275 | 276 | const decoder_buffer_length =20; 277 | 278 | for (let i = 0; i < Math.min(encoded_chunks.length, decoder_buffer_length); i ++){ 279 | 280 | let chunk = encoded_chunks[i]; 281 | 282 | decode_promises.push(new Promise(function (resolve, reject) { 283 | const callback = function (frame){ resolve(frame);} 284 | decode_callbacks.push(callback); 285 | })); 286 | 287 | try{ 288 | decoder.decode(chunk); 289 | 290 | console.log("Decodded queue size", decoder.decodeQueueSize); 291 | } catch (e) { 292 | 293 | console.log("Decoder Error"); 294 | console.log(e); 295 | 296 | postMessage({cmd: 'error', data: e.message}); 297 | } 298 | 299 | } 300 | 301 | const encode_promises = []; 302 | 303 | const start_time = performance.now(); 304 | 305 | let last_decode = performance.now(); 306 | 307 | let flush_check = setInterval(function () { 308 | 309 | if(performance.now() - last_decode > decoder_buffer_length && (encoded_chunks.length - current_frame < 10)) decoder.flush() 310 | 311 | }, 100); 312 | 313 | let current_frame; 314 | 315 | for (let i =0; i < decode_promises.length; i++){ 316 | 317 | const decode_promise = decode_promises[i]; 318 | const source_chunk = encoded_chunks[i]; 319 | 320 | const frame = await decode_promise; 321 | last_decode = performance.now(); 322 | 323 | 324 | const bitmap2 = await createImageBitmap(frame, 325 | { 326 | resizeHeight: resolution.height*2, 327 | resizeWidth: resolution.width*2,}); 328 | 329 | 330 | let render_promise = websr.render(frame); 331 | ctx.transferFromImageBitmap(bitmap2); 332 | //render_promise; 333 | 334 | // await websr.context.device.queue.onSubmittedWorkDone(); 335 | 336 | 337 | 338 | 339 | current_frame = i; 340 | 341 | const new_frame = new VideoFrame(upscaled_canvas,{ timestamp: frame.timestamp, duration: frame.duration, alpha: "discard"}); 342 | 343 | let progress = Math.floor((frame.timestamp/(1000*1000))/duration*100); 344 | 345 | let time_elapsed = performance.now() - start_time; 346 | 347 | if(time_elapsed > 1000){ 348 | const processing_rate = ((frame.timestamp/(1000*1000))/duration*100)/time_elapsed; 349 | let eta = Math.round(((100-progress)/processing_rate)/1000); 350 | 351 | postMessage({cmd: 'eta', data: prettyTime(eta)}) 352 | 353 | 354 | } else { 355 | postMessage({cmd: 'eta', data: 'calculating...'}) 356 | } 357 | 358 | 359 | postMessage({cmd: 'progress', data: progress}) 360 | 361 | 362 | 363 | encode_promises.push(new Promise(function (resolve, reject) { 364 | const callback = function (){ resolve();} 365 | encode_callbacks.push(callback); 366 | })); 367 | 368 | 369 | 370 | 371 | try{ 372 | 373 | 374 | 375 | if(encoder.encodeQueueSize >= 20){ 376 | await new Promise(function (resolve) { 377 | 378 | function check(){ 379 | if(encoder.encodeQueueSize < 20){ 380 | resolve(); 381 | } else { 382 | setTimeout(check, 100); 383 | } 384 | } 385 | 386 | check(); 387 | }) 388 | } 389 | 390 | 391 | encoder.encode(new_frame, {keyFrame: source_chunk.type === 'key'}); 392 | 393 | 394 | } catch (e) { 395 | 396 | 397 | console.log("Encoding error"); 398 | console.log(e); 399 | postMessage({cmd: 'error', data: e.message}); 400 | } 401 | 402 | 403 | frame.close(); 404 | new_frame.close(); 405 | 406 | 407 | if( i +decoder_buffer_length < encoded_chunks.length){ 408 | 409 | let chunk = encoded_chunks[i+decoder_buffer_length]; 410 | 411 | 412 | 413 | decode_promises.push(new Promise(function (resolve, reject) { 414 | const callback = function (frame){ resolve(frame);} 415 | decode_callbacks.push(callback); 416 | })); 417 | 418 | try{ 419 | 420 | decoder.decode(chunk); 421 | } catch (e) { 422 | } 423 | 424 | 425 | last_decode = performance.now(); 426 | } 427 | 428 | } 429 | 430 | clearInterval(flush_check); 431 | 432 | let last_encode = performance.now(); 433 | 434 | flush_check = setInterval(function () { 435 | 436 | if(performance.now() - last_encode > 1000) encoder.flush() 437 | 438 | }, 100); 439 | 440 | 441 | for (let i =0; i < encode_promises.length; i++){ 442 | 443 | const encode_promise = encode_promises[i]; 444 | await encode_promise; 445 | last_encode = performance.now(); 446 | 447 | } 448 | 449 | clearInterval(flush_check); 450 | 451 | 452 | try{ 453 | 454 | if(audioData) { 455 | 456 | const source_audio_chunks = audioData.encoded_chunks; 457 | 458 | for (let audio_chunk of source_audio_chunks){ 459 | muxer.addAudioChunk(audio_chunk); 460 | } 461 | 462 | } 463 | 464 | 465 | muxer.finalize(); 466 | 467 | 468 | if(writer){ 469 | await writer.close(); 470 | 471 | postMessage({cmd: 'finished', data: null}, []); 472 | } else{ 473 | 474 | postMessage({cmd: 'finished', data: muxer.target.buffer}, [muxer.target.buffer]); 475 | } 476 | 477 | 478 | 479 | 480 | 481 | } catch (e) { 482 | 483 | 484 | console.log("Err finishing"); 485 | console.log(e); 486 | 487 | postMessage({cmd: 'error', data: e.message}); 488 | 489 | } 490 | 491 | 492 | 493 | 494 | 495 | } 496 | 497 | 498 | 499 | 500 | 501 | function prettyTime(secs){ 502 | var sec_num = parseInt(secs, 10) 503 | var hours = Math.floor(sec_num / 3600) 504 | var minutes = Math.floor(sec_num / 60) % 60 505 | var seconds = sec_num % 60 506 | 507 | return [hours,minutes,seconds] 508 | .map(v => v < 10 ? "0" + v : v) 509 | .filter((v,i) => v !== "00" || i > 0) 510 | .join(":") 511 | } 512 | -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 13 | 14 | 15 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 31 | Free AI Video Upscaler, no signup or installation required 32 | 33 | 44 | 45 | 46 | 47 | 48 | 54 | 55 | 56 | 57 | 58 |

Free AI Video Upscaler

59 |

Upscale videos with AI for free, right in your browser - no signups, installation or config necessary. It is fast, free and open source, but the quality is not as good as GPU-powered AI Upscaling software. 60 |

61 | 62 | 63 | This is a quick, free no-nonsense tool for upscaling videos with AI right in the browser. There is no software to install, and no registration or sign up required. All you need to do is input a video, and your browser will do all of the AI Upscaling and video processing. This software tool is completely free and open source, and works particularly well for animated content. 64 | I built it because from previous experience as a casual user who just wants to upscale a few videos you have around, it's surprisingly frustrating. There are paid tools like Topaz Labs which are excellent but also overkill for non-professional work, or open source projects like Video2X which require a lot of setup and configuration. This tool, in contrast, is designed to be quick, fast, free, simple and easy to use. It is based on my WebSR project, which is an open-source WebSDK for applying real-time super resolution to videos on the web. It works by porting several open source AI Upscaling algorithms like Anime4K and RealESRGAN into WebGPU. The WebSR SDK then allows you to easily apply these AI Upscaling (Super resolution) algorithms to each frame of a video directly in the browser. 65 | 66 |

67 | 68 |
69 |
70 |
71 |
72 | 73 |
74 |

Your browser does not support , a required browser feature for this tool.

Try using the latest version of You can use the latest Chrome browser Chrome or You can use the latest Edge browser Edge on a 💻 Laptop or 🖥️ Desktop. 75 |

76 |
77 | 78 | 79 |
80 | 81 |

For what it's worth, here's how it's supposed to work [YouTube link]

82 |
83 | 84 | 85 | 86 | 87 |
88 | 89 | Loading 90 |
91 | 92 |
93 |

An error ocurred while processing the video:

94 |
95 | 96 |
97 |

Choose a video to upscale

98 | 99 |
100 | 101 | 102 | 103 |
104 | 105 |
106 |
107 | 108 | 109 | 110 |
111 | 112 | 113 | 114 |
115 | 116 | Full Screen 117 | 118 | 119 |
120 | 121 |
122 | 123 | 124 |

Upscaling to x. Output: ~

125 |

If you're looking for better quality upscaling, consider Fast AI Video Upscaler (fast, easy, paid) or Video2x (free, requires GPU and installation/config)

126 | 127 |
128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 138 | 152 | 153 | 154 | 155 | 158 | 173 | 174 |
136 | Upscaling Network 137 | 139 | 140 | 142 | 143 |   144 | 145 | 147 |   148 | 149 | 151 |
156 | Content Style 157 | 159 | 160 | 162 | 163 |   164 | 165 | 167 |   168 | 169 | 171 | 172 |
175 | 176 |
177 | 178 | 179 | 182 | 183 | 186 |
187 | 188 | 189 | 190 | 191 | 192 |
193 |

Upscaling .Estimated time left:

194 | 195 | 196 |
197 |
198 |
199 |
200 | 201 | 202 |

If you like the tool, please consider giving a like
on this YouTube video, it helps more people discover Free AI Video Upscaler

203 | 204 | 227 | 228 | 229 |
230 | 231 | 232 | 242 | 243 | 244 | 245 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import WebSR from '@websr/websr'; 2 | import { Muxer, ArrayBufferTarget, FileSystemWritableFileStreamTarget } from 'mp4-muxer'; 3 | import Alpine from 'alpinejs' 4 | import ImageCompare from './lib/image-compare-viewer.min'; 5 | import { MP4Demuxer } from "./demuxer_mp4"; 6 | 7 | 8 | import 'bootstrap'; 9 | import 'bootstrap/dist/css/bootstrap.min.css'; 10 | import "./index.css"; 11 | import "./lib/image-compare-viewer.min.css" 12 | const worker = new Worker(new URL('./worker.js', import.meta.url)); 13 | const progressVideo = document.createElement('video'); 14 | const progressCanvas = document.createElement('canvas'); 15 | const progressCtx = progressCanvas.getContext('2d'); 16 | 17 | let eta = ''; 18 | let pip = null; 19 | 20 | progressVideo.width = progressCanvas.width; 21 | progressVideo.height =progressCanvas.height; 22 | progressVideo.autoplay = true; 23 | progressVideo.muted = true; 24 | progressVideo.style.width = '300px'; 25 | progressVideo.style.height = '150px'; 26 | progressVideo.style.position = 'fixed'; 27 | progressVideo.style.top = '0px'; 28 | progressVideo.style.left = '0px'; 29 | progressVideo.style.visibility = 'hidden'; 30 | 31 | 32 | progressCanvas.style.visibility = 'hidden'; 33 | progressCanvas.id = "progress-canvas"; 34 | document.body.appendChild(progressCanvas); 35 | document.body.appendChild(progressVideo) 36 | 37 | 38 | let upscaled_canvas; 39 | let original_canvas; 40 | let video; 41 | let ctx; 42 | 43 | let size = 'medium'; 44 | let content = 'rl'; 45 | 46 | 47 | let tfliteModelP; 48 | let tfliteModel; 49 | 50 | let download_name; 51 | let data; 52 | let gpu; 53 | let websr; 54 | 55 | const weights = { 56 | 'large': 57 | { 58 | 'rl': require('./weights/cnn-2x-l-rl.json'), 59 | 'an': require('./weights/cnn-2x-l-an.json'), 60 | '3d': require('./weights/cnn-2x-l-3d.json'), 61 | }, 62 | 'medium': 63 | { 64 | 'rl': require('./weights/cnn-2x-m-rl.json'), 65 | 'an': require('./weights/cnn-2x-m-an.json'), 66 | '3d': require('./weights/cnn-2x-m-3d.json'), 67 | }, 68 | 'small': 69 | { 70 | 'rl': require('./weights/cnn-2x-s-rl.json'), 71 | 'an': require('./weights/cnn-2x-s-an.json'), 72 | '3d': require('./weights/cnn-2x-s-3d.json'), 73 | } 74 | } 75 | 76 | 77 | const networks = { 78 | 'small': { 79 | name: "anime4k/cnn-2x-s", 80 | }, 81 | 'medium': { 82 | name: "anime4k/cnn-2x-m", 83 | }, 84 | 'large': { 85 | name: "anime4k/cnn-2x-l", 86 | } 87 | } 88 | 89 | 90 | 91 | function uuidv4() { 92 | return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, c => 93 | (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16) 94 | ); 95 | } 96 | 97 | document.addEventListener("DOMContentLoaded", index); 98 | 99 | let tf; 100 | let tflite; 101 | let user_id; 102 | 103 | //=================== Initial Load =========================== 104 | 105 | 106 | function identify_user(){ 107 | 108 | 109 | user_id = localStorage.getItem("user_id"); 110 | 111 | if(!user_id) { 112 | user_id = uuidv4(); 113 | localStorage.setItem("user_id", user_id); 114 | } 115 | 116 | Sprig('setUserId', user_id); 117 | } 118 | 119 | 120 | async function index() { 121 | 122 | Alpine.store('state', 'init'); 123 | 124 | Alpine.start(); 125 | document.body.style.display = "block"; 126 | 127 | 128 | upscaled_canvas = document.getElementById("upscaled"); 129 | original_canvas = document.getElementById('original'); 130 | 131 | if(!"VideoEncoder" in window) return showUnsupported("WebCodecs"); 132 | 133 | if(! window.showSaveFilePicker) return showUnsupported("File Write System API") 134 | 135 | 136 | 137 | worker.postMessage({cmd: 'isSupported'}) 138 | 139 | 140 | window.chooseFile = chooseFile; 141 | 142 | try{ 143 | await import( '@tensorflow/tfjs-backend-cpu'); 144 | tf = await import('@tensorflow/tfjs-core'); 145 | tflite = await import('@tensorflow/tfjs-tflite'); 146 | 147 | tfliteModelP = tflite.loadTFLiteModel('./content_detection_mobilenet_v3.tflite', {numThreads: 1, enableProfiling: false, maxProfilingBufferEntries: 1024}); 148 | identify_user(); 149 | 150 | } catch (e) { 151 | Sentry.captureException(e); 152 | } 153 | 154 | 155 | 156 | 157 | 158 | } 159 | 160 | function showUnsupported(text) { 161 | Alpine.store('component', text); 162 | Alpine.store('state', 'unsupported'); 163 | 164 | gtag('event', 'unsupported', {}); 165 | } 166 | 167 | function chooseFile(e) { 168 | const input = document.createElement('input'); 169 | input.type = 'file'; 170 | input.onchange = loadVideo; 171 | input.accept = "video/mp4"; 172 | input.click(); 173 | } 174 | 175 | //=================== Preview =========================== 176 | 177 | 178 | function loadVideo(input){ 179 | 180 | const file = input.target.files[0]; 181 | 182 | const reader = new FileReader(); 183 | 184 | Alpine.store('state', 'loading'); 185 | 186 | reader.onload = function (e) { 187 | data = reader.result; 188 | 189 | setupPreview(data); 190 | } 191 | 192 | reader.readAsArrayBuffer(file); 193 | 194 | download_name = file.name.split(".")[0] + "-upscaled.mp4"; 195 | Alpine.store('download_name', download_name); 196 | Alpine.store('filename', file.name); 197 | 198 | 199 | gtag('event', 'load_video', {}); 200 | } 201 | 202 | 203 | 204 | async function setupPreview(data) { 205 | 206 | 207 | video = document.createElement('video'); 208 | 209 | 210 | const fileBlob = new Blob([data], {type: "video/mp4"}); 211 | 212 | video.src = URL.createObjectURL(fileBlob); 213 | 214 | 215 | 216 | const imageCompare = document.getElementById('image-compare-outer'); 217 | 218 | 219 | 220 | video.onloadeddata = async function (){ 221 | 222 | 223 | 224 | Alpine.store('width', video.videoWidth); 225 | Alpine.store('height', video.videoHeight); 226 | upscaled_canvas.width = video.videoWidth*2; 227 | upscaled_canvas.height = video.videoHeight*2; 228 | original_canvas.width = video.videoWidth*2; 229 | original_canvas.height = video.videoHeight*2; 230 | 231 | 232 | imageCompare.style.height = '318px'; 233 | imageCompare.style.width = `${Math.round(video.videoWidth/video.videoHeight*318)}px` 234 | imageCompare.style.margin = 'auto'; 235 | imageCompare.style.position = 'relative'; 236 | 237 | 238 | new ImageCompare(document.getElementById('image-compare')).mount(); 239 | video.currentTime = video.duration * 0.2 || 0; 240 | if(video.requestVideoFrameCallback) video.requestVideoFrameCallback(showPreview); 241 | else requestAnimationFrame(showPreview); 242 | 243 | } 244 | 245 | 246 | 247 | 248 | async function showPreview(){ 249 | 250 | gtag('event', 'preview', {}); 251 | 252 | const fullScreenButton = document.getElementById('full-screen'); 253 | 254 | 255 | window.initRecording = initRecording; 256 | window.fullScreenPreview = fullScreenPreview; 257 | 258 | const bitmap = await createImageBitmap(video); 259 | 260 | 261 | const upscaled = upscaled_canvas.transferControlToOffscreen(); 262 | const original = original_canvas.transferControlToOffscreen(); 263 | 264 | 265 | worker.postMessage({cmd: "init", data: { 266 | bitmap, 267 | upscaled, 268 | original, 269 | resolution: { 270 | width: video.videoWidth, 271 | height: video.videoHeight 272 | } 273 | 274 | }}, [bitmap, upscaled, original]); 275 | 276 | 277 | // video.style.height = '100%'; 278 | 279 | const contentDetectionCanvas = document.createElement('canvas'); 280 | contentDetectionCanvas.width = 224; 281 | contentDetectionCanvas.height = 224; 282 | const contentDetectionCtx = contentDetectionCanvas.getContext('2d', {willReadFrequently: true}); 283 | 284 | let detected= null; 285 | 286 | 287 | async function detectContentType(){ 288 | 289 | const preds = { 290 | 'animation': [], 291 | 'rl': [] 292 | } 293 | 294 | for (let i=0; i < 5; i++){ 295 | 296 | video.currentTime = (i/10 + 0.1)*video.duration; 297 | 298 | if(video.requestVideoFrameCallback) await new Promise((resolve => video.requestVideoFrameCallback(resolve))); 299 | else await new Promise((resolve => requestAnimationFrame(resolve))); 300 | 301 | 302 | contentDetectionCtx.drawImage(video, video.videoWidth/2-112, video.videoHeight/2-112, 224, 224, 0, 0, 224, 224 ); 303 | 304 | const img = tf.browser.fromPixels(contentDetectionCanvas); 305 | 306 | 307 | const input = tf.div(tf.expandDims(img), 255); 308 | 309 | let outputTensor = tfliteModel.predict(input); 310 | 311 | const values = outputTensor.dataSync(); 312 | 313 | preds['animation'].push(values[0]); 314 | preds['rl'].push(values[1]); 315 | 316 | 317 | } 318 | video.currentTime = video.duration * 0.2 || 0; 319 | 320 | if(video.requestVideoFrameCallback) await new Promise((resolve => video.requestVideoFrameCallback(resolve))); 321 | else await new Promise((resolve => requestAnimationFrame(resolve))); 322 | 323 | 324 | const animation_score = preds['animation'].reduce((partialSum, a)=> partialSum +a, 0); 325 | const rl_score = preds['rl'].reduce((partialSum, a)=> partialSum +a, 0); 326 | 327 | const unk_thresh = 2; 328 | 329 | if(animation_score - rl_score > unk_thresh) return 'an' 330 | else if (rl_score - animation_score > unk_thresh) return 'rl'; 331 | else return null; 332 | 333 | 334 | 335 | } 336 | 337 | 338 | try{ 339 | tfliteModel = await tfliteModelP; 340 | 341 | detected = await detectContentType(); 342 | } catch (e) { 343 | 344 | console.warn('Unable to load TFLite Model'); 345 | } 346 | 347 | 348 | 349 | if(detected){ 350 | content = detected; 351 | await updateNetwork(); 352 | Alpine.store('style', content); 353 | } else { 354 | // Just a guess 355 | // I tried training a 3 class network, but it was producing really innacurate results compared to just real life vs 2d animation 356 | // Decided I'd rather do a good job on 2d animations and real life, and then show a menu if it's maybe something else or we don't know 357 | content = '3d'; 358 | await updateNetwork(); 359 | Alpine.store('style', 'unknown'); 360 | } 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | function setFullScreenLocation(){ 371 | const containerWidth = Math.round(video.videoWidth/video.videoHeight*318); 372 | const containerHeight = 318; 373 | 374 | // Position at bottom-right of the preview container (with small padding) 375 | fullScreenButton.style.left = `${imageCompare.offsetLeft + containerWidth - 20}px`; 376 | fullScreenButton.style.top = `${imageCompare.offsetTop + containerHeight - 20}px`; 377 | } 378 | 379 | setTimeout(setFullScreenLocation, 20); 380 | setTimeout(setFullScreenLocation, 60); 381 | setTimeout(setFullScreenLocation, 200); 382 | 383 | 384 | 385 | 386 | 387 | imageCompare.addEventListener('fullscreenchange', function () { 388 | if(!document.fullscreenElement){ 389 | // Reset canvas styles 390 | upscaled_canvas.style.width = ``; 391 | upscaled_canvas.style.height = ``; 392 | original_canvas.style.width = ``; 393 | original_canvas.style.height = ``; 394 | 395 | // Reset container styles to original preview dimensions 396 | const imageCompareOuter = document.getElementById('image-compare-outer'); 397 | const imageCompareInner = document.getElementById('image-compare'); 398 | 399 | // Reset outer container 400 | imageCompareOuter.style.width = ``; 401 | imageCompareOuter.style.height = ``; 402 | imageCompareOuter.style.backgroundColor = ``; 403 | imageCompareOuter.style.display = ``; 404 | imageCompareOuter.style.justifyContent = ``; 405 | imageCompareOuter.style.alignItems = ``; 406 | 407 | // Reset inner container to original preview size 408 | imageCompareInner.style.height = '318px'; 409 | imageCompareInner.style.width = `${Math.round(video.videoWidth/video.videoHeight*318)}px`; 410 | imageCompareInner.style.margin = 'auto'; 411 | imageCompareInner.style.position = 'relative'; 412 | } 413 | }); 414 | 415 | let bitrate = getBitrate(); 416 | 417 | const estimated_size = (bitrate/8)*video.duration + (128/8)*video.duration; // Assume 128 kbps audio 418 | 419 | if(estimated_size > 100*1024*1024){ 420 | Alpine.store('target', 'writer'); 421 | } else { 422 | Alpine.store('target', 'blob'); 423 | } 424 | 425 | const quota = (await navigator.storage.estimate()).quota; 426 | 427 | if(estimated_size > quota){ 428 | return showError(`The video is too big. It would output a file of ${humanFileSize(estimated_size)} but the browser can only write files up to ${humanFileSize(quota)}`); 429 | } 430 | 431 | 432 | Alpine.store('size', humanFileSize(estimated_size)) 433 | 434 | 435 | function canvasFullScreen(){ 436 | // Calculate aspect ratios 437 | const videoAspectRatio = video.videoWidth / video.videoHeight; 438 | const screenAspectRatio = window.innerWidth / window.innerHeight; 439 | 440 | let displayWidth, displayHeight; 441 | 442 | const imageCompareOuter = document.getElementById('image-compare-outer'); 443 | const imageCompareInner = document.getElementById('image-compare'); 444 | 445 | // If video is wider than screen, fit to width (letterbox on top/bottom) 446 | if (videoAspectRatio > screenAspectRatio) { 447 | displayWidth = window.innerWidth; 448 | displayHeight = window.innerWidth / videoAspectRatio; 449 | } 450 | // If video is taller than screen, fit to height (pillarbox on sides) 451 | else { 452 | displayWidth = window.innerHeight * videoAspectRatio; 453 | displayHeight = window.innerHeight; 454 | } 455 | 456 | // Style the outer container to fill screen with black background and center content 457 | imageCompareOuter.style.width = `${window.innerWidth}px`; 458 | imageCompareOuter.style.height = `${window.innerHeight}px`; 459 | imageCompareOuter.style.backgroundColor = 'black'; 460 | imageCompareOuter.style.display = 'flex'; 461 | imageCompareOuter.style.justifyContent = 'center'; 462 | imageCompareOuter.style.alignItems = 'center'; 463 | 464 | 465 | console.log("Image Compare Outer", imageCompareOuter); 466 | console.log("Image Compare Inner", imageCompareInner); 467 | // Size the inner container to maintain aspect ratio 468 | imageCompareInner.style.width = `${displayWidth}px`; 469 | imageCompareInner.style.height = `${displayHeight}px`; 470 | 471 | // Let the canvases fill their parent container 472 | upscaled_canvas.style.width = `${displayWidth}px`; 473 | upscaled_canvas.style.height = `${displayHeight}px`; 474 | original_canvas.style.width = `${displayWidth}px`; 475 | original_canvas.style.height = `${displayHeight}px`; 476 | } 477 | 478 | async function fullScreenPreview(e) { 479 | imageCompare.requestFullscreen(); 480 | setTimeout(canvasFullScreen, 20); 481 | setTimeout(canvasFullScreen, 60); 482 | setTimeout(canvasFullScreen, 200); 483 | 484 | } 485 | 486 | 487 | Alpine.store('state', 'preview'); 488 | 489 | 490 | Sprig('setAttributes',{ 491 | content: content, 492 | width: video.videoWidth, 493 | height: video.videoHeight 494 | }); 495 | 496 | setTimeout(function () { 497 | Sprig('identifyAndTrack', { 498 | eventName: 'preview', 499 | userId: user_id, 500 | 501 | }); 502 | 503 | gtag('event', 'sprig', {}); 504 | 505 | 506 | }, 5000); 507 | 508 | 509 | window.switchNetworkSize = async function(el){ 510 | if(el.value !== size){ 511 | size = el.value; 512 | 513 | await updateNetwork(); 514 | } 515 | } 516 | 517 | window.switchNetworkStyle = async function(el){ 518 | if(el.value !== content){ 519 | content = el.value; 520 | 521 | await updateNetwork(); 522 | } 523 | } 524 | 525 | 526 | 527 | } 528 | 529 | } 530 | 531 | 532 | worker.onmessage = function (event) { 533 | 534 | if(event.data.cmd === 'isSupported'){ 535 | 536 | 537 | const supported = event.data.data; 538 | 539 | 540 | if(!supported) return showUnsupported("WebGPU"); 541 | 542 | 543 | } else if(event.data.cmd === 'progress'){ 544 | Alpine.store('progress', event.data.data); 545 | Alpine.store('state', 'processing'); 546 | 547 | 548 | progressView(event.data.data) 549 | 550 | 551 | } else if (event.data.cmd === 'process'){ 552 | 553 | } else if(event.data.cmd === 'error'){ 554 | 555 | showError(event.data.data); 556 | 557 | if(pip){ 558 | document.exitPictureInPicture(); 559 | } 560 | 561 | } else if(event.data.cmd === 'eta'){ 562 | 563 | Alpine.store('eta', event.data.data) 564 | eta = event.data.data; 565 | 566 | } else if(event.data.cmd === 'finished'){ 567 | Alpine.store('state', 'complete'); 568 | const blob = new Blob([event.data.data], {type: "video/mp4"}); 569 | Alpine.store('download_url', window.URL.createObjectURL(blob)); 570 | 571 | if(pip){ 572 | document.exitPictureInPicture(); 573 | } 574 | } 575 | 576 | 577 | } 578 | 579 | 580 | function progressView(progress){ 581 | 582 | 583 | const w = progressCanvas.width; 584 | const h =progressCanvas.height; 585 | 586 | progressCtx.clearRect(0, 0, w, h); 587 | 588 | progressCtx.fillStyle = "white"; 589 | progressCtx.fillRect(0, 0, w, h); 590 | 591 | progressCtx.fillStyle = "#bfdbfe"; 592 | progressCtx.fillRect(0, 0, Math.round(w*progress/100), h); 593 | progressCtx.font = "bold 32px Manrope"; 594 | progressCtx.textAlign = 'center'; 595 | 596 | progressCtx.fillStyle = "#232554"; 597 | progressCtx.fillText('Free AI Video Upscaler', w/2, 50); 598 | 599 | progressCtx.font = "14px Manrope"; 600 | progressCtx.textAlign = 'center'; 601 | 602 | progressCtx.fillText(download_name, w/2, 80); 603 | 604 | progressCtx.font = "bold 48px Manrope"; 605 | progressCtx.textAlign = 'center'; 606 | 607 | progressCtx.fillStyle = "#2563eb"; 608 | progressCtx.fillText(`${progress}%`, w/2, h/2+30); 609 | 610 | 611 | progressCtx.font = "14px Manrope"; 612 | progressCtx.textAlign = 'center'; 613 | progressCtx.fillStyle = "#232554"; 614 | progressCtx.fillText(`Time remaining: ${eta}`, w/2, h/2 + 80); 615 | 616 | } 617 | 618 | async function updateNetwork(){ 619 | 620 | 621 | const bitmap = await createImageBitmap(video) 622 | 623 | worker.postMessage({cmd: 'network', data: { 624 | name: networks[size].name, 625 | bitmap, 626 | weights:weights[size][content] 627 | }}) 628 | 629 | 630 | } 631 | 632 | 633 | //=================== Process =========================== 634 | 635 | async function initRecording(){ 636 | 637 | 638 | Alpine.store('state', 'loading'); 639 | 640 | const stream = progressCanvas.captureStream(); 641 | progressVideo.srcObject = stream; 642 | 643 | 644 | progressVideo.onloadedmetadata= async function(){ 645 | 646 | console.log("Loaded data") 647 | pip = await progressVideo.requestPictureInPicture(); 648 | 649 | progressCanvas.width = pip.width; 650 | progressCanvas.height = pip.height; 651 | } 652 | 653 | 654 | 655 | let bitrate = getBitrate(); 656 | const estimated_size = (bitrate/8)*video.duration + (128/8)*video.duration; // Assume 128 kbps audio 657 | 658 | let handle; 659 | 660 | // Max Blob size - 100 MB 661 | if(estimated_size > 100*1024*1024){ 662 | try{ 663 | handle = await showFilePicker(); 664 | } catch (e) { 665 | console.warn("User aborted request"); 666 | return Alpine.store('state', 'preview'); 667 | } 668 | 669 | } 670 | 671 | 672 | worker.postMessage({cmd: "process", data, duration: video.duration, handle}, [data]); 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | } 682 | 683 | function showError(message){ 684 | Alpine.store('state', 'error'); 685 | Alpine.store('error', message); 686 | 687 | } 688 | 689 | 690 | function getBitrate() { 691 | 692 | return 5e6 * (video.videoWidth*video.videoHeight*4)/(1280*720); 693 | } 694 | 695 | function humanFileSize(bytes, si=false, dp=1) { 696 | const thresh = si ? 1000 : 1024; 697 | 698 | if (Math.abs(bytes) < thresh) { 699 | return bytes + ' B'; 700 | } 701 | 702 | const units = si 703 | ? ['kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'] 704 | : ['KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']; 705 | let u = -1; 706 | const r = 10**dp; 707 | 708 | do { 709 | bytes /= thresh; 710 | ++u; 711 | } while (Math.round(Math.abs(bytes) * r) / r >= thresh && u < units.length - 1); 712 | 713 | 714 | return bytes.toFixed(dp) + ' ' + units[u]; 715 | } 716 | 717 | 718 | 719 | function prettyTime(secs){ 720 | var sec_num = parseInt(secs, 10) 721 | var hours = Math.floor(sec_num / 3600) 722 | var minutes = Math.floor(sec_num / 60) % 60 723 | var seconds = sec_num % 60 724 | 725 | return [hours,minutes,seconds] 726 | .map(v => v < 10 ? "0" + v : v) 727 | .filter((v,i) => v !== "00" || i > 0) 728 | .join(":") 729 | } 730 | 731 | async function showFilePicker(){ 732 | const handle = await window.showSaveFilePicker({ 733 | startIn: 'videos', 734 | suggestedName: download_name, 735 | types: [{ 736 | description: 'Video File', 737 | accept: {'video/mp4' :['.mp4']} 738 | }], 739 | }); 740 | 741 | 742 | return handle 743 | } 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | 752 | 753 | 754 | 755 | 756 | -------------------------------------------------------------------------------- /src/weights/cnn-2x-m-an.json: -------------------------------------------------------------------------------- 1 | {"name": "anime4k/cnn-2x-m", "layers": {"conv2d_tf": {"name": "conv2d_tf", "type": "conv", "inputs": ["input_image"], "output": "conv2d_tf", "weights": [-0.072145514, 0.00028308097, -0.02246936, 0.024812723, -0.07055249, -0.026193684, 0.06250765, 0.10273287, 0.023989726, 0.059850752, 0.12388443, -0.05610249, 0.0, 0.0, 0.0, 0.0, 0.09287214, -0.28751278, 0.16856873, -0.15185986, 0.16519044, 0.4119165, 0.07745975, -0.39149612, 0.13748379, 0.19694383, -0.0066408464, 0.035648603, 0.0, 0.0, 0.0, 0.0, 0.046672463, -8.82265e-05, 0.15009816, 0.102355726, -0.032501314, -0.14876123, -0.1941357, 0.11521068, -0.032267876, 0.14113747, -0.07084842, -0.08086943, 0.0, 0.0, 0.0, 0.0, -0.03968421, -0.19019222, -0.07080888, -0.12406084, 0.122626044, 0.15815943, 0.1530841, 0.06688442, 0.1656277, 0.09434839, 0.026673744, 0.030796751, 0.0, 0.0, 0.0, 0.0, 0.6921126, 0.095474385, -0.0056551266, 0.05798976, 0.7254942, -0.2543809, -1.0393281, -1.035846, -0.08110214, -0.6830166, -0.15731563, 0.39509445, 0.0, 0.0, 0.0, 0.0, -0.13021441, 0.1503607, 0.20657627, -0.0663681, 0.033763044, -0.066993274, 0.6008725, -0.1464296, -0.06528626, 0.09392874, 0.061711833, -0.069615036, 0.0, 0.0, 0.0, 0.0, -0.30076998, -0.14036414, -0.16433552, -0.08016163, 0.10318603, -0.03843068, -0.09866994, 0.14631474, 0.05388223, 0.034318227, 0.052106798, -0.057668205, 0.0, 0.0, 0.0, 0.0, -0.23786129, 0.3727822, -0.36011657, 0.047483545, 0.055704113, -0.20353787, 0.08237646, 0.17585282, -0.02251169, -0.10484316, 0.027232561, -0.13464582, 0.0, 0.0, 0.0, 0.0, 0.108914025, 0.02642652, 0.107908495, 0.118661806, -0.051034376, 0.0048822667, 0.10991195, 0.08074561, -0.067566656, 0.070840575, -0.04906773, -0.116966926, 0.0, 0.0, 0.0, 0.0], "bias": [-0.2894205, -0.030624738, 0.3073097, 0.16633725]}, "conv2d_1_tf": {"name": "conv2d_1_tf", "type": "conv", "inputs": ["conv2d_tf"], "output": "conv2d_1_tf", "weights": [0.06147661, 0.08833126, 0.046938453, -0.06018922, 0.018930146, 0.17391251, 0.0968089, 0.16006882, 0.046476644, -0.120067514, 0.00928321, -0.1123082, 0.09198358, -0.113103606, 0.09203268, 0.10243458, 0.03423173, 0.2505715, 0.031599615, -0.09511331, 0.1426214, -0.15313806, 0.12848975, 0.023286961, 0.11289028, -0.08757947, -0.43745708, 0.06928223, 0.3181391, 0.057651803, 0.026929406, 0.03803578, -0.1292945, 0.042583257, -0.2004356, 0.32660207, 0.1276197, -0.056887686, -0.24774489, -0.13177316, -0.081318446, -0.06493321, -0.07007088, -0.055146568, -0.023784764, 0.11433824, -0.3040935, -0.027778838, -0.044498716, 0.42280948, 0.062070623, 0.2148611, -0.123194054, -0.25048327, 0.19733655, -0.13551375, -0.009461302, -0.5631941, -0.08607164, 0.13850448, -0.08990211, -0.14915596, -0.066133216, -0.19829673, 0.21967943, -0.25121883, 0.37952, -0.45724368, -0.2076556, -0.28931007, 0.3471786, 0.122488834, -0.012703499, 0.31451723, 0.21664213, 0.21074998, 0.3702994, 0.15678592, -0.21367137, 0.8268485, -0.22125253, -0.110753976, 0.047768846, -0.27023393, 0.13471258, 0.14345424, -0.13693272, 0.038446166, -0.06620079, -0.05445717, 0.039801225, -0.046015315, 0.11203161, 0.26460502, -0.023194747, -0.039629303, 0.069432564, -0.09272574, 0.12253827, 0.1291694, -0.11224104, 0.16809909, -0.06915314, -0.17369248, 0.05969406, -0.14640228, -0.0057935934, -0.08471993, -0.02034365, 0.29337114, 0.14110939, 0.0361152, -0.27787417, 0.009200061, -0.08835913, -0.056134365, -0.21587728, 0.21017273, -0.31632778, -0.25002062, 0.29224077, 0.40650958, 0.1681141, -0.23782323, -0.16064619, -0.19453338, -0.34186718, -0.053081196, -0.24282049, -0.11873012, -0.11440592, -0.008417438, -0.034035943, -0.18256468, -0.16165936, 0.03052503, -0.08246184, 0.06311742, 0.04626973, 0.040066913, -0.10866987, -0.04512457, 0.09514122, 0.038252804, -0.03537035, -0.13365282, 0.0019187316, 0.039242424, -0.06117977, -0.092283174, -0.13210632, -0.17939499, -0.066161625, 0.13690484, -0.005225468, 0.2245015, -0.13621947, -0.026488775, -0.050598588, -0.14804119, -0.107831135, -0.22277409, -0.02657944, -0.038208194, -0.24297678, -0.018400285, -0.26537237, 0.022952996, -0.10555939, 0.261099, 0.43923762, -0.013036105, -0.28890732, -0.0063598123, 0.025646267, -0.013443436, 0.054750264, -0.016597766, 0.32688782, -0.2769158, -0.09020083, 0.04267472, 0.2602852, 0.08283018, 0.043695193, 0.0037251178, 0.006281472, 0.05668816, -0.030066907, 0.055234175, 0.2986416, 0.16619839, 0.018525071, -0.4757674, 0.04003113, -0.41883922, 0.107983075, 0.1751906, -0.17759812, 0.08198361, -0.10118877, 0.56437653, -0.010495897, -0.0020253563, 0.08937133, 0.17738473, -0.02704055, -0.24398229, 0.080102555, 0.47490886, -0.8159124, 0.7260771, 0.37928665, 0.037219018, -0.15212315, -0.2146389, -0.2708812, -0.45721346, 0.01860179, -0.1548227, 0.107198894, -0.03666022, -0.46162957, -0.20030443, 0.11108713, 0.063587174, -0.20645106, 0.35211852, -0.024195202, -0.13010001, 0.14576577, -0.11711316, 0.030958494, 0.065396935, 0.0071226587, 0.016234476, -0.18657097, -0.24682587, 0.20031837, 0.061695997, -0.10664103, 0.21913692, -0.01698097, -0.096373215, 0.07363686, -0.11368008, 0.08352549, 0.11886179, 0.08031944, 0.22339283, -0.040905915, -0.0033878332, 0.03447521, -0.05581082, -0.07779932, 0.005415639, 0.2127241, -0.110704474, 0.03432127, 0.04623661, 0.22938679, -0.03414845, 0.28390107, 0.21659572, -0.23376194, -0.14149353, -0.17764302, 0.32690096, 0.24899793, -0.18892059, 0.009465065, 0.04142101, 0.25251555, 0.13680334, 0.22024646, 0.007084259, -0.07390074, 0.1629211, 0.12988287, -0.03469388, 0.064322144, -0.01900559, -0.06668637, -0.0121769, 0.06270774, 0.03689303, -0.016368631, 0.067921266], "bias": [0.27518556, 0.06594818, 0.06889677, 0.32818964]}, "conv2d_2_tf": {"name": "conv2d_2_tf", "type": "conv", "inputs": ["conv2d_1_tf"], "output": "conv2d_2_tf", "weights": [-0.12055435, 0.028174262, -0.01101243, -0.026536943, -0.06556763, -0.0006661467, -0.010659855, 0.090222426, -0.013101601, -0.043220893, -0.0409395, -0.078889154, 0.04819996, 0.08357922, -0.061341837, -0.15148611, -0.051552843, 0.04883752, 0.22236107, 0.082210384, -0.10781561, -0.13986887, 0.30802122, 0.08129698, 0.014590004, 0.1744795, -0.008702794, -0.26453918, 0.23859273, 0.27499026, -0.08907096, -0.11396533, 0.17680302, 0.022539906, -0.12644073, -0.07810667, -0.06440564, -0.1937115, 0.22362083, 0.15877265, -0.035918653, -0.016067287, -0.18339655, 0.1543823, -0.01004357, 0.014796912, -0.059541825, -0.07496525, -0.19312991, -0.024564218, 0.17875266, 0.2496253, 0.019069003, -0.09085132, -0.06492089, -0.043645658, 0.25133958, -0.26194933, 0.019492093, 0.10133122, -0.11057951, 0.0636808, -0.054831043, -0.15803578, 0.26223436, -0.16157901, -0.1976137, -0.035051145, 0.21214224, 0.3401372, 0.5216007, 0.6700845, -0.12713583, 0.120234296, 0.04647983, 0.08953485, -0.53825873, 0.2739483, 0.39496818, 0.020643814, -0.041439362, 0.11358511, 0.07060764, -0.16733532, 0.18871532, -0.18637286, -0.035755362, 0.012733885, 0.042467248, 0.2349043, -0.10918459, -0.21813078, -0.073067755, 0.08488387, 0.09177309, -0.23914938, -0.042621277, -0.24078824, -0.021424523, -0.007019578, -0.029259302, -0.17231734, -0.027484939, 0.021671435, -0.062107943, 0.10638934, -0.009526606, -0.09798395, 0.11208506, 0.09472034, 0.013034389, -0.19733614, -0.13013071, -0.14299756, 0.23108183, 0.18999898, 0.05525996, -0.01161137, 0.059769284, 0.024959827, 0.18430766, -0.28173015, -0.11164548, 0.1054962, -0.05249486, -0.07437297, 0.115532555, 0.17630522, 0.05864554, -0.022461498, -0.15162918, 0.07141074, 0.024728106, 0.092160806, -0.004592189, 0.030370867, -0.009048824, 0.028164314, 0.011055046, -0.011112018, 0.112569354, 0.026626568, -0.06660306, 0.003634946, 0.06379041, -0.038249806, -0.06160145, 0.06156178, 0.04683488, -0.05885483, -0.0121804485, -0.03547206, 0.03276355, 0.030431833, -0.015190564, 0.13947055, -0.1223834, -0.067045, 0.065692596, 0.104044564, 0.019469986, -0.13686319, -0.28933376, -0.17707358, 0.33283707, 0.10433893, -0.12440424, 0.14742821, -0.0010814479, -0.21799791, 0.048757467, 0.2835622, -0.2643379, -0.10806347, 0.12151464, -0.055228937, -0.18912427, 0.076117314, 0.10264859, -0.058588713, 0.07278803, -0.04987233, 0.024781132, 0.20415989, -0.048158433, -0.025592465, 0.08732647, -0.19518706, -0.08699652, 0.07888954, -0.06287499, -0.13874468, 0.23872691, -0.012314145, -0.33459377, -0.1310463, 0.049930844, 0.03124191, 0.14450158, 0.22526416, -0.21537669, -0.056746982, 0.082357325, 0.009039302, 0.48757255, 0.26592538, 0.31403992, 0.1079903, -0.003156833, 0.14999776, 0.3177266, 0.18880388, 0.2514045, -0.5620437, -0.110633686, 0.085045576, -0.019093752, -0.10633538, -0.07372114, 0.08093257, 0.40297195, -0.42842764, -0.5099368, -0.117902905, 0.054723468, -0.22143371, -0.080170535, 0.11801161, -0.1837477, 0.0115374345, 0.17818123, 0.36469492, 0.012382525, -0.26728615, 0.044464953, 0.28695142, -0.062313966, 0.042640977, -0.19088961, 0.021226598, -0.09542022, -0.074450545, -0.13662271, 0.0047579734, 0.038643643, 0.0057035317, 0.010948598, 0.11691816, 0.12941894, 0.021103136, -0.09375779, -0.024820587, 0.10518244, 0.11617655, 0.04521192, 0.081855424, 0.038214758, 0.12035451, -0.42161435, -0.25775856, 0.062097635, -0.09038791, 0.039834194, 0.12608735, -0.3059741, 0.11122705, 0.101475306, -0.16488662, -0.08142406, 0.15159576, -0.24148002, -0.25276068, -0.10014693, -0.120480426, 0.106845155, -0.026614334, -0.036622092, -0.16601749, 0.0443842, 0.14661941, 0.008907851, -0.15375392, -0.00032195396, 0.07091635, -0.08842447, -0.027301233, 0.12642208, -0.05739118], "bias": [-0.020053953, -0.08030914, -0.031667113, -0.057931505]}, "conv2d_3_tf": {"name": "conv2d_3_tf", "type": "conv", "inputs": ["conv2d_2_tf"], "output": "conv2d_3_tf", "weights": [0.092348345, 0.011549111, -0.07096583, 0.06318526, -0.34451073, -0.06226293, -0.11486986, -0.28391263, -0.07931199, 0.047377743, 0.11298014, 0.018078646, 0.008847511, -0.085046604, -0.10360512, 0.16585863, -0.15492225, 0.066241525, -0.2880374, 0.24267495, -0.1057126, -0.351533, -0.19891146, -0.2209817, 0.2745846, 0.056732643, 0.24722001, -0.025073752, 0.1285598, 0.15161784, 0.22305192, -0.22307764, 0.043648794, 0.002543572, -0.0053086164, 0.014056233, -0.0025330964, -0.17823894, -0.16875874, -0.22843477, -0.12612578, -0.10728596, 0.1317476, -0.12218237, 0.32138517, 0.012191922, 0.046478216, 0.23892581, 0.12965497, -0.07608229, -0.10039548, -0.09535607, -0.049215976, -0.018316727, 0.021785105, -0.29035375, -0.062276933, 0.07903935, 0.006138336, -0.17263635, 0.031781826, 0.18434966, 0.17061065, 0.02077058, 0.38750374, -0.38368112, -0.027802546, 0.063279726, -0.6239663, 0.20014192, -0.40209654, -0.3320961, 0.006900858, 0.6090297, -0.07506234, 0.20160931, -0.047854822, 0.021656018, 0.0049554114, 0.14350726, -0.041821595, 0.021657363, 0.13525978, 0.17162056, -0.19015202, -0.25497964, -0.14035563, 0.13719065, 0.17625289, -0.25994387, 0.084760614, 0.22369596, -0.15136376, -0.1385544, 0.068622775, -0.05381221, 0.028013391, -0.033600815, 0.03991427, 0.07613022, -0.16403502, -0.2936361, -0.2920832, -0.38995817, -0.09273259, 0.2301474, -0.08964003, -0.09027052, 0.12913172, -0.049059182, 0.16466747, 0.15556188, 0.07706466, 0.20295623, -0.13845254, -0.14086933, -0.045054216, -0.15888304, -0.20826185, -0.53498626, -0.20120667, 0.02944775, -0.20645592, 0.14122348, -0.046863936, -0.08029416, 0.094162844, -0.12828223, -0.007267417, -0.0046080705, -0.07930926, 0.014687774, -0.45307216, -0.24690385, -0.23200984, -0.4180271, 0.124578185, 0.13288634, 0.033508055, 0.118447095, -0.037407, -0.20652232, -0.040319838, -0.08660553, -0.22856003, 0.08621852, 0.06809734, -0.07325568, 0.01537169, 0.000639635, 0.020709824, -0.07083113, 0.16485776, 0.097905956, -0.006345512, 0.18595028, 0.09344443, -0.3147003, -0.30784383, -0.0057022553, 0.35297117, -0.07332451, 0.14582145, -0.1953324, -0.26668516, -0.08707401, -0.28034073, 0.13042176, -0.10846176, 0.062066674, -0.12201378, 0.22939827, -0.17046858, -0.075111955, -0.3703659, -0.26530454, -0.10224615, 0.091090545, -0.05792418, -0.04401949, -0.21356915, 0.12028008, -0.020852875, -0.054986063, 0.17630918, 0.11274911, -0.03103941, 0.15191038, -0.27852568, -0.053193133, -0.13109528, -0.30675924, -0.41568774, 0.27179566, 0.23976654, -0.07440384, 0.10714987, -0.08263661, -0.12746455, -0.08196831, 0.10331742, -0.22144881, -0.14936146, 0.2534529, 0.18653165, -0.031143565, -0.26364815, -0.1777623, 0.16597204, 0.0054389574, -0.819906, -0.4300934, 0.10858059, -0.10608918, -0.059153773, -0.1643999, 0.2057038, -0.43916315, 0.24373738, -0.040487833, 0.21805379, -0.21550594, -0.4369431, -0.22926703, 0.17658432, 0.28409827, -0.14008674, -0.11056963, -0.18818034, 0.029623456, -0.028717186, -0.067016356, -0.40485436, -0.089993626, 0.24655615, -0.04519315, -0.20817767, -0.17945032, -0.30033702, -0.06559305, 0.019520376, -0.042809293, -0.07077904, -0.15429147, 0.15946518, 0.08921542, -0.051255226, 0.1027924, -0.07770598, -0.09715461, 0.21211259, 0.011298821, -0.011093094, -0.021823658, -0.27545053, -0.2373658, 0.015511425, -0.021879502, 0.19077745, 0.11016199, 0.1106167, 0.13150243, 0.008336127, 0.07087111, 0.20369104, 0.04512683, 0.42380115, 0.11048072, 0.041108422, -0.23399702, -0.50051045, -0.14850679, 0.09962276, 0.12795202, 0.03406151, -0.022594294, 0.003382893, 0.14019206, 0.010771717, -0.0504001, -0.15400204, -0.2037712, 0.05653853, 0.04790949, -0.008362585, 0.27567932, -0.03961576, -0.23369862], "bias": [0.14959018, 0.02919448, 0.0326669, 0.06768387]}, "conv2d_4_tf": {"name": "conv2d_4_tf", "type": "conv", "inputs": ["conv2d_3_tf"], "output": "conv2d_4_tf", "weights": [-0.084394485, 0.016493073, 0.016797146, -0.0053561246, 0.053920858, 0.01573839, 0.052421916, -0.027108151, 0.14107837, -0.06431044, -0.06964066, -0.067688584, -0.104633816, 0.02696463, 0.13619483, -0.0029869801, 0.0046778396, -0.011591918, 0.06420322, -0.023565795, 0.049672235, -0.009634769, -0.22492595, 0.09164804, -0.2790692, 0.117682606, 0.18726623, 0.07687261, -0.12465192, 0.03142656, 0.18775102, 0.091342464, -0.113580845, -0.017467966, 0.016541954, -0.024166046, 0.18918575, -0.034905262, -0.11024242, -0.13085513, -0.17789307, 0.041150704, 0.268339, 0.25922203, 0.09019094, -0.062000286, 0.11462383, -0.07963925, 0.3258164, -0.12108431, -0.31655976, -0.070432335, -0.11392292, 0.058203746, 0.1333354, -0.06024274, 0.022118362, 0.0817773, -0.15476245, 0.27508014, -0.06412502, -0.036618974, 0.032069776, -0.03686787, 0.6528506, -0.030277515, -0.5588472, -0.04408157, 0.093097635, 0.38286957, 0.51352715, -0.23801436, -0.24588928, -0.72285944, -0.14402243, 0.44834173, -0.0668237, -0.20662913, 0.60910714, -0.016656926, 0.18700771, -0.06432143, -0.1335317, 0.07824519, 0.07244991, 0.13448672, -0.07946187, 0.086320214, 0.63916326, 0.30472332, -0.028304817, 0.16940933, -0.1510297, -0.20419174, 0.08564124, -0.11302102, -0.04591939, 0.11538493, 0.1522626, 0.08873703, 0.00091377087, -0.12730649, -0.011363399, 0.03729583, 0.024664454, 0.10566429, 0.09240334, 0.077509366, 0.09602506, -0.017290076, -0.122802496, 0.026897771, -0.012308567, 0.17486034, 0.095571116, -0.004873663, -0.26773053, -0.12069487, 0.00240376, 0.21224426, 0.09590006, -0.07113762, 0.49553472, -0.70697355, 0.1082898, -0.40515184, -0.19816537, 0.033929355, -0.012107104, 0.05848574, 0.038235698, -0.054012705, 0.0047617727, -8.0178164e-05, 0.14021727, 0.09106305, -0.018121002, 0.06846601, -0.0602399, -0.15124476, -0.12827854, -0.12092974, 0.03620283, 0.22423702, 0.047554135, 0.013713998, -0.19877706, 0.20493634, 0.11640787, -0.07232803, -0.14646003, -0.006013356, -0.011176427, 0.032947335, 0.077004775, -0.03560033, 0.024175053, -0.03007514, -0.12503828, 0.0176204, 0.35598892, -0.129132, -0.16694455, -0.20155169, -0.2970762, 0.005555552, 0.3451364, -0.017626438, 0.11259827, 0.011302529, -0.07223299, 0.0041388487, 0.1399206, -0.03988847, -0.116156444, -0.07081249, -0.047312055, -0.07309245, 0.037772585, 0.020345727, -0.11299656, 0.036599513, 0.049321774, 0.11437634, -0.056323104, -0.061282735, -0.020636894, -0.0721359, -0.016392289, 0.040534876, -0.07898183, 0.07670411, -0.01614528, -0.010428739, 0.07363855, 0.31304735, 0.020175518, 0.025360018, -0.15698072, 0.18748625, -0.19403012, 0.00050825306, 0.23111546, -0.027805353, 0.032027993, 0.08388896, 0.011589746, -0.03743963, -0.6464231, -0.4745039, 0.16213289, 0.10013217, -0.15123008, -0.8054472, -0.36683777, 0.31472555, -0.096195586, 0.48154506, 0.62508005, -0.21204728, 0.31178978, 0.18453065, -0.5653493, -0.007459248, 0.37288693, 0.09701015, 0.11216748, 0.016230293, -0.027019959, 0.05083335, -0.027923055, 0.020143913, 0.39570096, -0.18937685, -0.014264976, -0.031576872, -0.28692764, 0.14014132, 0.027101377, 0.079557866, -0.04016008, -0.02177852, -0.039032266, 0.012764097, 0.026319377, 0.100706704, 0.031527523, -0.026600633, -0.017820677, -0.1284909, -0.14268431, 0.03965332, -0.088624984, 0.058060996, 0.06361163, 0.055537306, 0.22145456, -0.3484864, -0.085450985, 0.07435331, 0.2935538, 0.14172246, -0.039141074, -0.20678422, -0.10138657, -0.263434, -0.13958192, 0.23467793, 0.15134631, 0.11852304, 0.19699298, -0.13204712, 0.1563562, -0.0050778976, -0.2500995, -0.048066173, 0.1618367, -0.0677695, -0.05582334, -0.100746006, -0.320929, -0.0010358171, -0.018679567, 0.28365892, 0.20668015, 0.17990084, 0.081409745, -0.15907615], "bias": [-0.088332005, -0.030688623, 0.0075079403, 0.00037059895]}, "conv2d_5_tf": {"name": "conv2d_5_tf", "type": "conv", "inputs": ["conv2d_4_tf"], "output": "conv2d_5_tf", "weights": [-0.045126025, 0.050714225, 0.0125732105, 0.02846407, -0.060089536, -0.034834176, -0.0040735775, 0.052462872, -0.06349833, 0.035765424, -0.016616918, -0.0018578349, 0.013570179, 0.10944321, -0.030015511, 0.027956745, -0.12730308, 0.03566323, 0.11001803, 0.15532783, 0.09383734, 0.021051487, 0.061895505, -0.16896167, -0.04920816, 0.07981793, 0.10226323, 0.15644692, -0.1068625, 0.07156015, 0.085769154, 0.16979004, 0.024430305, 0.019860426, 0.054592874, -0.0084316535, -0.08488101, 0.030014526, -0.12295434, -0.046541102, 0.041157596, -0.009510352, 0.026766898, -0.035353363, 0.16085613, -0.10208919, 0.08546014, -0.058680072, 0.004408565, -0.11591945, 0.250611, 0.080347836, -0.08632918, -0.026267642, -0.2886495, 0.024631828, 0.19790933, -0.08560785, 0.011915067, 0.053927578, 0.21855202, 0.0815331, 0.29583204, 0.10125018, 0.08520437, -0.23847492, 0.10188593, 0.08718157, -0.10323534, 0.25349405, 0.14276703, 0.8306245, 0.7219559, 0.27170542, 0.0027806691, 0.22671483, -0.03504881, 0.26001468, -0.33698237, -0.08021798, 0.005341523, -0.04316488, 0.010990971, -0.04580816, -0.2011575, -0.12839723, 0.03454423, 0.07033941, 0.2015521, -0.023450239, 0.07495305, 0.060190327, 0.2374915, 0.08314132, 0.1448765, 0.010782365, -0.2539676, -0.061023794, 0.017386999, -0.16106452, -0.0081275655, -0.026813408, -0.04273378, 0.059856992, 0.10524249, -0.05252324, -0.054779455, -0.13417783, -0.02017702, 0.03993368, 0.08925187, -0.08785317, -0.2150907, -0.09752493, -0.07819065, 0.118367486, 0.15965632, -0.01911593, 0.09756007, -0.19293915, -0.47118682, -0.02320393, -0.19661823, -0.07426088, 0.114565015, -0.036253266, 0.07992177, 0.31465366, 0.0026737838, -0.014244393, -0.01744674, -0.013864417, -0.08633515, -0.1659503, -0.14300038, -0.08190065, 0.13308053, 0.09437318, 0.057976108, 0.10253313, 0.15059637, 0.08850139, 0.027487176, -0.08374699, -0.09405149, -0.34007606, -0.089055754, -0.21923012, 0.01680151, -0.021069944, -0.08408347, -0.15109247, 0.104958385, -0.035915416, -0.025164688, 0.015189877, 0.30754042, 0.12916833, 0.08284153, 0.11368843, -0.14502743, -0.4974284, -0.2713126, -0.3666665, -0.0029413125, 0.032684244, -0.07021809, 0.1026307, 0.0642739, -0.123929024, -0.08701057, -0.18521209, 0.49029237, 0.046552774, -0.14227879, -0.1992994, -0.12557283, -0.14293958, -0.21946761, -0.1387717, 8.083835e-05, -0.02922972, -0.011674403, 0.030726615, -0.13186221, -0.059631154, 0.017142752, 0.055411287, 0.12673274, 0.09713596, -0.08412111, -0.117981605, -0.3852806, -0.10279084, -0.3413863, -0.07057451, -0.24884792, -0.033740543, 0.5202652, 0.19363657, 0.006298159, 0.07814635, -0.26607308, -0.3450293, 0.020913104, 0.27751172, 0.16371046, -0.04810517, -0.39776224, -0.26468077, -0.3712633, -0.4995043, -0.22427292, 0.15806368, 0.12583312, -0.34573475, -0.3879835, -0.74063385, -0.02289026, -0.6869013, -0.10638952, 0.22758023, 0.49369675, 0.31574854, -0.35703254, -0.2998416, -0.28791642, -0.1461705, -0.14126725, 0.014661143, -0.019008396, -0.037071824, 0.23344654, 0.110609345, -0.01446526, -0.09883566, 0.20432739, 0.21668363, 0.18600217, 0.1599944, -0.04502004, 0.020007275, -0.27264562, 0.004470462, -0.01151076, 0.0078300135, -0.14619705, 0.010003601, 0.1576979, 0.09199233, -0.052911576, 0.041739505, 0.10981996, 0.12077738, 0.015626527, 0.16059186, 0.03954714, -0.094067276, 0.07555303, -0.025608933, -0.0689886, -0.010123235, 0.2671116, 0.067083225, 0.50753486, -0.26253924, -0.51049423, -0.28097796, 0.28253108, 0.13674913, 0.14408405, -0.03868868, -0.10005469, -0.12964216, -0.22730994, -0.06401748, -0.11373249, 0.10857882, 0.060836446, 0.083079845, -0.01994219, -0.30618262, -0.21965942, -0.46155962, 0.019577969, 0.047131278, 0.020768244, -0.02240607], "bias": [-0.09626135, 0.08572907, 0.07610502, 0.16032846]}, "conv2d_6_tf": {"name": "conv2d_6_tf", "type": "conv", "inputs": ["conv2d_5_tf"], "output": "conv2d_6_tf", "weights": [-0.11283044, -0.013649477, -0.019421967, 0.006565143, 0.10823824, 0.19030023, 0.07156823, 0.024473488, -0.047083624, 0.06672259, 0.007229437, 0.011572557, 0.060731366, -0.041707586, -0.054455467, -0.06050326, 0.39128456, 0.28495076, 0.16994765, -0.08431057, 0.32349753, 0.16350484, 0.32249597, -0.15476833, -0.0372553, -0.20726503, -0.07509582, -0.055866964, -0.26835552, -0.2888027, -0.25840938, 0.20359063, -0.009564484, -0.12518948, -0.07402255, -0.0155140525, -0.055037342, 0.09893796, 0.17675622, 0.1404991, 0.04840018, 0.10003178, -0.122268006, 0.0066550495, -0.041109264, -0.083343655, -0.047279987, -0.057214934, 0.087393224, -0.24262205, -0.14546157, 0.012720769, -0.26185998, -0.3492204, 0.087170415, 0.055508275, 0.112916835, -0.021071512, -0.08717399, 0.038901046, 0.07165449, -0.12182682, 0.034713216, -0.027062943, 0.1938159, 0.02296587, -0.40469512, -0.08972523, -0.5214429, -0.24444413, -0.24784324, 0.024871845, 0.23072693, 0.07799527, 0.2761894, -0.05362061, 0.5237775, -0.34370264, 0.42938495, -0.0615884, -0.25135922, 0.34398514, -0.13097152, 0.50502264, 0.06675731, -0.17853314, 0.015865749, -0.14499716, 0.01271855, -0.031905618, 0.090150066, 0.31696916, 0.0974942, 0.0604816, 0.0981407, -0.10030817, -0.2942046, 0.3371821, 0.055784162, 0.28460097, 0.08670208, 0.30872712, 0.042119164, -0.19730645, -0.029366834, -0.079392135, -0.04880518, 0.045242663, 0.15900402, 0.09247392, 0.1781036, -0.082805544, -0.23928781, 0.12516917, -0.06923645, 0.42036477, 0.041864343, -0.028095292, 0.05267187, 0.49764788, 0.0058747637, -0.092510335, -0.13487665, -0.02442822, 0.10546383, 0.012073766, 0.14021946, 0.1738348, -0.22908622, -0.030520018, -0.037626877, -0.028545355, -0.04057567, -0.05031531, -0.07575728, -0.26082054, 0.005577125, 0.07140469, -0.035891753, -0.027718421, -0.055172723, -0.040569693, 0.036204822, -0.005853962, 0.034226943, 0.16486132, 0.09011371, 0.022761948, 0.15949166, -0.08287511, 0.07277687, -0.17158747, 0.14110333, -0.20516108, -0.011551723, 0.051031575, -0.019465653, 0.17198224, 0.022128996, 0.07668109, 0.17403072, 0.0877173, 0.076412074, -0.03931085, 0.18396425, 0.12625359, 0.044374563, -0.04681122, -0.4707356, -0.24832478, -0.37675288, 0.09399827, -0.059699435, -0.07279629, 0.10709204, -0.01452613, -0.012287054, 0.043240163, 0.13432027, 0.016848277, -0.016251257, -0.04498773, -0.064520776, 0.032628447, 0.021948995, 0.08237686, 0.21542545, -0.025794316, -0.020522699, 0.060088117, 0.020946914, 0.010411652, -0.071696386, -0.07662451, -0.007301545, 0.016705653, -0.09712441, -0.5909676, 0.025369452, -0.23310408, -0.09923453, 0.16598324, -0.15862101, 0.08138516, -0.04394261, -0.036927376, -0.14534806, 0.24659514, -0.27326187, -0.44396913, 0.45290014, 0.11851251, 0.37091386, -0.40212852, -0.38454592, -0.27537692, -0.21460232, 0.63972193, -0.07988595, 0.07176707, -0.36231333, 0.041881774, 0.1238989, -0.04679531, 0.013311633, -0.11264601, -0.000334869, -0.040406898, 0.16872448, -0.062339205, 0.033721007, -0.2167214, 0.090755336, 0.25688443, 0.049314357, 0.41296968, 0.028205669, -0.05258211, 0.06585726, 0.16326734, -0.10017808, -0.048400078, 0.051791072, -0.010662406, 0.2781319, 0.00027611817, 0.046901092, -0.21505776, 0.03867316, 0.047448587, 0.09677218, 0.08187778, -0.25470436, 0.091234475, 0.03072702, 0.08450537, 0.31911144, -0.19473487, -0.08755452, -0.22224784, 0.24446562, 0.24320345, 0.35516587, 0.30172288, -0.16882494, -0.29129937, -0.27510744, 0.03922657, -0.2550607, 0.32496977, 0.020911083, 0.34660512, 0.106634595, -0.06650022, -0.03557048, -0.20013554, 0.059642687, -0.18237995, 0.045294486, -0.13069394, -0.17135487, -0.34176064, -0.2608333, -0.35861385, 0.0810206, 0.042578034, -0.038163207, 0.05271628], "bias": [0.03929918, 0.04986752, -0.032747284, -0.05262931]}, "conv2d_7_tf": {"name": "conv2d_7_tf", "type": "conv", "inputs": ["conv2d_tf", "conv2d_1_tf", "conv2d_2_tf", "conv2d_3_tf", "conv2d_4_tf", "conv2d_5_tf", "conv2d_6_tf"], "output": "conv2d_7_tf", "weights": [0.030445501, -0.052265964, 0.01871345, -0.032196082, -0.08789084, 0.00451594, -0.035013296, 0.049980935, 0.019856643, -0.033371273, -0.012764798, -0.050311647, 0.1016879, 0.26120493, 0.15319104, 0.30260828, -0.011320103, 0.084351994, -0.013853055, 0.091662854, -0.00022424257, -0.047643784, -0.060312573, -0.1231358, -0.031871304, -0.014136978, 0.0032705222, 0.07787969, -0.031681746, -0.057632104, -0.08574857, -0.12985754, 0.05320602, -0.048404478, 0.10048556, -0.026353268, -0.06601672, -0.064613424, -0.0019030399, -0.040858693, 0.2889084, 0.30683297, 0.28597072, 0.29085115, 0.0894729, 0.04317532, -0.051809974, -0.069235325, -0.10028094, 0.018571123, -0.11555895, 0.0074250647, 0.08632434, 0.04199708, 0.07014709, 0.0395046, -0.18092953, -0.25615, -0.16059212, -0.2242134, -0.05844784, 0.011175528, 0.022804333, 0.055179488, -0.0035756915, 0.029555544, -0.057007857, -0.011543149, -0.05260268, -0.13569865, 0.17767961, 0.05763981, 0.08037558, 0.0854749, -0.09117043, -0.028697504, -0.06290819, -0.052024692, 0.01357789, -0.0007758558, -0.0076591154, -0.054832436, 0.03104537, -0.07229308, 0.044558987, 0.1096424, -0.06388823, -0.03381543, 0.008121961, -0.0071056834, 0.019476276, 0.014538379, 0.0144254705, -0.05443686, 0.05784454, 0.00021147214, 0.024051894, -0.01760832, 0.0828035, 0.06164727, -0.03441998, 0.00198512, 0.018536223, 0.012326052, -0.096829265, -0.09033538, 0.061622098, 0.004497285, 0.078871064, 0.065974824, -0.0076666777, -0.08943216, -0.0827367, -0.13351539, -0.021332163, -0.07937496, -0.023691114, -0.07576844, 0.034633763, -0.0054157176, 0.04818707, 0.13734294, -0.0491794, -0.040830683, -0.014140617, -0.053490162, 0.01728071, 0.088826664, 0.055253997, -0.016022734, -0.07637242, -0.032335658, -0.0668001, -0.14762713, 0.05597752, 0.014707982, 0.004930473, -0.14050685, -0.028585805, 0.021917267, 0.08642902, 0.04652173, -0.01584847, -0.016214162, -0.047325704, 0.007658281, 0.1395665, 0.034603175, -0.079251006, 0.082055256, 0.0818267, 0.111324936, 0.09762098, 0.1785905, -0.036907803, -0.14729157, -0.059522513, -0.04754573, 0.053542215, -0.04370413, -0.13521186, -0.065591395, 0.023284486, 0.09420268, 0.13622068, -0.022057435, -0.042552732, -0.027567035, -0.030387424, -0.07810714, 0.014374227, 0.09920431, 0.048217654, 0.1090012, -0.07694576, -0.02600855, 0.1307021, 0.03766495, -0.10179733, -0.010970625, -0.06020565, 0.050316818, -0.056756098, 0.03114012, 0.028388757, -0.034492534, 0.039500885, -0.08915758, 0.03761112, -0.11821317, 0.043239858, 0.08695215, 0.031210948, 0.08761116, 0.01767844, -0.055869993, 0.19191101, -0.115752295, 0.055158403, -0.078982204, -0.058509402, -0.10978919, 0.06622744, -0.024440672, 0.006510303, 0.09053071, 0.041478187, -0.11237255, -0.08888559, -0.0175886, -0.07919481, 0.1301304, -0.08967372, 0.013421654, 0.0213782, -0.01923792, -0.07347132, 0.23006114, -0.16629104, 0.14273474, 0.014865724, -0.077135175, 0.046202764, 0.110953994], "bias": [-0.09315623, -0.01892607, -0.018664315, 0.05707644]}, "conv2d_7_tf1": {"name": "conv2d_7_tf1", "type": "conv", "inputs": ["conv2d_tf", "conv2d_1_tf", "conv2d_2_tf", "conv2d_3_tf", "conv2d_4_tf", "conv2d_5_tf", "conv2d_6_tf"], "output": "conv2d_7_tf1", "weights": [-0.03203963, 0.012625379, -0.015731812, 0.01934081, 0.040269192, 0.06355962, 0.026060525, 0.024770064, 0.013291169, 0.036368445, 0.014430322, 0.048174843, -0.04100082, -0.11301496, -0.01512035, -0.12968759, 0.083384864, 0.010284865, 0.0014147769, -0.0058197724, -0.049497265, -0.027643712, -0.02452052, -0.004834419, 0.00024621058, -0.04149765, 0.022549637, 0.01907756, 0.051630385, 0.046271153, 0.06621741, 0.06213355, 0.03592716, 0.06960934, 0.039258648, 0.055528857, 0.039774194, 0.030444575, 0.009556282, -0.049838077, -0.13215798, -0.14297363, -0.1299766, -0.13833381, -0.02354993, -0.05251604, 0.06370487, 0.014982579, -0.052483108, -0.0465884, -0.05734048, -0.044421416, 0.0022415305, 0.0380222, -0.012731541, 0.05548879, 0.07215888, 0.09319826, 0.08444643, 0.10942869, -0.020208193, 0.022419268, -0.082369365, -0.06718921, 0.085042566, 0.05402874, 0.07109829, 0.012440189, -0.00056668685, 0.077201664, -0.07645562, -0.0065426994, -0.016551742, 0.039741952, -0.08546126, 0.011569358, -0.018029, -0.0708575, -0.0051092226, -0.06613502, 0.014473516, 0.06471411, -0.109876424, -0.10161449, -0.006772723, 0.01944313, 0.05662042, 0.03279107, 0.079842456, -0.03113039, -0.06561014, -0.12358709, -0.04165135, -0.0041241474, 0.013571383, 0.022914797, -0.004620971, -0.035017263, 0.019463848, 0.022293072, -0.09611277, -0.037571304, 0.025271876, 0.05271664, -0.094556056, -0.08180956, -0.0023080425, -0.08386168, 0.072075345, 0.043343827, 0.029228963, -0.0745529, -0.08594209, -0.1486261, -0.0033100976, -0.09926667, 0.004597467, -0.06498222, -0.0072805905, -0.046663295, 0.010520682, 0.09522635, 0.047422618, 0.04686724, 0.0049615214, -0.070131496, -0.038736176, 0.027141714, 0.068141095, -0.009222132, -0.09298968, -0.022981714, -0.11794498, -0.24883682, 0.06285758, -0.040530503, 0.023102041, -0.108376004, -0.0947533, 0.011852517, 0.13540526, 0.082098365, -0.017887602, -0.0168834, -0.056527253, -0.0028296846, 0.17043272, 0.01559117, -0.05693428, 0.17201194, 0.13481094, 0.20069869, 0.07975364, 0.15567626, 0.014267647, -0.1647196, -0.067929946, -0.060350247, 0.04606933, -0.080939464, -0.12796874, -0.059804168, 0.038161963, 0.11338205, 0.12449382, -0.063439354, -0.027544323, -0.030887483, -0.06469375, -0.13027595, 0.019439653, 0.12102275, 0.10306811, 0.20515186, -0.11600495, -0.017482607, 0.13160959, 0.022079693, -0.12674521, -0.013941859, -0.03285099, 0.10889952, -0.108865075, 0.02437333, 0.05444826, -0.019505689, 0.06490676, -0.10266784, 0.0196239, -0.2045733, 0.08500317, 0.12041114, 0.038999576, 0.11392652, 0.018239606, -0.07527914, 0.2424234, -0.14988343, 0.08443514, -0.09385597, -0.06814398, -0.13903786, 0.07403476, -0.037108265, -0.0139128985, 0.09602558, 0.028035937, -0.15235782, -0.111720346, -0.017848942, -0.10032179, 0.16303523, -0.1107667, 0.013318661, 0.025533743, -0.030419175, -0.10123028, 0.2987671, -0.1901437, 0.20649679, 0.02757003, -0.092585176, 0.06945392, 0.14909884], "bias": [-0.0019922925, -0.031558692, -0.012974283, -0.030921914]}, "conv2d_7_tf2": {"name": "conv2d_7_tf2", "type": "conv", "inputs": ["conv2d_tf", "conv2d_1_tf", "conv2d_2_tf", "conv2d_3_tf", "conv2d_4_tf", "conv2d_5_tf", "conv2d_6_tf"], "output": "conv2d_7_tf2", "weights": [0.0078015737, -0.1069858, -0.08214693, -0.19662377, -0.24679859, -0.259798, -0.2825307, -0.3002897, -0.033170536, 0.009037076, -0.06471358, -0.008062548, 0.33933204, 0.35258317, 0.42240462, 0.39983308, -0.010697483, 0.081293896, 0.036631033, 0.18007624, 0.19054145, 0.24917243, 0.18648013, 0.2489242, -0.017479975, -0.043114778, 0.011919171, 0.025444604, -0.3097963, -0.21695957, -0.27833402, -0.18391538, -0.25040805, -0.23631427, -0.25025168, -0.24865435, 0.042065173, 0.083157755, 0.061137203, 0.071588814, -0.044977773, 0.008478686, -0.00084282836, 0.049453374, -0.032142013, -0.08026673, -0.08853224, -0.1216394, 0.18268804, 0.17796996, 0.20164566, 0.19135785, -0.035876144, -0.06757642, -0.064864054, -0.090898216, 0.042896114, 0.00054021174, 0.0074260943, -0.035815943, 0.069839485, 0.121482305, 0.09711192, 0.10492122, 0.06319654, 0.09393101, 0.028855225, 0.06821149, -0.08000093, -0.020028021, -0.03671945, 0.017522326, -0.018603487, -0.035996117, -0.0976101, -0.090490334, -0.014328419, -0.030903641, 0.025069723, -0.0035409883, -0.0020061978, -0.013291817, -0.041149486, -0.10289244, 0.024184963, 0.034944274, 0.014290865, -0.011308398, 0.09837517, 0.0998194, 0.05841568, 0.1001512, -0.027776875, -0.023589013, -0.005636875, -0.0064647263, -0.029324658, -0.03390079, -0.00022918812, 0.015080682, -0.023656078, -0.013858318, 0.023292018, 0.00061927625, -0.08198919, -0.043944865, 0.018253015, 0.0036559834, 0.08720356, 0.04782466, 0.057039097, -0.039048817, -9.105729e-05, -0.04331058, 0.038882393, -0.010137616, -0.010911734, -0.03208449, 0.02824511, 0.027689938, 0.052123386, 0.07206957, 0.026071645, -0.023875356, -0.03838205, -0.056557115, -0.03913256, 0.03652393, 0.069563136, -0.0012880678, -0.052812636, -0.022333166, -0.04461301, -0.10861375, 0.07419778, 0.035370655, 0.01702869, -0.05196944, -0.058625046, 0.041409995, 0.07369974, 0.033218417, -0.029440258, -0.028367113, -0.044799328, -0.0057474473, 0.11498554, 0.019316392, -0.0962131, 0.036443487, 0.04333048, 0.06405375, 0.08939619, 0.082270615, 0.021189885, -0.15693638, -0.05184121, -0.034860216, 0.04559894, -0.021655124, -0.11721688, -0.05531037, 0.013229716, 0.07984346, 0.15896061, 0.0013449837, 0.0035146866, -0.022993533, -0.04364348, -0.07877339, 0.014994648, 0.093894236, 0.017005067, 0.08363463, -0.10174244, -0.03644556, 0.11331717, 0.043665934, -0.08172703, -0.00242159, -0.11465893, 0.013738912, -0.104767494, 0.015051101, 0.050871555, -0.016916635, 0.03737477, -0.0832486, 0.04717599, -0.09404747, 0.06971056, 0.090383, 0.0304174, 0.08579437, 0.0119016655, -0.046921503, 0.15475388, -0.106115945, 0.046624437, -0.06969833, -0.054273132, -0.103994764, 0.05259161, -0.027331285, -0.006395205, 0.07532883, 0.02790517, -0.09288012, -0.08568432, -0.0353462, -0.075286664, 0.099043466, -0.06930279, 0.009565153, 0.026108846, -0.016375825, -0.0596071, 0.20451383, -0.13568212, 0.1307245, 0.01610393, -0.06642206, 0.03890225, 0.09259684], "bias": [0.10899447, 0.10118224, 0.155225, 0.15036581]}, "pixel_shuffle": {"name": "pixel_shuffle", "type": "pixel_shuffle", "inputs": ["conv2d_7_tf", "conv2d_7_tf1", "conv2d_7_tf2"], "output": "canvas"}}} -------------------------------------------------------------------------------- /src/weights/cnn-2x-m-3d.json: -------------------------------------------------------------------------------- 1 | {"name": "anime4k/cnn-2x-m", "layers": {"conv2d_tf": {"name": "conv2d_tf", "type": "conv", "inputs": ["input_image"], "output": "conv2d_tf", "weights": [-0.11606336, 0.17977928, -0.27346742, 0.124493435, 0.15652506, 0.2845143, -0.0026843916, -0.19497222, 0.13320322, 0.11033785, -0.21989621, 0.11207873, 0.0, 0.0, 0.0, 0.0, -0.10988178, -0.30772716, -0.41737673, 0.09727902, -0.23669402, -0.5062192, -0.2662598, 0.1126543, -0.110433154, -0.035403367, -0.27922922, 0.014905251, 0.0, 0.0, 0.0, 0.0, 0.1673138, 0.21435647, 0.0991883, 0.08848872, 0.28353062, -0.22595239, 0.22235885, -0.12553884, -0.06435851, 0.23793034, -0.02895988, 0.05851421, 0.0, 0.0, 0.0, 0.0, -0.06527518, 0.0009992365, 0.16914415, -0.08580268, -0.065111995, 0.18426816, 0.33551374, -0.05623329, -0.34856713, 0.055840224, 0.10477855, 0.3088062, 0.0, 0.0, 0.0, 0.0, -0.4047918, -0.38514897, 0.6453525, -0.6695825, -0.4114409, -0.27396202, 0.58474267, 0.25724518, -0.3791753, -0.30253774, 0.19307339, -0.30811906, 0.0, 0.0, 0.0, 0.0, -0.05841689, 0.12711738, -0.26518336, -0.21317536, -0.052410815, 0.16059583, -0.05319537, 0.01622084, 0.07479186, -0.30965877, 0.2144306, 0.15355839, 0.0, 0.0, 0.0, 0.0, 0.14847465, 0.13815038, -0.028073678, 0.2186973, -0.18746363, -0.19688894, -0.21375322, -0.029839175, 0.31318492, 0.03398371, 0.13908163, -0.17011626, 0.0, 0.0, 0.0, 0.0, 0.082191214, -0.07573231, -0.110015325, 0.044385966, -0.09126862, 0.50149125, -0.36304137, -0.31671065, -0.0760504, 0.19005129, 0.29838115, -0.06994295, 0.0, 0.0, 0.0, 0.0, -0.03997613, 0.10711133, 0.2920969, 0.17430729, -0.08918032, 0.09155168, 0.013416766, 0.027657839, 0.19027728, 0.020657036, -0.33332226, -0.22530448, 0.0, 0.0, 0.0, 0.0], "bias": [0.07606802, 0.09729832, 0.012942811, 0.5625359]}, "conv2d_1_tf": {"name": "conv2d_1_tf", "type": "conv", "inputs": ["conv2d_tf"], "output": "conv2d_1_tf", "weights": [0.13398904, 0.31106707, -0.24516815, -0.10223475, -0.021094762, 0.06421805, 0.20445661, 0.017145015, -0.09517393, 0.030834226, 0.11247594, -0.009866822, -0.02299197, -0.0025018842, 0.078243144, -0.09684197, 0.26788697, 0.2721901, -0.16956545, 0.46711928, -0.06078478, 0.2121688, -0.10680213, -0.12403891, -0.12835354, -0.1414604, 0.2116623, 0.06955634, 0.030484539, 0.03776486, 0.062162813, 0.09124468, 0.015129639, 0.19659676, -0.43855304, 0.052361038, -0.12687272, -0.07380384, -0.04636695, 0.117407836, 0.08115984, -0.10018457, 0.06883005, -0.018031513, -0.03776163, -0.0367366, -0.07437988, -0.053009566, 0.17695092, 0.014332625, 0.002966589, -0.19727035, 0.08600045, 0.06847765, -0.14117013, -0.014638577, -0.14032821, -0.031005614, 0.14726682, 0.022833185, -0.015553153, 0.11482301, -0.002867386, -0.0039069876, -0.25406557, -0.115356736, 0.101271845, 0.33151704, 0.32322282, 0.040061504, -0.062065504, 0.115033105, -0.0933092, -0.10633967, -0.19852228, -0.18449658, 0.022037001, -0.19889763, 0.064308524, 0.10046037, 0.18254162, 0.32357463, 0.4288217, 0.6237335, -0.11840234, -0.0071857166, -0.08804538, -0.07589813, 0.15188785, -0.010205552, -0.09852454, -0.2460295, -0.07461511, -0.032564312, -0.27323446, -0.064379774, 0.044581793, 0.22894746, -0.1802935, -0.2690704, 0.079360805, 0.103287585, -0.008570362, -0.089542575, -0.1329516, 0.12050982, -0.0030015386, -0.027521424, 0.051165797, -0.10085252, 0.00013368498, 0.073774755, -0.40903112, -0.12125079, 0.298725, 0.036986463, 0.120306335, -0.17919756, -0.06324796, 0.28444302, 0.32893908, -0.08780014, -0.11230092, 0.20419864, -0.1681612, 0.16062817, -0.0123456055, -0.208336, -0.20350553, 0.22378701, 0.009587118, -0.10072582, 0.050127126, -0.037878074, -0.03381747, -0.021997068, 0.15292531, -0.010497088, 0.0758131, -0.056700535, 0.07834409, -0.10942698, 0.055824224, 0.12815832, -0.17698693, -0.3055658, 0.09967433, 0.098928824, 0.10173185, 0.04113592, -0.29084405, -0.024333095, 0.06813831, 0.053886253, 0.03601129, 0.01787395, -0.3636861, -0.2611388, 0.42422765, -0.27144617, -0.17313176, -0.094153084, -0.0032488997, -0.26813602, 0.20981374, -0.12566373, 0.09031148, 0.15152319, 0.024084533, 0.1122652, 0.012085819, -0.018394787, -0.03474743, -0.30334213, 0.17162411, -0.34010682, 0.10829615, -0.058659215, 0.096897066, -0.075050645, -0.04252922, 0.065123, 0.07876711, -0.14319685, -0.06574127, 0.05299319, -0.21848576, 0.05696007, -0.22319631, 0.02581564, 0.09025793, -0.12129464, 0.04095923, -0.07435875, 0.051763527, 0.072874926, 0.047589038, -0.12897262, 0.17409727, 0.0333813, 0.18284716, 0.20985128, -0.1333369, -0.045197096, -0.14864855, -0.6198857, 0.50725585, 0.1453008, 0.08633372, 0.041169077, -0.113290854, -0.119742654, 0.16737501, 0.17155202, 0.14582264, -0.28672713, 0.49221733, -0.1012341, 0.41467783, -0.036201924, -0.57681143, -0.5296542, -0.40910345, 0.6782604, -0.30978954, -0.036785055, -0.24596226, -0.17083214, 0.030971462, 0.010830634, 0.0026806833, 0.14230551, -0.11693772, 0.046302274, 0.4059211, 0.2792543, 0.15723385, -0.5630804, -0.6161421, 0.2024145, 0.21252708, -0.10771148, 0.036381878, 0.16049491, 0.05679561, -0.044410653, -0.06296423, 0.021954492, 0.1386076, -0.09925893, 0.105343826, 0.0744434, 0.23576045, 0.09489304, -0.028932052, -0.13939933, 0.04438212, 0.05060549, 0.054901775, -0.18032031, -0.10731229, 0.12581119, 0.0077560083, -0.065935574, -0.17900354, 0.10131783, -0.22404161, -0.25318182, 0.21593264, 0.22542816, -0.0072031817, 0.010529421, 0.06634015, -0.054192886, -0.062199865, 0.1428507, -0.016526487, -0.026490308, -0.12360084, -0.036109116, -0.16370384, 0.049125556, 0.010957963, -0.15898204, -0.14532503, 0.12072349, -0.063199304, -0.18571481], "bias": [-0.06397516, 0.05638626, 0.10463126, 0.0011305006]}, "conv2d_2_tf": {"name": "conv2d_2_tf", "type": "conv", "inputs": ["conv2d_1_tf"], "output": "conv2d_2_tf", "weights": [0.1389021, 0.091259226, 0.022572143, 0.0115275, -0.011023383, 0.13229011, -0.04427844, -0.11169886, 0.07716936, 0.090821125, 0.046744302, -0.011402823, -0.11736449, -0.2667003, 0.023563068, 0.02957548, 0.011650642, 0.18548153, -0.30580342, 0.1695315, 0.3387618, 0.3661105, 0.017590256, 0.026533876, 0.0919619, 0.11293674, -0.0557881, 0.1455142, -0.13073084, -0.3100949, -0.018935384, 0.14194205, -0.031120645, 0.023400873, 0.14656979, -0.040248573, -0.06434811, 0.22149771, -0.0024626045, 0.11707657, -0.031401653, 0.06698952, 0.009313236, 0.03779623, -0.08165063, -0.35684943, -0.2558622, 0.24340671, 0.014392414, -0.08611935, 0.049171295, -0.009878269, -0.19666666, 0.01640658, 0.22811183, 0.029217739, 0.0021387034, -0.085635245, 0.009026237, 0.037537675, 0.0008398032, -0.037557166, 0.23526864, -0.067269556, 0.10023519, -0.47463253, 0.32720736, -0.08215983, -0.31714198, -0.087194405, -0.32390776, 0.41236085, 0.13543816, -0.11665298, -0.042616665, 0.16041128, 0.034048986, -0.21876253, 0.34592885, -0.2984467, 0.14026311, 0.00039554725, -0.08887815, 0.09412184, -0.2593666, 0.12145084, 0.5662811, -0.30960065, 0.0414934, 0.014458909, -0.2624452, 0.15943702, -0.020743644, 0.13598824, -0.2830027, -0.009470007, 0.024342375, -0.17326683, 0.05765725, 0.09488647, 0.2575581, 0.23502757, -0.08160544, -0.26553977, -0.1220589, 0.08013969, -0.016161768, -0.1209314, 0.17869818, 0.30278516, -0.13164262, -0.13690683, -0.21733806, 0.15865012, -0.21771297, 0.13636877, 0.3512635, -0.20011751, 0.71565914, -0.104760975, -0.20776182, 0.15196297, -0.1321028, 0.07464626, 0.2463665, -0.1288413, 0.18602447, -0.21134764, -0.009091793, -0.0590124, 0.15350531, -0.013251095, 0.0025398862, -0.021339731, 0.21685794, 0.082489654, -0.047705688, 0.026638396, -0.039147984, 0.030637523, 0.11972439, 0.03649345, -0.08800465, 0.04791849, -0.063899465, -0.105438404, 0.05033565, -0.015398467, 0.05938774, -0.016760394, 0.029363422, -0.017430363, -0.008699672, -0.25367033, 0.022783596, 0.110641606, 0.10141755, -0.00016630087, -0.056500778, 0.034471113, 0.048835617, -0.12681866, -0.066502094, 0.045231722, -0.18065335, -0.22604083, -0.015175392, -0.06705871, 0.013665012, 0.011599169, 0.10298516, -0.11681691, 0.28435248, -0.04857649, -0.1419388, -0.06777054, 0.1149232, 0.016193617, 0.01656518, 0.00804806, -0.040175382, -0.1961025, -0.03625783, -0.013200276, 0.12195545, 0.07614155, 0.10474353, -0.08272894, -0.026889844, 0.14175323, 0.14168878, -0.26817453, -0.14453053, -0.13414605, -0.06651428, 0.016334692, 0.082774915, 0.014306233, -0.12926893, -0.116443306, 0.22326875, 0.3580542, -0.12648714, 0.112027295, -0.16956696, 0.19763929, -0.26482219, 0.17115614, 0.04316381, 0.054443434, -0.3106718, 0.11771501, 0.23658161, 0.033981435, 0.34621492, -0.3847724, 0.12750502, 0.2107391, -0.2329123, -0.18474722, -0.40957716, 0.0085536055, -0.19541273, 0.09755964, -0.16319473, -0.056064744, -0.011080576, 0.079925075, -0.08443876, 0.20467456, -0.22445829, 0.2599498, 0.25293478, -0.1185785, 0.21504414, -0.3095964, 0.15370017, -0.15602782, 0.07808888, -0.15107022, -0.03224325, 0.06798876, -0.058822997, 0.030666512, -0.010540478, -0.13901918, 0.07177421, 0.17992255, -0.04258061, -0.19868083, 0.28559804, 0.09805323, 0.09703619, 0.07020872, 0.06822598, 0.12779307, 0.22630809, -0.16089886, 0.29453892, 0.017614828, -0.2248953, -0.010998022, -0.31585214, 0.16753606, 0.2610688, -0.056440964, 0.24624962, -0.20295781, -0.17000961, -0.08380444, -0.29134277, 0.15723288, 0.046906173, 0.1004941, -0.086202025, 0.19293989, 0.12799801, 0.07168447, 0.0015275516, 0.12535731, -0.09231649, -0.20546839, 0.1368647, -0.02690137, -0.008778634, -0.043878995, 0.08780535, -0.046321027], "bias": [0.15684557, -0.028253535, 0.04340603, 0.009737987]}, "conv2d_3_tf": {"name": "conv2d_3_tf", "type": "conv", "inputs": ["conv2d_2_tf"], "output": "conv2d_3_tf", "weights": [0.08110378, -0.0167192, -0.052800585, 0.03101248, -0.0200815, -0.14150716, 0.16980621, -0.15210816, -0.08074786, -0.07475146, 0.115350194, -0.0036901226, -0.117634565, -0.19439846, -0.11759383, 0.23502965, -0.08461348, 0.13892823, -0.06326588, -0.0012297074, 0.15518166, 0.21625187, -0.12818813, 0.07125895, -0.18874602, -0.08046852, -0.31893313, -0.48625693, -0.11701834, 0.14305845, -0.06545941, 0.009551703, -0.013344673, -0.12126489, -0.016501574, -0.16214086, 0.0069537126, -0.176876, 0.1570584, -0.08085073, -0.16929092, 0.056719832, -0.13355424, -0.084494695, 0.010385584, -0.04052164, -0.05259485, -0.00054041675, -0.106803305, 0.007429931, -0.04642919, -0.21932948, 0.09330674, -0.093727104, -0.13452266, 0.35055456, -0.23152934, -0.39173022, 0.15664841, -0.08393049, 0.05625897, -0.035436444, -0.15130311, -0.1395724, 0.124293104, 0.18409966, -0.11573077, 0.089100696, 0.1444364, 0.50853324, -0.0095960945, 0.3167473, 0.70936894, 0.31308156, 0.26786005, 0.12160492, -0.22704235, 0.30838796, 0.021611245, -0.1314941, -0.14330123, -0.22278316, -0.03795726, -0.17500246, 0.18139891, -0.19904222, -0.022736387, 0.08908508, 0.43189391, 0.15949173, -0.04945459, 0.15970747, -0.07230371, -0.15298025, 0.009584154, -0.23360626, 0.052694026, -0.05049137, -0.1383393, 0.11149106, -0.10110927, 0.20538872, 0.15514328, -0.16502619, -0.053637415, -0.12321965, 0.2662799, 0.0051624347, 0.098109104, 0.10768976, -0.22784568, 0.13209504, 0.008199458, -0.081371814, 0.03606598, 0.14785449, -0.28495064, 0.2584799, 0.0007494249, -0.50056446, 0.33870435, 0.25779712, -0.03054843, 0.22610615, -0.27559558, -0.11128982, -0.012728223, -0.18573038, 0.060110338, -0.09690658, 0.09593368, -0.022227092, 0.1268108, -0.032526143, -0.0052941497, 0.18126796, 0.20892163, 0.04680569, -0.20077993, 0.11723587, -0.07495806, 0.029730473, -0.04341291, -0.12832776, -0.03857927, 0.05411956, -0.33965963, 0.063905895, 0.02378697, 0.0681384, -0.016522638, 0.081831, 0.14231712, 0.123573765, -0.11197606, 0.022007719, 0.25169036, 0.13163973, -0.38438284, 0.115584046, 0.299692, -0.113115326, 0.16491714, -0.04810855, -0.12854144, -0.2268635, 0.051220372, -0.19050607, 0.20524663, 0.26196462, 0.26784754, 0.24459374, -0.041007493, -0.15827829, 0.03751936, -0.0027342795, 0.1978786, 0.11505169, 0.09922884, 0.10659087, 0.024080487, 0.10524709, -0.08987373, 0.11877598, 0.15799685, -0.10497645, 0.008811035, -0.009986678, 0.01387176, 0.12635326, 0.20862126, 0.12648703, 0.16220981, -0.033359095, -0.0153780505, 0.07004559, 0.07670019, 0.21048827, -0.1682042, 0.041799467, 0.114568, 0.2827947, -0.2358813, 0.112023346, -0.16518869, 0.3607493, -0.01624971, 0.16955264, 0.12882522, -0.12503988, 0.14995539, -0.49053642, -0.091627434, -0.41933334, -0.03831309, -0.117856495, -0.47509915, 0.23506865, 0.079487, 0.23074882, -0.08374827, 0.14932871, -0.058848724, -0.24341418, -0.14489996, 0.09887637, 0.06605905, -0.15220052, -0.120792374, 0.23410796, 0.032493018, 0.056553863, -0.24996756, -0.07639836, 0.0232395, -0.09652701, -0.03002805, 0.050476708, 0.07193504, 0.11683747, -0.0058939746, -0.09493401, 0.076543495, 0.13393587, 0.017776897, 0.020909293, -0.1794159, -0.040205512, 0.047374327, 0.022355627, -0.121918514, 0.035227664, -0.2679447, -0.16856398, -0.1886006, -0.16039622, 0.24283677, 0.32498962, 0.05810684, 0.31605107, -0.21426445, -0.14002769, 0.14375956, -0.19747485, -0.16602254, -0.20801187, 0.08768805, -0.2776923, 0.009399019, -0.17496416, -0.290936, 0.115208045, -0.041293893, -0.0651558, -0.03753366, 0.033722922, -0.04545539, 0.016271383, -0.008835475, 0.0015780868, -0.12184039, -0.033606283, 0.1662686, -0.07920288, -0.034950536, -0.09539387, 0.12623376, -0.082155704], "bias": [0.064105734, 0.08716897, 0.10564136, -0.055283435]}, "conv2d_4_tf": {"name": "conv2d_4_tf", "type": "conv", "inputs": ["conv2d_3_tf"], "output": "conv2d_4_tf", "weights": [-0.1598122, 0.21306475, -0.025170112, 0.0064973626, -0.0040386054, -0.018063357, -0.014915061, 0.023607424, -0.20982668, -0.029529253, 0.001744459, 0.060086526, -0.061658174, -0.115150034, -0.049836617, -0.075447455, 0.15341176, 0.2077175, 0.057210345, 0.14822371, -0.034174822, -0.06858962, -0.08222855, 0.06431011, -0.44409496, -0.121558376, -0.3858283, -0.3362955, -0.4016457, 0.07244281, -0.417595, -0.21818341, -0.05531808, -0.02010583, -0.07585426, 0.024485847, 0.02847285, 0.01543007, 0.17664663, 0.0780659, -0.13275865, 0.09497275, 0.040728047, -0.23864512, -0.1548492, 0.12780112, -0.24754933, -0.23368622, 0.14364702, 0.5448055, 0.386805, -0.21051708, -0.24149047, -0.10845729, 0.15071525, -0.0058477055, 0.055677447, -0.005850183, -0.073896885, 0.09241234, -0.26862472, 0.5054357, 0.114015214, 0.1836328, 0.25270563, 0.67129123, -0.52748364, 0.26303798, -0.043505583, 0.032671597, -0.05111456, 0.12108323, 0.29900667, 0.1286415, 0.028665777, -0.21042022, 0.07378244, -0.17607069, -0.1152363, -0.35226378, -0.33433285, -0.1385949, -0.2783315, -0.43740904, -0.16138744, -0.0621373, -0.14131115, 0.16966353, -0.073161066, 0.22579035, 0.045622952, -0.1578812, 0.55355525, 0.16940117, 0.5628059, 0.6008582, -0.10386568, -0.0052689794, 0.023254815, -0.044129103, -0.12433769, 0.044830017, -0.2193367, -0.091017105, -0.40861627, 0.09017799, 0.22204089, -0.017926738, 0.056895338, 0.009060228, -0.15774739, 0.0040100673, 0.34335652, 0.13392006, 0.16273153, -0.019711446, 0.14928798, 0.030849062, -0.2510253, -0.022520343, -0.11473251, -0.09289514, 0.2843751, -0.4983467, 0.020203933, -0.42779848, 0.16908686, -0.3076361, 0.033630483, 0.056546945, -0.04666513, 0.014747518, 0.16372634, -0.053588495, 0.14539687, 0.16948904, 0.40704802, 0.23186202, 0.17865482, -0.110491835, -0.14014529, 0.19542813, -0.005899948, -0.0995246, 0.2389414, -0.082455106, 0.08700005, 0.028712636, -0.36086267, 0.04287671, -0.14006224, 0.17894393, -0.005451369, 0.028053885, -0.023525458, 0.055561885, 0.15468796, 0.02403359, -0.050548952, 0.038594317, 0.28251657, -0.11581353, 0.16342154, 0.06044091, 0.12542216, -0.044592988, 0.051525116, 0.41159365, -0.17521508, 0.053627472, -0.20983936, -0.12996447, 0.08439798, 0.008631584, -0.08363641, 0.059050053, -0.08850453, -0.024748828, 0.017210012, -0.031767968, -0.52938837, 0.17848137, -0.27413097, -0.2068892, 0.047405057, 0.00081454025, 0.02349727, 0.0042111445, 0.13370459, -0.034860186, 0.14278005, 0.3497005, -0.22266275, -0.05642017, -0.112472326, -0.17310132, -0.16356754, -0.45152155, -0.4895544, 0.23206581, 0.12887485, -0.14014244, 0.35742265, 0.082959004, 0.12671785, -0.21256709, 0.25850493, 0.009120755, -0.12273008, -0.30924377, 0.5265373, -0.02098678, 0.1029469, 0.18627657, 0.23864165, 0.021312231, -0.01296249, -0.26165387, -0.2542568, 0.094496064, 0.014488813, -0.058059838, -0.3033406, -0.017388495, 0.13375956, 0.09680272, -0.052011438, 0.090599395, 0.15185082, -0.11640461, -0.23126537, 0.090506785, 0.24264868, -0.065805264, -0.21834786, -0.0045276107, -0.33338022, -0.07771771, 0.014490507, -0.42923886, 0.37784475, 0.052123647, -0.1248992, -0.11049203, -0.43846554, -0.17309345, 0.052097544, 0.057795536, -0.27356243, 0.027324762, 0.17017028, -0.006939284, -0.08434218, -0.12059198, 0.24616416, 0.087504596, 0.26637626, -0.1337361, -0.18089, -0.22973877, 0.2926445, 0.11886714, -0.11798015, -0.05380629, 0.11048856, -0.0778672, -0.29690808, 0.08253439, 0.3127822, 0.12253063, -0.23173955, -0.14380191, 0.01039713, 0.03493661, 0.06576741, -0.084102914, -0.23178917, -0.15740506, -0.2270629, 0.22222051, 0.3404708, 0.06097898, 0.11453548, -0.31320468, 0.08092818, -0.035511125, 0.12131498, 0.16709867], "bias": [-0.076647505, 0.08073172, -0.059488703, 0.17173311]}, "conv2d_5_tf": {"name": "conv2d_5_tf", "type": "conv", "inputs": ["conv2d_4_tf"], "output": "conv2d_5_tf", "weights": [-0.12773429, -0.031222861, 0.025735874, -0.062096417, -0.0699462, 0.03104822, -0.122303784, -0.09765575, 0.09609079, 0.005582036, 0.058315173, -0.035801604, 0.123248786, -0.104321666, 0.056262534, 0.024966465, -0.0057961293, -0.06281776, 0.04020634, 0.068618834, 0.17063664, -0.047059927, 0.21686994, 0.034598563, -0.08227179, -0.09367863, -0.20445694, -0.0931567, 0.1262296, -0.07587655, -0.041704163, 0.08003125, -0.07023064, -0.062065583, 0.12443551, -0.035465624, 0.013221707, -0.032532513, -0.056925, 0.024944607, -0.12387186, -0.22119465, -0.049702164, 0.11415566, 0.079954885, 0.09549618, 0.00011933643, -0.07652726, -0.095089525, 0.14626698, 0.27363792, -0.042087212, -0.018778356, 0.11161227, -0.32541263, 0.03188208, -0.06275591, -0.2500858, 0.37373486, -0.12545922, 0.022838576, 0.16692348, -0.17622371, 0.1591403, -0.14521024, 0.34913903, -0.1608894, 0.120632924, 0.68379533, -0.15624362, -0.6933828, 0.6345509, -0.4358753, -0.25579333, 0.38130885, -0.3612577, 0.14929971, -0.3353409, -0.19956423, -0.16761, -0.08563838, 0.10034349, 0.40581712, -0.01674007, 0.077260956, -0.012577383, -0.41468084, 0.031816468, -0.2399563, -0.1595638, 0.22213463, 0.8598436, 0.12936053, -0.123269774, -0.06326122, -0.3076892, 0.03034998, 0.050539415, 0.20472047, -0.0556702, -0.085800156, -0.06870804, 0.049144283, -0.08892451, 0.12340523, 0.10613051, 0.0149079105, 0.07518214, -0.26013598, 0.04589169, 0.19190422, 0.15137987, 0.09706032, -0.17066817, -0.11620896, 0.022257369, 0.47305605, -0.07059574, -0.15890422, 0.6320758, 0.109349206, 0.06890607, -0.09387597, -0.46179014, 0.13774204, -0.041401643, -0.037044708, 0.12379395, -0.051298592, 0.012750388, 0.10875692, -0.05967528, 0.10088652, -0.40571722, 0.18971854, -0.24539576, -0.3825106, 0.008654188, 0.07715846, 0.28964898, 0.066138685, -0.00080732966, 0.040520288, -0.15779981, 0.0825736, -0.29615963, -0.47617617, 0.31756508, 0.06880992, 0.105293304, 0.04906714, -0.05858499, -0.08284609, 0.017182024, 0.21042508, -0.07028825, 0.08384749, -0.21589063, -0.13177407, 0.095195554, 0.02297133, -0.39289168, -0.25799274, 0.10975223, 0.14140548, -0.20849659, 0.04759558, -0.008546609, -0.10889733, -0.14610597, 0.13098536, -0.13077322, 0.13789141, 0.3462128, -0.12772405, 0.26967224, 0.35149145, -0.21153429, -0.5693587, 0.108247586, -0.16848314, 0.075048186, -0.2745529, 0.112181306, -0.052565876, -0.023494598, 0.07528667, 0.04387266, 0.012658622, -0.37138432, 0.1281914, 0.00046957587, 0.09401129, 0.25289086, 0.55048674, 0.08075165, 0.121126935, -0.0033569427, 0.08089757, 0.21594091, 0.18725191, 0.30701655, -0.1590015, -0.010082892, 0.21047278, 0.5394563, 0.47593778, -0.032119274, 0.37147695, -0.37555677, 0.62841827, -0.07431199, -0.29146922, -0.40450788, 0.35065868, -0.434333, 0.45959905, 0.10397242, -0.027563395, -0.31509194, -0.09736915, 0.04074563, 0.44896963, 0.28670806, 0.3888352, -0.24728929, -0.12476968, -0.08905847, 0.33668944, 0.17609842, -0.23971717, 0.0060826214, -0.4655161, 0.13450272, 0.32908657, -0.07225912, 0.2169386, -0.0725652, 0.10453283, -0.088632435, -0.13810714, -0.3050837, -0.63974214, 0.18239835, 0.1929092, -0.093423374, -0.2822392, 0.22142173, -0.08018815, -0.13466772, -0.31972283, 0.116478145, 0.19095601, -0.48922217, -0.5578351, 0.355463, 0.36167753, -0.15497409, -0.43211254, 0.32367635, -0.19982333, -0.0630767, 0.01567552, -0.21779867, 0.046131164, 0.092667475, 0.13255084, -0.14787321, 0.12663253, -0.41330644, 0.25875497, -0.0062085786, 0.01678195, -0.22261462, 0.11094035, -0.1657027, 0.09254188, -0.09523376, -0.6323229, 0.16596538, -0.058406986, 0.026134185, 0.22998697, 0.067646734, 0.044489175, -0.22890534, -0.086280994, -0.11049718], "bias": [-0.004863463, -0.043915283, -0.19484672, 0.12677252]}, "conv2d_6_tf": {"name": "conv2d_6_tf", "type": "conv", "inputs": ["conv2d_5_tf"], "output": "conv2d_6_tf", "weights": [-0.066926755, -0.103378884, -0.1253788, 0.05884506, -0.01911811, -0.11779993, -0.030739171, 0.13323332, 0.03596915, -0.13894027, -0.041181393, 0.15500793, -0.03982033, -0.05108186, 0.12834665, -0.007960466, 0.10669239, -0.12279223, -0.13919982, -0.15405509, 0.1305062, 0.100640036, -0.34516367, 0.32141054, 0.07484296, 0.2833889, -0.20306365, 0.3919221, -0.5247645, -0.31412095, -0.13806108, -0.13342234, -0.15124469, -0.11747695, -0.08621477, -0.0065042623, 0.7227566, -0.11768305, -0.06759335, 0.34659123, 0.21980159, -0.061635103, 0.00042216454, -0.044416543, -0.18327245, -0.028776366, -0.0055986694, -0.049163632, 0.05135294, 0.07964238, -0.00330635, -0.2152686, -0.018970031, -0.04942663, -0.22667323, -0.042205848, 0.039453145, -0.050103545, 0.13375999, -0.18811707, 0.14390434, 0.027615514, 0.05709427, 0.05752984, -0.5051138, -0.26409164, -0.15425378, -0.66951543, 0.17625315, 0.48022023, -0.19252352, 0.0043416517, 0.056236565, 0.32243112, 0.7946876, 0.015003509, 0.17414112, -0.114543706, -0.10779704, 0.082222536, -0.38728875, -0.08986606, -0.049947318, -0.27644014, -0.8225291, -0.39131454, -0.459008, -0.9930907, -0.12627846, -0.054534476, 0.3940249, 0.2505263, 0.13452612, 0.03460093, -0.07459207, -0.039021235, -0.04868996, -0.10235829, -0.03467251, 0.1075939, -0.26020733, -0.10697435, -0.061846778, -0.3059227, 0.10885676, 0.08809459, 0.08911471, 0.13473813, -0.020144481, 0.08357566, 0.06756563, -0.016831836, 0.27809432, 0.010824109, -0.18756819, 0.11398418, -0.21666546, 0.098384276, 0.2975434, -0.0020767483, 0.079884626, 0.036110703, -0.18543157, 0.0010193929, -0.061911505, 0.13594154, 0.17103043, -0.06879687, 0.2798294, 0.038601764, 0.09637811, 0.23477426, 0.0076462408, -0.14501692, 0.062029935, 0.01976714, 0.1567059, 0.048765305, -0.015226277, 0.043793716, -0.076550275, 0.060083106, 0.14394821, 0.017193556, 0.015513908, -0.13487175, -0.040039863, 0.11021341, -0.05785185, -0.0033880004, 0.08333027, -0.092727445, 0.01884936, 0.014747866, 0.009049213, -0.007268711, 0.3192351, 0.2186278, 0.2854171, 0.02457388, 0.43706077, 0.31797218, 0.12917022, -0.014583852, -0.07154381, -0.08356874, -0.005788909, 0.14801258, 0.07885089, 0.24817602, 0.06428954, -0.06237103, -0.8699891, 0.024048591, -0.7987979, 0.12811072, 0.013232146, 0.013316505, -0.067415215, 0.034422603, 0.08133233, 0.08787058, 0.026598653, -0.10148331, -0.050544698, -0.14102747, -0.14119765, -0.13445714, 0.5950412, 0.20444492, 0.13798125, 0.035331406, -0.45546192, -0.5513184, -0.4068848, -0.23748143, 0.24419254, 0.1778497, 0.20502964, 0.16109002, -2.9782914e-05, -0.0085999705, -0.027671363, 0.105777435, 0.14129832, 0.31863338, 0.19858609, 0.055741936, 0.4097266, 0.27047816, 0.2850115, 0.056223825, -0.12459045, -0.3790419, 0.05674847, 0.21234466, -0.1475592, 0.29852328, -0.11911643, 0.121808626, 0.1621056, -0.18959267, -0.17864472, -0.42096725, 0.05854804, 0.02684019, -0.2628492, 0.002249103, 0.52862763, 0.13250318, 0.088373385, 0.29241452, -0.15554868, -0.123011805, -0.18078153, -0.08868784, -0.20304836, 0.07052606, 0.2747264, 0.2755977, 0.05502299, 0.072810456, 0.03944805, -0.08644959, 0.121844985, 0.013343667, 0.027260037, 0.23615573, -0.024427306, -0.045917016, -0.05044972, -0.04340206, -0.0366489, 0.04488827, 0.06898134, 0.07339352, -0.09890785, -0.06540698, 0.08009758, -0.044062782, -0.05034573, -0.19514501, -0.2062692, -0.21178126, 0.077644, 0.121198535, 0.13322602, 0.09274964, -0.06762868, -0.12820582, -0.22516684, -0.0601748, -0.17143212, -0.04438599, -0.1310994, -0.1920144, -0.23798935, 0.08665577, 0.11335314, -0.12244037, -0.060818415, -0.06535563, -0.08130813, -0.077197745, 0.04674743, 0.00036820097, -0.09421891, -0.05234622], "bias": [0.11841924, -0.13710557, 0.029517207, -0.106169395]}, "conv2d_7_tf": {"name": "conv2d_7_tf", "type": "conv", "inputs": ["conv2d_tf", "conv2d_1_tf", "conv2d_2_tf", "conv2d_3_tf", "conv2d_4_tf", "conv2d_5_tf", "conv2d_6_tf"], "output": "conv2d_7_tf", "weights": [0.054950725, 0.07103498, -0.016051343, 0.027749274, 0.025204666, 0.01045536, 0.0042160735, -0.024225423, -0.018579733, 0.0026162276, -0.02857185, -0.005210569, -0.039352335, -0.088067934, -0.048476845, -0.08346487, -0.013545614, -0.016991466, -0.008739407, -0.016506022, 0.020216973, 0.04934583, 0.024072357, 0.06810683, -0.04549515, 0.061809313, 0.03045242, 0.020986201, -0.048511624, -0.010428809, 0.016026076, -0.030956982, -0.09900522, -0.07085778, -0.06831026, -0.06906526, -0.009534016, 0.004262913, -0.006554254, 0.002840796, -0.01953525, -0.024325045, -0.007165033, -0.011314177, -0.07489293, -0.055470522, 0.16199836, 0.036676586, 0.048781663, 0.06562282, 0.04015212, 0.053361014, -0.016801007, -0.0377938, -0.008406626, -0.011751621, -0.014344206, 0.022161873, -0.02885451, -0.003658599, -0.056833196, -0.078346126, 0.0063886694, -0.03087761, -0.017802022, -0.00325957, -0.03242753, 0.003964903, 0.07422821, -0.0371481, 0.11048416, -0.0106017245, 0.13719736, -0.03430836, 0.028495925, -0.021163112, 0.06023549, 0.0047271634, 0.04977749, 0.0023630378, -0.010151751, 0.2154516, -0.05911266, 0.14515018, -0.023591345, -0.02699257, -0.036971506, -0.021010756, 0.069655746, -0.0099680545, -0.009880194, -0.070207775, -0.05284564, 0.013814611, -0.16404593, -0.1416106, -0.04778168, 0.028449936, -0.08558072, 0.08866765, -0.03938249, 0.05220149, -0.041012198, 0.038495522, 0.0086511215, -0.0082734525, -0.0147725055, -0.046040513, 0.11998033, -0.059152976, 0.042258155, -0.09964051, -0.0140976785, 0.02207049, 0.0002059802, 0.11529764, -0.090038806, -0.20041479, 0.12085815, 0.1694582, -0.037448097, -0.037172716, -0.0050130314, 0.024008432, -0.060084946, 0.013029849, -0.036050923, 0.05052607, 0.03159619, -0.021548677, 0.014552227, -0.02965435, -0.013455017, 0.062329344, 0.032566868, -0.006644445, 0.021567278, -0.014811177, 0.013295692, -0.010351184, -0.01841816, 0.016973348, 0.025317525, 0.009899903, -0.022683432, 0.011808694, 0.0028045438, 0.029234663, 0.02767238, 0.12709504, 0.01411062, -0.009979088, 0.0035191092, -0.0031182838, -0.015574355, -0.027494937, 0.008440316, -0.013941062, -0.016768042, -0.01870847, 0.017501723, -0.022576338, -0.043333586, 0.062431645, -0.029340237, -0.078882374, 0.056420166, 0.076183915, 0.048331965, 0.10057497, -0.083568305, -0.085852996, -0.010797674, -0.021847311, -0.01239366, -0.04154552, 0.06182476, -0.010869692, 0.0356985, 0.061232526, 0.058532115, 0.010209528, -0.009041787, -0.0720452, -0.07196013, -0.017323138, 0.04495275, 0.029191252, 0.06700517, 0.15220341, -0.07767867, -0.03221082, -0.03635462, -0.0334757, 0.13433172, -0.056404594, -0.06472732, -0.11509622, 0.124772556, 0.07272107, -0.15707767, 0.028852865, -0.018426904, 0.17510289, 0.13555387, -0.088297494, 0.037248716, 0.00794865, 0.071962185, 0.0096231215, -0.051141426, 0.014894458, -0.10324847, -0.018464657, 0.0126606915, 0.05395823, 0.08581119, 0.011021675, -0.027419826, -0.07254084, -0.06124376, -0.01642273, 0.07605218, -0.057074253], "bias": [0.06085507, 0.04841306, 0.008566997, 0.035288297]}, "conv2d_7_tf1": {"name": "conv2d_7_tf1", "type": "conv", "inputs": ["conv2d_tf", "conv2d_1_tf", "conv2d_2_tf", "conv2d_3_tf", "conv2d_4_tf", "conv2d_5_tf", "conv2d_6_tf"], "output": "conv2d_7_tf1", "weights": [0.041083798, 0.11273787, -0.039664973, 0.06302232, 0.07333823, 0.0075632306, 0.076995976, -0.0108795455, -0.04315463, 0.03282546, -0.05020302, 0.026023509, 0.064418, 0.02510018, 0.024639782, 0.0029637075, 0.031111369, -0.017847873, 0.03130805, -0.021845637, -0.039667085, 0.020108245, -0.040791806, 0.03700692, -0.009884046, 0.022881199, 0.06999735, -0.015826307, -0.12564376, -0.14878725, -0.021848716, -0.13192935, -0.09151973, -0.06597794, -0.072450355, -0.06693897, -0.011552232, -0.018777842, 0.0051342268, -0.010323703, -0.02576072, -0.019258346, -0.011607981, -0.005021387, -0.102882005, -0.093620755, 0.13991731, 0.005087157, 0.037210308, 0.014074353, 0.046510138, 0.012851782, -0.028145058, -0.025680618, -0.032508638, -0.008202794, 0.0036951879, 0.034135576, -0.017547814, 0.0015228102, 0.0021079618, -0.030263167, 0.057801064, 0.010340715, -0.024805449, -0.006818843, -0.032319054, 0.0047564465, 0.1147804, -0.055226665, 0.139095, -0.03753787, 0.14894636, -0.03546638, 0.03248561, -0.030713532, 0.060425024, 0.0033520802, 0.05058482, 0.0027428854, -0.03615222, 0.19884737, -0.08633198, 0.12778597, -0.053056035, -0.0063468334, -0.066497125, -0.00235064, 0.06450723, -0.0031007733, -0.011219558, -0.058710214, -0.051068407, -0.011583915, -0.15858279, -0.16355976, -0.04033487, 0.005653939, -0.07839223, 0.06611192, -0.05340592, 0.058907256, -0.047791485, 0.050725352, 0.027576568, 0.007983673, 0.017171, -0.021309456, 0.11154662, -0.08021143, 0.04446095, -0.115186416, -0.008570288, 0.049202953, -0.0012333186, 0.13587798, -0.076208696, -0.20653462, 0.13196656, 0.1578916, -0.040440585, -0.044852726, -0.015931394, 0.010937038, -0.060105585, 0.01565017, -0.041020233, 0.050664853, 0.03566675, -0.011882536, 0.01859861, -0.020633994, -0.024164295, 0.07378749, 0.01918346, 0.0049740733, 0.023937816, -0.02099486, 0.014417706, -0.018249528, -0.022408593, 0.018429874, 0.02628281, 0.016986324, -0.035201065, -0.00050342904, -0.010758721, 0.016824322, 0.042686496, 0.12750758, 0.031496264, -0.011275541, -0.0046530254, 0.0014304466, -0.021216383, -0.020999145, 0.014917319, -0.0034316303, -0.01863704, -0.015423642, 0.01520756, -0.026060067, -0.039936088, 0.06486168, -0.03251415, -0.081864364, 0.057649333, 0.07559426, 0.051602952, 0.09688368, -0.08073399, -0.09000777, -0.01097453, -0.022727443, -0.012805701, -0.04297951, 0.060098216, -0.007935256, 0.030599488, 0.062625825, 0.06013116, 0.010512932, -0.010517298, -0.07444667, -0.07903826, -0.019573744, 0.038119502, 0.026559109, 0.055372935, 0.15262817, -0.09275375, -0.034178592, -0.041339573, -0.033381965, 0.1342532, -0.05399531, -0.059000198, -0.11794929, 0.13036595, 0.07077665, -0.16195193, 0.020004272, -0.018667948, 0.17074339, 0.12714846, -0.0917213, 0.02596967, 0.004947743, 0.07157071, 0.009486327, -0.05360497, 0.01438074, -0.11297298, -0.021359574, 0.0051596886, 0.052319784, 0.09323825, 0.015043655, -0.020785524, -0.06919517, -0.054892845, -0.014707806, 0.08213831, -0.05759576], "bias": [0.009616106, -0.009513385, -0.03294652, -0.012787145]}, "conv2d_7_tf2": {"name": "conv2d_7_tf2", "type": "conv", "inputs": ["conv2d_tf", "conv2d_1_tf", "conv2d_2_tf", "conv2d_3_tf", "conv2d_4_tf", "conv2d_5_tf", "conv2d_6_tf"], "output": "conv2d_7_tf2", "weights": [0.0576849, 0.06587477, -0.022743374, 0.011566256, 0.008215283, 0.0019401816, 0.021441568, 0.0014925447, -0.028634049, 0.0011387578, -0.026619708, 0.006305017, -0.030966898, 0.0045729997, -0.022528537, 0.029398756, -0.011790272, 0.0071467054, -0.0026765561, 0.012733051, 0.023166908, 0.02897596, 0.005242297, 0.026157873, -0.044612665, 0.039906777, 0.022625456, -0.0101679675, -0.04990111, -0.07584878, 0.017350169, -0.09634242, -0.07954949, -0.04172199, -0.057556935, -0.048540115, -0.020093828, -0.0075067617, -0.00020187924, 0.00797722, -0.01987952, -0.025659842, -0.005328067, -0.010927285, -0.07702538, -0.082060955, 0.1457324, -0.003361099, 0.03283853, 0.023584282, 0.028486133, 0.01478993, -0.0055776997, -0.026165819, -0.010754983, -0.013004967, -0.0074576642, 0.036390945, -0.026886474, 0.007709724, -0.05138353, -0.05065551, 0.022502908, 0.0067416504, -0.025170134, -0.008326, -0.03097216, 0.0076901433, 0.086824186, -0.02550225, 0.10888732, -0.015369899, 0.13872114, -0.036151096, 0.021277541, -0.031634226, 0.057487074, -0.0008604128, 0.042267755, -0.0076225856, -0.0043742964, 0.20059362, -0.06779307, 0.116844766, -0.026545724, -0.02368529, -0.035149954, -0.012683659, 0.065201335, -0.006531349, -0.005791962, -0.058462474, -0.050280467, 0.012001662, -0.16014497, -0.141929, -0.04881068, 0.024294844, -0.08731185, 0.084202476, -0.04550918, 0.040261142, -0.03968508, 0.033399694, -0.0031645314, -0.0056782835, -0.002978733, -0.019225113, 0.120801345, -0.07820378, 0.04000722, -0.12024831, -0.0143392375, 0.029743152, -0.0030747086, 0.1193423, -0.08472938, -0.195887, 0.116628096, 0.16650417, -0.031467367, -0.035450865, -0.0126468865, 0.010538742, -0.060293857, 0.01807559, -0.037559878, 0.05385276, 0.027880315, -0.018090995, 0.015092008, -0.022017071, -0.009351254, 0.06704274, 0.031548847, -0.0072418377, 0.019735962, -0.018066967, 0.011124518, -0.01362766, -0.019445876, 0.016562376, 0.02813459, 0.013151808, -0.017798623, 0.008788734, -0.0019421759, 0.01658437, 0.028117137, 0.12526438, 0.017812258, -0.0068307687, 0.00074484444, -0.006139307, -0.014916385, -0.027615016, 0.009725377, -0.00906895, -0.023317039, -0.021562481, 0.0129997125, -0.026376538, -0.042010427, 0.06418159, -0.032584056, -0.08116887, 0.056026552, 0.07767531, 0.049831558, 0.10399884, -0.08242538, -0.08250583, -0.010175286, -0.021061037, -0.011253055, -0.04026304, 0.063677974, -0.011705014, 0.030985428, 0.053840622, 0.059602093, 0.013573924, -0.008277695, -0.0690056, -0.07084035, -0.019220846, 0.043495614, 0.024889778, 0.06451656, 0.14733416, -0.07778903, -0.0352032, -0.03822006, -0.03639456, 0.1331558, -0.05770353, -0.06343046, -0.10964531, 0.12685703, 0.07825246, -0.15626778, 0.02311482, -0.016088817, 0.17054014, 0.13759498, -0.086443946, 0.038465805, 0.008140121, 0.07049776, 0.0077296733, -0.052382868, 0.01251425, -0.104969874, -0.024132617, 0.010683279, 0.048367165, 0.086586386, 0.018196408, -0.025295636, -0.0636029, -0.058419954, -0.013113749, 0.077652246, -0.054643534], "bias": [0.06201585, 0.005873136, -0.0057400805, -0.024083143]}, "pixel_shuffle": {"name": "pixel_shuffle", "type": "pixel_shuffle", "inputs": ["conv2d_7_tf", "conv2d_7_tf1", "conv2d_7_tf2"], "output": "canvas"}}} -------------------------------------------------------------------------------- /src/weights/cnn-2x-m-rl.json: -------------------------------------------------------------------------------- 1 | {"name": "anime4k/cnn-2x-m", "layers": {"conv2d_tf": {"name": "conv2d_tf", "type": "conv", "inputs": ["input_image"], "output": "conv2d_tf", "weights": [-0.43700448, -0.12383181, -0.39803663, 0.52009004, -0.42380998, 0.07342348, -0.10417725, -0.1929202, -0.20059313, 0.08596013, -0.036150236, 0.1943204, 0.0, 0.0, 0.0, 0.0, 0.5285974, -0.14970095, 0.21255529, 0.36134776, -0.0778857, 0.061038077, 0.24571013, -0.06840865, 0.06106429, -0.06369855, 0.17126374, -0.025089366, 0.0, 0.0, 0.0, 0.0, -0.0073111467, 0.15535195, -0.089282654, -0.165693, -0.13300648, -0.0011212918, 0.15022895, 0.20636183, 0.09242716, -0.026319012, -0.21280405, -0.024262758, 0.0, 0.0, 0.0, 0.0, 0.1622117, -0.07452305, 0.27938735, 0.14650205, 0.18462916, 0.1800196, -0.23781396, -0.31704575, 0.17726475, -0.07114437, -0.091533884, -0.14328986, 0.0, 0.0, 0.0, 0.0, -0.42393574, -0.15274704, 0.32710415, -0.6862922, 0.4688005, -0.6634383, 0.66417086, 0.1555097, -0.02981386, -0.2933985, 0.33087853, 0.11909872, 0.0, 0.0, 0.0, 0.0, 0.33267993, -0.15994301, -0.26408252, -0.086990856, -0.22168767, 0.26116654, 0.22150806, 0.09417441, -0.0658948, 0.10053972, 0.27021578, -0.026661402, 0.0, 0.0, 0.0, 0.0, 0.16740121, 0.1931361, 0.20080176, 0.01869556, -0.11620115, -0.30608, -0.22552842, 0.0681357, 0.0069506024, 0.052228536, 0.24273908, -0.07155123, 0.0, 0.0, 0.0, 0.0, -0.18680367, 0.08907917, 0.13614553, 0.024371676, 0.14730337, -0.23263486, -0.33878776, -0.29022864, -0.14831644, 0.088786215, -0.21803996, -0.05703613, 0.0, 0.0, 0.0, 0.0, -0.14036681, 0.03581416, -0.11044763, -0.19030686, 0.1583473, 0.34034556, 0.097776145, 0.28929195, 0.10333786, 0.0068274974, -0.2546084, 0.011477104, 0.0, 0.0, 0.0, 0.0], "bias": [-0.049156994, 0.0032814543, -0.021223499, 0.04594601]}, "conv2d_1_tf": {"name": "conv2d_1_tf", "type": "conv", "inputs": ["conv2d_tf"], "output": "conv2d_1_tf", "weights": [-0.084388204, -0.03754589, -0.03338206, -0.022792505, -0.11356078, -0.076055825, -0.116272084, 0.009878847, 0.050765485, -0.016359871, -0.0662348, -0.029309144, -0.0333739, -0.036814813, -0.051065993, -0.12447015, 0.14584453, -0.043335147, -0.14875184, -0.2461169, 0.34755084, 0.15603498, 0.12930207, -0.25289717, -0.09891424, 0.18705226, 0.29315478, 0.17761377, 0.35723284, 0.058198802, -0.058125, -0.021009078, -0.111764, 0.09134145, 0.21115285, 0.100136325, -0.072855465, 0.15357259, 0.15194869, 0.0178175, 0.09330566, -0.098077565, 0.038239785, 0.059173394, -0.068434745, 0.045846846, -0.17534588, 0.07933592, -0.066422224, 0.022894884, -0.07700093, 0.08097129, -0.14496642, -0.14080046, 0.11690855, -0.0130255865, 0.08388152, -0.04426715, 0.07650244, -0.08116129, 0.053052384, 0.016861709, -0.07543915, -0.06905064, -0.21035792, -0.105432585, -0.0056535043, -0.23794414, 0.48689848, 0.31393805, 0.3530186, -0.19768368, -0.1997345, -0.26513356, -0.18177964, -0.039847106, -0.21796939, -0.21797366, -0.014920429, -0.03402468, 0.22454734, -0.2740147, 0.37796697, 0.4131328, 0.17031397, -0.2167817, -0.18882456, -0.06301378, 0.09259609, 0.14579444, -0.1731323, -0.2815266, -0.09086814, 0.22318031, 0.13372593, -0.0059168623, -0.041474655, 0.049808305, 0.070003934, 0.07624304, -0.20659865, 0.11079161, -0.14937906, 0.04126273, 0.08142401, -0.07068922, -0.020291204, -0.017090015, -0.025190167, -0.013943749, 0.049148437, -0.0019008453, 0.026148785, 0.2774172, 0.040490817, 0.08888442, -0.0321537, -0.010025804, 0.29734322, 0.059648763, -0.06863294, 0.02136135, 0.08915012, -0.1493992, -0.14656575, 0.07361045, -0.0784827, 0.20458257, 0.013372844, 0.2095454, 0.28334874, -0.17267562, 0.049244374, 0.09788063, -0.12814337, -0.18134497, -0.057618555, 0.17491128, -0.16961642, -0.10532874, -0.05132699, -0.11516367, 0.057307858, 0.3841081, -0.012563992, -0.005472043, 0.012879804, 0.048063014, -0.46123943, 0.23493885, 0.030362573, -0.16059463, -0.007925698, 0.084083386, -0.02318799, -0.0648104, -0.013350591, 0.080370896, -0.015556411, 0.109980844, -0.12998067, 0.069770575, 0.13883549, 0.21138588, -0.05804825, -0.21146816, 0.3263755, 0.21483842, 0.023421993, -0.20007822, -0.29615954, -0.15914749, -0.09120564, -0.120906316, 0.016582696, 0.081140004, 0.05719205, -0.11219546, -0.09251098, -0.047495708, -0.0054177176, -0.18277131, -0.19931898, -0.026179295, -0.259792, 0.12538151, 0.12978444, -0.084640495, 0.075031735, 0.038247548, -0.018510683, -0.13305412, -0.02436355, -0.018553583, 0.07399168, -0.051803768, -0.027177656, 0.19410136, -0.007979428, 0.03406536, 0.037885316, 0.04339598, -0.017780855, 0.1151958, -0.08222779, -0.05242254, 0.09643237, 0.10336347, 0.0150745055, -0.10105735, 0.15461528, 0.15281117, -0.31552103, -0.24329075, -0.044556107, -0.045301564, 0.47285315, 0.13444383, 0.05405222, -0.008511255, -0.102524556, 0.002268493, 0.0722259, -0.168346, -0.20540647, 0.09040869, 0.00019255982, -0.2921076, 0.06381097, 0.2187697, -0.0608732, 0.012592055, -0.12938985, -0.20120203, 0.34224886, 0.37817004, 0.039558195, -0.1321521, -0.09888887, -0.1906491, 0.04147559, -0.06910313, -0.05176795, 0.031068431, 0.055590235, -0.03208917, 0.09892438, -0.06430673, 0.018165385, 0.053841714, 0.08257774, -0.04322923, -0.012217829, -0.07262429, -0.107168674, 0.110926144, -0.13397086, -0.3242361, 0.10026566, 0.009784813, 0.19763845, 0.009405426, 0.058624502, -0.09740101, -0.018954588, 0.0767263, -0.26344782, 0.037190165, 0.0765283, -0.06433911, 0.22141442, -0.24261299, -0.015894216, -0.28825298, -0.003134411, 0.23196234, -0.16330358, 0.020231737, -0.15154487, 0.1086721, 0.0121897785, -0.106209636, 0.08828886, 0.046520505, 0.058174852, 0.07230595, 0.11071889, -0.3795686], "bias": [0.13109496, -0.02671028, -0.034360666, -0.07339995]}, "conv2d_2_tf": {"name": "conv2d_2_tf", "type": "conv", "inputs": ["conv2d_1_tf"], "output": "conv2d_2_tf", "weights": [0.012576159, -0.060603194, 0.120075166, 0.076167785, 0.06633842, 0.057194006, 0.21045816, 0.030789278, 0.037124068, 0.0154934935, -0.04395044, -0.043852463, -0.08203089, -0.018395502, 0.032990023, 0.013939446, -0.17417853, -0.11571764, 0.0099556865, 0.10882492, -0.089107014, -0.21107452, -0.18599737, 0.2831721, 0.119652666, -0.041459225, 0.23398484, 0.16476399, -0.091028936, -0.2910845, 0.35854244, -0.25638402, -0.050802834, -0.04426399, 0.09335325, 0.022672856, 0.010694536, -0.27827737, 0.04407378, 0.05938473, 0.09034758, -0.0040662987, -0.018781886, 0.12727347, 0.09579259, -0.11325574, 0.2152881, -0.18725425, 0.014548057, -0.18686645, 0.15684907, -0.014860359, -0.1518207, -0.16000909, 0.1033856, 0.2658142, -0.057411913, -0.22431459, -0.06587529, -0.002629145, 0.048948407, -0.31777516, 0.13389221, -0.1437628, 0.7002126, 0.10804444, 0.055103812, -0.18011257, 0.27313203, -0.07287623, -0.13867429, 0.1291268, 0.23272185, 0.0980952, 0.15435189, -0.31378776, -0.25984687, 0.18209897, -0.30752617, 0.26465765, 0.32070935, 0.04189516, -0.07647692, -0.267456, -0.27801126, 0.45699605, 0.11553631, -0.09225701, -0.31917462, 0.22718953, 0.25403437, -0.06704641, 0.17632844, -0.07283517, -0.12967058, -0.10888212, 0.009454983, -0.15098765, 0.16824934, 0.098822825, 0.06965013, -0.18653218, 0.03706922, 0.0109206345, 0.07805106, -0.049238846, -0.0022402809, -0.14681761, -0.00037889628, -0.044638712, 0.19019033, 0.110018164, 0.23812726, 0.0601034, 0.101746276, 0.057449948, -0.12146185, -0.004825965, -0.008424433, -0.09783165, -0.0713702, -0.064264, 0.1734856, -0.03409883, -0.05885751, -0.06327041, -0.16164137, 0.04696866, 0.15666702, 0.09812794, 0.107876845, -0.11455716, -0.10558951, 0.023486454, -0.07866171, 0.048626028, 0.050818343, -0.059466843, -0.22159679, 0.07845088, -0.16948934, 0.14414987, 0.021044968, -0.12825517, -0.008359017, -0.0038003458, -0.004042209, -0.05374133, 0.16541526, -0.03546213, 0.03071542, -0.04752427, -0.023318758, 0.2157596, 0.031492993, 0.10179054, 0.0316859, 0.15055068, -0.007722147, 0.043027394, 0.00834565, 0.041213654, -0.13293718, -0.13187261, -0.21087202, -0.011955092, 0.07593858, -0.07323282, 0.11431211, -0.077606566, -0.24711756, -0.10672656, 0.2568576, -0.071344815, -0.03788496, 0.21112178, -0.05880117, 0.06514541, -0.17081657, -0.031146793, -0.13333268, 0.18745597, -0.011584933, -0.08209905, -0.2144343, 0.18177573, 0.08115607, -0.21073082, -0.045749452, 0.14700018, -0.08082534, 0.1329145, -0.10278323, -0.039703082, -0.15643586, -0.021037644, 0.05495828, -0.2695447, -0.11581479, -0.12182369, -0.105714835, 0.1652072, -0.21953924, 0.10432455, -0.0070282146, 0.10643152, -0.15549584, 0.09988564, -0.122654684, 0.20949571, 0.09477197, 0.2888617, -0.39277247, 0.016727103, 0.1889803, 0.056381248, 0.40876952, -0.13590172, -0.0541827, 0.39421904, 0.080606915, -0.11821396, -0.07739553, -0.3043551, -0.19180995, -0.0665405, -0.05087047, 0.28726676, 0.030362817, -0.25384668, -0.083931744, 0.1506163, 0.31713346, -0.15233132, -0.25836545, 0.12319076, -0.032904666, -0.2063841, 0.06630847, 0.055741675, -0.08527927, -0.0020487714, -0.12668252, -0.1207183, 0.05842457, -0.09439512, -0.0073137823, -0.0063004657, 0.026114566, -0.049168456, 0.1352433, 0.065594465, -0.05028906, 0.022631956, -0.09335828, -0.062484823, -0.19244991, 0.23946401, 0.073081106, -0.0145266345, 0.049564388, -0.056107037, 0.28210273, -0.047238793, 0.19771446, -0.18512253, 0.1755759, 0.13373043, -0.041849107, 0.09927188, 0.0107151475, 0.018173022, 0.15971786, -0.24236222, -0.14679681, 0.3973366, 0.059604794, -0.10321784, 0.19704758, 0.047976516, -0.0013764421, 0.111308396, 0.19719258, -0.005487493, 0.03642539, -0.07829383, -0.15245801, 0.053342637], "bias": [0.09707247, 0.062047865, -0.0846196, -0.012403877]}, "conv2d_3_tf": {"name": "conv2d_3_tf", "type": "conv", "inputs": ["conv2d_2_tf"], "output": "conv2d_3_tf", "weights": [-0.079877876, -0.10751308, 0.013027753, 0.004941872, 0.053371057, -0.06803927, 0.012675758, 0.17491257, -0.0046748514, -0.11795606, 0.0783688, -0.05213332, 0.09671693, 0.052751314, -0.13089138, 0.028576566, 0.024516823, 0.14588848, -0.032622684, -0.05099215, 0.0626611, -0.01423211, -0.13046105, -0.0684499, -0.08616547, -0.27449137, -0.031174377, 0.070668854, 0.014410177, -0.2590109, 0.1532009, 0.083192594, -0.040283967, -0.030283062, -0.047744226, -0.055391792, 0.015191141, 0.026738686, -0.04013429, -0.09798036, 0.027562324, 0.11233545, 0.07141311, 0.30841118, -0.019408116, 0.036419977, 0.030495662, 0.039797034, -0.02301353, -0.15106334, -0.0656244, 0.043032292, -0.20118278, 0.11587743, 0.18760413, -0.06373149, -0.052036975, -0.3399077, 0.23244338, -0.0113122305, 0.27808237, 0.34010595, -0.20099677, -0.10724391, -0.133516, -0.042066205, 0.08476628, 0.2072665, -0.1676452, 0.22915895, 0.037191004, 0.055671412, 0.093344375, 0.017199876, 0.029307837, 0.3191409, 0.086974375, 0.11015111, -0.3981199, -0.24212252, -0.045533802, -0.18320258, 0.043660257, -0.1108361, -0.034680083, -0.20360784, -0.06594195, 0.09846785, -0.2530775, -0.017727885, 0.225241, 0.5453489, 0.012652209, 0.059926055, 0.025701579, 0.05170632, -0.029840834, 0.006358118, -0.0909324, -0.09715189, 0.14009783, -0.2408958, -0.085189536, 0.21800564, 0.22564822, -0.18329123, 0.12212449, -0.02495003, -0.24653947, -0.17937486, 0.02046805, 0.19779046, -0.09665382, 0.18953101, 0.26586062, 0.19777073, 0.1644434, -0.10500871, -0.108806685, 0.26034376, 0.19913374, -0.11676482, -0.019385695, 0.04121153, 0.048533197, 0.10892998, -0.21864974, 0.029062856, -0.21308687, 0.26626885, -0.009363221, -0.06805857, 0.0032217824, 0.26271737, -0.09225948, -0.09942718, -0.033105806, -0.0016658395, 0.039761614, 0.41766787, 0.115782715, 0.0013305283, -0.064988665, -0.055182483, 0.17649056, 0.009527283, -0.037268884, -0.11940821, -0.083440214, 0.04404516, 0.09144931, -0.053493533, -0.0064712917, -0.09748702, -0.09528865, 0.3229472, -0.08317666, -0.02706803, 0.15323545, -0.122947074, -0.18507788, 0.1916461, 0.10158123, 0.14135683, 0.065019175, -0.18935591, 0.027754107, 0.10663557, -0.0021875706, 0.007838569, -0.07487741, 0.039161667, 0.028547792, 0.34926617, -0.23943686, -0.031817164, -0.007309771, 0.08017327, -0.07794538, 0.0077593364, 0.017418738, 0.015209784, 0.10062018, 0.18013461, -0.007996513, -0.018017206, 0.022891648, -0.12778383, 0.044771206, 0.030833967, 0.050637648, -0.033252183, -0.22442818, -0.0135686, 0.009162205, 0.56296283, 0.69487196, -0.0708002, -0.17715241, 0.34210402, 0.061753098, 0.069433585, -0.1812621, -0.24183199, -0.09747562, -0.10170799, 0.3163028, 0.28589377, 0.34512502, -0.21348925, -0.017148321, -0.29381427, -0.043159153, -0.15722956, -0.017989872, 0.1356059, 0.031512905, -0.1776996, 0.026621807, -0.18797016, -0.22490332, -0.580678, 0.4024758, -0.0030337686, 0.057044633, 0.1556767, -0.010123055, 0.021153543, 0.026925962, 0.19219491, -0.0037524481, 0.18238, 0.29134178, 0.16444725, -0.119739346, -0.21276055, 0.08833588, 0.37937564, 0.013512091, 0.054720104, 0.29910722, 0.02874715, 0.10346177, 0.14068589, -0.1507176, -0.0552355, 0.099598676, -0.054373402, -0.14990221, 0.10674269, -0.06582123, 0.1003519, 0.26275393, -0.055337895, 0.033460826, -0.07752831, -0.27071485, 0.29844674, -0.03023239, -0.56809384, -0.28205895, -0.30336887, -0.13641582, -0.07601654, -0.35204145, 0.02984982, -0.028675687, 0.053057857, -0.30478048, -0.18289137, -0.015050614, -0.013809754, 0.09864675, -0.2847921, 0.13779928, 0.078139104, 0.12805119, -0.1933878, 0.085044615, 0.01645169, 0.15945458, 0.0057662902, -0.1346354, 0.023252968, 0.00056171237, -0.04685239, -0.037153143, -0.014872124], "bias": [-0.10584318, -0.0027788992, -0.05081974, -0.04611349]}, "conv2d_4_tf": {"name": "conv2d_4_tf", "type": "conv", "inputs": ["conv2d_3_tf"], "output": "conv2d_4_tf", "weights": [-0.050152484, 0.059137054, -0.11500633, 0.2628462, 0.08668847, 0.17048766, -0.030399468, -0.093269564, 0.04343667, -0.22050346, -0.1684881, 0.3809938, -0.014663556, -0.011488269, -0.045135025, -0.011938663, -0.025009435, 0.2990837, -0.04657924, 0.09874919, 0.10542653, 0.07871786, 0.039970547, 0.06502019, -0.11058273, -0.06268155, 0.107847, 0.030400349, -0.0047297888, -0.019779574, -0.024732105, -0.056510117, 0.00059521897, -0.065724686, -0.0885813, -0.0105986595, 0.09080039, 0.13808331, 0.17951722, 0.08169185, -0.1712384, 0.28312257, -0.12766066, -0.17766061, 0.13199389, 0.04874892, -0.027768897, -0.08313034, 0.25218087, 0.28564596, -0.05743852, -0.086449586, 0.033982597, -0.0697252, 0.23174773, 0.0038348213, 0.22545487, -0.15671335, 0.45380574, -0.05144405, 0.18415934, -0.25519857, 0.037626486, 0.17352982, -0.06156567, 0.11539893, -0.07445899, -0.31028327, 0.08384397, 0.010140885, -0.101715624, 0.4241963, -0.083027035, -0.32660902, 0.34812638, -0.2575816, -0.26879668, 0.13490333, 0.13135405, -0.06365921, 0.34102032, 0.049251817, 0.056863982, -0.33053, 0.026843794, 0.111636154, 0.1561334, 0.06210604, -0.47484717, 0.50327927, -0.25206557, -0.042339865, 0.042916205, -0.04910486, -0.0916096, 0.23473229, 0.015837803, -0.0475286, -0.19664647, -0.11933995, -0.005004683, 0.15502931, -0.022362594, 0.15494077, 0.34786624, 0.023967197, -0.38270995, 0.06690165, -0.027402332, -0.079228394, -0.18064521, 0.13402356, -0.095279545, 0.17322713, 0.12885447, -0.060325272, 0.07133893, 0.14707652, 0.10380302, 0.108860895, 0.6598374, 0.34339458, -0.04714104, 0.0008674013, -0.099668466, 0.089210786, -0.046435688, 0.10014144, -0.10387004, 0.082601696, -0.08965992, 0.18797183, -0.012282104, 0.036094382, 0.06932742, -0.06352726, -0.0031136859, 0.13815261, 0.14891203, -0.30352685, 0.06574724, -0.02782488, 0.021958787, -0.1562138, -0.007666333, -0.119415775, 0.085950345, -0.2249168, -0.066093706, -0.1146288, 0.09168097, 0.057944614, -0.027107352, 0.16397966, 0.05341907, -0.39036092, 0.016835622, 0.35054055, 0.012121548, 0.017081236, -0.03381992, -0.25615153, 0.05371774, -0.04146154, -0.27228853, -0.22322197, 0.095551684, 0.0127827665, 0.060774393, -0.13649328, -0.050120138, -0.28073063, 0.11422094, 0.40079424, 0.1121124, -0.09647826, -0.11943009, 0.06882616, -0.12049063, 0.036101263, -0.11427818, -0.07290846, -0.07376315, -0.097220235, 0.25294498, -0.080298275, 0.068136334, -0.012002707, 0.054971762, 0.06791264, 0.14031442, -0.15869962, -0.121950634, -0.26581508, -0.009419592, 0.16763626, -0.08188956, 0.265176, -0.2168163, -0.116455965, -0.24628395, -0.011375638, -0.11961702, 0.25790584, -0.27990726, 0.14374693, 0.025209116, -0.05504146, -0.043294013, -0.13061233, 0.07408276, 0.016125796, 0.31150374, -0.17376894, 0.20719525, -0.48485982, -0.10190857, -0.022753984, -0.40476972, 0.18190745, -0.16373198, 0.15222116, -0.287436, -0.081903234, -0.16584522, -0.10965234, -0.22446257, -0.1679798, -0.09604549, 0.22199294, 0.047725555, -0.089948654, 0.3888223, -0.10891563, 0.23797904, -0.2060428, 0.21672924, 0.11692795, 0.10690243, -0.32690677, 0.060718156, 0.06365173, -0.0060983696, 0.13009316, -0.13786219, 0.08743204, 0.17965135, -0.08779885, -0.08588878, 0.14309481, 0.21663155, 0.16124983, -0.11347695, -0.051707707, 0.08479779, -0.16350305, 0.18403363, -0.1187395, -0.21691442, 0.2052926, -0.0938264, -0.20391372, -0.1024275, 0.13847302, -0.25132897, -0.06869161, -0.13869224, 0.03970027, -0.20322783, 0.06435924, 0.16670766, -0.030779347, 0.070818484, -0.0013224692, 0.073780715, -0.12058401, -0.07790603, 0.1619128, 0.094911754, 0.12160383, -0.08765905, 0.14973383, -0.02279834, 0.17031524, -0.017418362, -0.13116339, -0.19769736, 0.19058816], "bias": [0.020295803, -0.21503961, -0.0771614, 0.00305601]}, "conv2d_5_tf": {"name": "conv2d_5_tf", "type": "conv", "inputs": ["conv2d_4_tf"], "output": "conv2d_5_tf", "weights": [0.07333506, 0.042153154, 0.26121634, 0.114561625, -0.034811046, 0.020523518, -0.18033415, -0.101494245, 0.38666034, -0.1296529, 0.33473092, -0.09897641, -0.092930965, -0.019928934, -0.33733132, 0.13099371, 0.0052919993, -0.0984513, 0.30619198, -0.07969012, 0.17357028, -0.043763965, 0.04966573, 0.012832754, 0.32689536, 0.10744286, -0.13127226, -0.13896264, -0.37396377, -0.051642973, -0.010512543, 0.047645234, -0.212653, 0.18044937, 0.19614023, -0.006013874, -0.044593263, 0.016232023, -0.038494766, -0.12786224, 0.2546495, -0.38221774, 0.037351944, -0.1306452, -0.18672188, 0.23903653, 0.08549427, -0.06712414, 0.05927751, -0.023368552, -0.11979864, 0.22953875, 0.0422268, -0.05751047, 0.21749045, -0.02653862, 0.107696615, 0.104581475, 0.15908201, -0.10995612, -0.053319562, -0.11433823, 0.31528217, 0.18702677, 0.29877365, -0.13719703, 0.38099977, 0.38750687, 0.020890802, 0.16928782, 0.04715636, 0.24533522, -0.109066404, 0.03361569, 0.04173586, 0.6754973, 0.46427152, -0.49527624, 0.09142349, -0.12810223, -0.0039026132, -0.050839506, -0.050372295, 0.18220271, -0.089067414, -0.017973984, 0.20060334, 0.2455003, 0.18914305, -0.003549969, -0.09346202, -0.6539437, -0.2031084, 0.09308891, -0.11839781, -0.26074234, 0.0019074462, 0.002664546, 0.055706397, -0.0673329, 0.08689369, -0.07806462, 0.15574126, -0.041785505, 0.1732535, 0.16903417, -0.027359, -0.13873969, 0.07035528, 0.12527385, 0.15269062, 0.17133075, 0.13425991, -0.044586286, 0.22290371, 0.24871336, 0.47610477, -0.46172756, -0.30993876, 0.14900747, 0.30842668, -0.20835742, 0.2927685, -0.22987983, -0.02940269, 0.10035034, 0.09508629, 0.36926803, 0.029997656, -0.010948055, 0.052881632, 0.07260971, -0.2689703, -0.07877936, -0.4631108, -1.0369782, 0.086658284, -0.18892883, 0.1396565, 0.36806017, -0.11259826, 0.08769488, -0.010089075, -0.0673246, 0.015858158, -0.07847018, -0.08533562, 0.032267023, -0.074706554, 0.06050988, -0.046106253, -0.01909483, -0.04606053, -0.048047677, -0.08761796, -0.020859899, -0.13104984, -0.006431439, 0.11865791, 0.021431917, 0.15566225, -0.27977476, -0.17345898, 0.036917284, -0.016318437, -0.030544186, 0.13714033, 0.02318875, -0.32734424, -0.01485775, 0.15328245, -0.0379209, -0.0933076, 0.0025159202, 0.07829051, 0.2441824, 0.15765905, -0.3120316, -0.08430269, 0.039227225, 0.00061509595, -0.026345227, -0.08462254, 0.11698517, -0.20660627, 0.13617857, -0.11981296, -0.11171963, 0.06596518, -0.12900288, -0.12849693, 0.15944625, 0.1396203, 0.28072214, 0.19456191, 0.1446765, 0.009290015, -0.012098021, -0.1310636, -0.0010749736, -0.113594405, 0.14846645, -0.20344831, 0.0058069695, 0.3613357, 0.06267295, -0.101899095, 0.046341263, 0.13649395, 0.19725055, 0.048091643, 0.3400145, 0.20100284, -0.2567826, -0.170984, -0.10412573, 0.2803033, -0.12374009, -0.2546341, -0.2059527, -0.1314509, 0.5449118, 0.10310688, 0.18445767, 0.22046176, 0.09990786, 0.24166732, 0.17489517, 0.14409053, 0.27580568, 0.05834063, -0.21582341, 0.071202464, -0.38695228, -0.040673, -0.03506754, 0.21909611, -0.13722578, 0.12567863, 0.07236822, -0.029128391, 0.13366663, 0.09297567, 0.12688614, 0.07870676, 0.06391031, 0.09677816, 0.049234483, -0.060512554, -0.01737135, -0.066774175, -0.0140763065, -0.11831133, -0.026270926, 0.08926973, 0.110822305, -0.06352532, -0.010273422, 0.1287274, 0.14509743, -0.12422747, -0.0028779558, 0.18925442, -0.038495086, 0.039296243, -0.14828265, -0.15589587, -0.1156464, -0.181626, 0.0075441482, -0.19338964, -0.12303067, -0.02578537, -3.6590558e-05, 0.037456695, 0.14006008, -0.39581242, -0.018129207, 0.003431172, 0.34942362, 0.07092122, 0.11042161, -0.09777249, -0.29433373, 0.08946218, 0.060626846, -0.009889978, -0.09619814], "bias": [-0.09537942, 0.06801921, 0.01732821, -0.0075274175]}, "conv2d_6_tf": {"name": "conv2d_6_tf", "type": "conv", "inputs": ["conv2d_5_tf"], "output": "conv2d_6_tf", "weights": [-0.18805693, -0.23752327, -0.14946416, 0.011219805, -0.18224797, 0.026735218, -0.085971005, 0.14496817, -0.10901731, 0.04652665, -0.12614556, 0.0640152, 0.1476938, 0.18183519, 0.10249745, 0.293299, 0.5107962, 0.28803882, -0.106186524, -0.37947446, -0.014220586, 0.28223506, -0.019075323, 0.14419337, -0.015172201, 0.25550655, -0.106559046, 0.33192378, -0.52263665, -0.2890106, 0.021610184, 0.17544681, -0.22898439, -0.041345797, -0.030743405, 0.028229631, -0.19447353, -0.09173153, -0.11182953, 0.25118244, -0.06368845, 0.028137175, -0.137736, -0.011874425, 0.13623317, -0.15078396, 0.040729936, -0.014034274, -0.017665893, 0.27596065, 0.49834684, 0.22498219, 0.06437619, 0.24659353, 0.044634815, 0.033906773, -0.063933186, -0.14125897, 0.1680455, -0.05431933, 0.0053591966, -0.24490942, -0.43975738, -0.17003712, -0.31757608, 0.031879228, -0.36792645, 0.42975008, 0.40820053, 0.2482414, 0.07834233, 0.10722084, 0.060524363, 0.06638214, -0.31186154, -0.13064289, -0.08719717, -0.1617494, 0.06707068, -0.05893858, -0.27373907, 0.049279243, -0.099538565, -0.074779056, -0.11787457, -0.003328723, -0.048841085, -0.21324658, -0.17764838, 0.32748446, -0.0425852, -0.03550102, 0.118446164, -0.19544849, 0.11554153, -0.026380602, 0.06886627, 0.060666967, -0.36849916, -0.020623254, 0.037173495, 0.08521863, -0.17968681, -0.04082521, 0.00446196, -0.008872065, 0.010613481, -0.06366701, 0.03118426, 0.0019051615, 0.3186617, 0.11303438, 0.04654278, 0.26632774, -0.19357415, -0.16793677, -0.07953127, 0.17356868, 0.0103903245, -0.003277648, -0.05527926, -0.24152918, -0.15507658, -0.17538498, -0.16338566, -0.04657002, -0.026433937, 0.3351478, -0.00017199546, 0.073555835, 0.0057502543, -0.0660181, -0.061367426, -0.10536037, 0.021335913, -0.07392863, 0.10173411, -0.031334955, 0.0929055, -0.12174734, -0.0369617, -0.047907278, -0.032967433, 0.07841991, 0.014611824, 0.0012833799, 0.016187085, -0.16125794, -0.15718836, -0.03783154, 0.0014074125, 0.111139216, 0.13634998, -0.087891884, 0.1733101, -0.09387613, -0.009640262, 0.13513435, -0.0024286557, 0.20095772, -0.025638003, 0.18816832, 0.020720541, 0.20860234, 0.048322033, 0.08801719, 0.061471753, 0.17359345, -0.07212262, -0.07449649, -0.09333823, 0.04118051, -0.171711, 0.12329577, 0.15606827, 0.12956087, -0.042475842, 0.0769432, -0.08120064, 0.119244725, -0.08003957, -0.0992798, -0.10415658, 0.040814858, 0.111978576, -0.17179403, 0.16690123, -0.19191529, 0.032850392, -0.109363556, 0.07974423, 0.11156359, -0.033884194, 0.22445719, -0.021679886, 0.14582579, -0.45871297, -0.4025705, -0.21955615, -0.7155207, -0.009578693, -0.0133207375, -0.2043174, -0.035262145, -0.07058807, 0.11099489, -0.10768254, 0.22782288, 0.27914986, -0.13998422, 0.34545207, 0.06482031, 0.27414307, -0.07773487, -0.05753229, 0.052851852, -0.2610909, -0.04330337, -0.50934434, 0.4521381, -0.30600944, -0.04629386, -0.23047066, 0.25097492, 0.1879801, 0.1922051, -0.0014282286, -0.01303423, -0.12003632, 0.1340615, -0.052048724, 0.017355083, -0.17843908, -0.31680033, 0.12203157, 0.07723456, 0.13386552, 0.12421019, -0.040261343, -0.17791142, -0.03701673, -0.09719764, -0.07927136, 0.058275267, -0.22993913, 0.12593848, 0.22393632, 0.10798306, 0.011360148, -0.09643018, 0.21892977, 0.015067403, 0.105393164, 0.050013453, -0.20891781, -0.21026026, -0.0423389, 0.07915446, 0.004864243, -0.11258792, -0.17130241, -0.3301148, -0.31279397, 0.8026417, -0.09533603, -0.12276073, 0.2380128, 0.615173, 0.05853154, -0.009042602, 0.030697802, -0.37135026, 0.057018682, -0.08879092, 0.0873754, 0.0041004242, -0.009863267, 0.11457257, -0.0023910792, 0.0273447, -0.05975043, -0.03987015, -0.112410456, -0.010635475, 0.101987354, 0.04227581, 0.116751105, -0.013480569], "bias": [0.037613444, -0.04000992, 0.0762493, -0.001187456]}, "conv2d_7_tf": {"name": "conv2d_7_tf", "type": "conv", "inputs": ["conv2d_tf", "conv2d_1_tf", "conv2d_2_tf", "conv2d_3_tf", "conv2d_4_tf", "conv2d_5_tf", "conv2d_6_tf"], "output": "conv2d_7_tf", "weights": [-0.025048682, -0.024996381, -0.021741541, -0.020119647, 0.08397806, -0.0042661643, 0.030849515, -0.10223495, 0.034394726, 0.0068471255, 0.049103376, 0.03158091, -0.10426614, -0.06736656, -0.05701672, -0.025188515, 0.056957997, 0.02847932, 0.076518245, 0.056727342, -0.022906052, 0.035315245, -0.03993487, 0.039862745, 0.004284264, 0.0102548245, 0.013209558, -0.038664192, 0.124465525, 0.106933855, 0.09459718, 0.08245932, -0.040870976, -0.018693391, 0.011195739, 0.038096182, 0.05453642, 0.058372706, 0.008419945, 0.07737939, -0.005464249, -0.0098818075, -0.030414049, -0.027188482, 0.14841671, 0.15870667, 0.14431675, 0.12510443, 0.009895222, -0.019719683, -0.029657638, -0.061945148, -0.047817066, -0.11341929, -0.07410508, -0.120766014, -0.0075282226, -0.020483555, 0.047300607, 0.008037719, -0.09407347, -0.10641484, -0.104800895, -0.1365021, 0.05114601, 0.019284977, -0.021204455, -0.014507648, 0.025514923, 0.0052817008, 0.011070284, -0.030714985, -0.00022669922, 0.025464332, 0.030162437, 0.04908859, 0.05827796, 0.1082181, 0.08642091, 0.103744626, -0.008985459, -0.0020470165, 0.07722416, 0.041572776, -0.1111987, -0.037118673, -0.021813981, 0.0660537, -0.048210643, -0.053338412, -0.023152038, -0.02327034, -0.09520653, -0.110085525, -0.09746784, -0.103232436, 0.044036604, 0.10260593, 0.015492823, 0.01743774, 0.0016874415, 0.029088398, -0.017624576, 0.021726815, -0.09284064, 0.064801365, -0.03968444, 0.16643177, -0.011157215, -0.018156456, -0.076483734, -0.06530545, -0.047836185, -0.0844061, -0.001145739, -0.013003094, 0.018624831, -0.05150628, 0.09708873, 0.004614097, 0.000703127, -0.019576313, 0.014528924, 0.01656103, -0.053996656, -0.003313822, 0.0046309377, 0.044166796, -0.04859035, -0.06672335, -0.032431662, -0.052621596, 0.045866985, 0.011398218, -0.023941167, -0.028936328, -0.025076253, 0.032938108, -0.00025047138, -0.03205149, -0.02905109, -0.0010798238, -0.020939391, 0.011748648, 0.033381604, 0.062053964, 0.042653855, 0.047042314, -0.017093925, -0.0064930418, 0.007909347, 0.023269633, -0.0040605958, -0.02384114, -0.018137777, -0.038987353, 0.017645568, -0.006722419, 0.010807834, -0.00028913902, -0.058076616, 0.039863452, -0.016807565, 0.12059085, 0.06263372, -0.024952168, -0.036472782, -0.034466237, -0.07859878, -0.0033121537, -0.025836714, 0.024191659, 0.0070511075, 0.0009395678, 0.035890833, -0.06142224, 0.047631923, -0.009924094, -0.037856504, -0.031811904, -0.04685015, -0.016561672, 0.114248805, 0.026492579, 0.044807076, 0.027975235, 0.060520858, -0.040579267, -0.0074535417, -0.0030330052, -0.00028939478, -0.014424581, -0.03434484, -0.027814992, 0.12778786, 0.11545802, -0.032505956, 0.0015733135, -0.021265501, -0.07828263, -0.016954917, 0.110033885, -0.015170357, 0.016178863, -0.08903389, -0.0062238355, 0.0010156684, 0.07643212, 0.061898287, 0.10701143, -0.13694458, -0.0704328, 0.076798104, 0.00921518, 0.06187698, 0.08819018, 0.0679498, -0.13976301, 0.07656997, -0.016379718, 0.16155782, -0.09436794, 0.09167517, -0.1621799], "bias": [0.024939813, 0.029225573, 0.007829266, 0.0014881855]}, "conv2d_7_tf1": {"name": "conv2d_7_tf1", "type": "conv", "inputs": ["conv2d_tf", "conv2d_1_tf", "conv2d_2_tf", "conv2d_3_tf", "conv2d_4_tf", "conv2d_5_tf", "conv2d_6_tf"], "output": "conv2d_7_tf1", "weights": [0.04888284, -0.045320652, 0.023166995, -0.06349977, 0.04769433, 0.09092332, -0.018109318, -0.044925906, -0.01765186, 0.018397788, -0.08967579, -0.048723787, 0.064158395, 0.013812861, 0.0042798705, -0.041388676, -0.07063445, -0.023895064, -0.0556802, -0.0016528256, 0.022273704, -0.05154365, 0.013866401, -0.02450899, 0.033180825, -0.043487098, 0.14151396, 0.011610412, -0.097415715, -0.0655571, -0.062263537, -0.03126217, -0.009889722, -0.033230703, -0.0584887, -0.06384133, -0.106967986, -0.18833351, -0.20277993, -0.2095521, -0.056551605, -0.04597133, -0.07192537, -0.052968208, -0.013459702, -0.048852686, -0.05021725, -0.10931118, -0.006613298, -0.0020310772, 0.029404398, 0.022609998, 0.09732977, 0.12515235, 0.11813806, 0.15774958, 0.04089124, -0.0015961548, 0.056535564, -0.009640133, 0.033754695, 0.056763057, 0.05312249, 0.062943816, 0.04104629, 0.034290258, 0.0031154694, 0.027378168, -0.010114397, -0.024793014, 0.020719549, -0.015226542, 0.03150776, 0.050747707, 0.0397515, 0.050454523, 0.017334947, 0.060967755, 0.0846315, 0.09745152, -0.0042433008, -0.013433411, 0.05800275, 0.011873265, -0.048646245, 0.009665011, -0.002535594, 0.06519336, -0.06081321, -0.06359039, -0.040837653, -0.0373833, -0.04021273, -0.045651376, -0.11121787, -0.10946586, 0.06379132, 0.09009914, 0.041676953, 0.016056176, 0.022679243, 0.04223696, -0.020627534, 0.010717229, -0.10450278, 0.07496098, -0.02290966, 0.21271344, -0.0163546, -0.014063453, -0.06630121, -0.04734608, -0.06480814, -0.08856016, -0.030108241, -0.031100074, -0.0021718259, -0.07788418, 0.08323251, -0.01446519, 0.011701326, -0.028007062, 0.021915866, -0.0009718507, -0.054262836, -0.018622797, 0.017806862, 0.04293351, -0.053012196, -0.07637872, 0.007969308, -0.014915133, 0.045565154, 0.00521554, -0.011147633, -0.022540871, -0.006918367, 0.0405559, 0.0043756403, -0.038385548, -0.02679556, -0.015794344, -0.039582033, -0.024335934, 0.042911407, 0.07035603, -0.0015792759, 0.0011260608, -0.02483792, -0.0057387645, -0.007966134, 0.016779855, -0.0017673558, -0.012728698, -0.016964188, -0.027526058, 0.010569009, 0.008221599, 0.014305826, 0.023361772, -0.07564524, 0.03543082, -0.024322618, 0.12535807, 0.054450903, -0.03427879, -0.01800451, -0.01670812, -0.09223956, -0.015516227, -0.009189992, 0.04072436, 0.008540652, -0.0017955345, 0.029585313, -0.075884916, 0.054442834, -0.011816233, -0.0318895, -0.033092465, -0.044539936, -0.015455495, 0.095600046, 0.0057573784, 0.048560902, 0.031664867, 0.04239376, -0.06023533, -0.015075673, -0.008692771, -0.001425879, -0.013959638, -0.031812068, -0.028167112, 0.11261473, 0.09546865, -0.033920437, 0.0026115314, -0.012341966, -0.069000475, -0.026803855, 0.09724233, -0.025407406, 0.0014897813, -0.086071335, -0.0025674645, 0.00691933, 0.08251429, 0.05864695, 0.104951784, -0.13363527, -0.06586145, 0.08819793, 0.019131256, 0.050233357, 0.07736865, 0.0754614, -0.13544798, 0.08660602, -0.0063572642, 0.17154828, -0.09027309, 0.087425865, -0.17202711], "bias": [0.0120482035, 0.004880307, 0.0076397094, -0.00992872]}, "conv2d_7_tf2": {"name": "conv2d_7_tf2", "type": "conv", "inputs": ["conv2d_tf", "conv2d_1_tf", "conv2d_2_tf", "conv2d_3_tf", "conv2d_4_tf", "conv2d_5_tf", "conv2d_6_tf"], "output": "conv2d_7_tf2", "weights": [0.012475689, -0.022801636, -0.00041396415, -0.03386347, 0.060214117, 0.015948, 0.011702554, -0.088351995, -0.00050572795, 0.0034718106, -0.010279263, 0.001765975, -0.00977418, -0.003963627, -0.01376468, -0.009793518, -0.0057351673, -0.0054969927, 0.01618681, 0.025479114, 0.00675993, 0.012058533, -0.023398422, 0.009271024, 0.015320227, -0.017456112, 0.053613763, -0.035225715, 0.003707067, 0.007675779, 0.006899877, 0.014725635, -0.026162308, -0.0184384, -0.018699735, -0.0011348214, -0.02709723, -0.052485347, -0.09953804, -0.05411797, -0.030794594, -0.02357691, -0.042667896, -0.026302105, 0.055813897, 0.03784442, 0.029773142, -0.012738128, 0.008248224, -0.014869018, -0.0021289522, -0.031144375, 0.02952629, -0.0030704078, 0.025790557, 0.0061569135, 0.023286454, -0.011163773, 0.045045733, -0.014669366, -0.021453716, -0.018578889, -0.016405376, -0.029282048, 0.046837147, 0.026754249, -0.007369015, 0.006798424, 0.011346229, -0.005750886, 0.017139476, -0.020827005, 0.011338851, 0.028936619, 0.03190071, 0.041894957, 0.034558423, 0.081706986, 0.07978952, 0.09701034, -0.0068899854, -0.0072443597, 0.06373293, 0.02350932, -0.08104213, -0.017288135, -0.0140166525, 0.062120598, -0.045647256, -0.047750335, -0.023030408, -0.020287992, -0.06852813, -0.076539814, -0.095944874, -0.09702807, 0.061643656, 0.10270373, 0.031915203, 0.019243916, 0.006482823, 0.030490402, -0.020954035, 0.013692258, -0.104002364, 0.054035723, -0.043708593, 0.16869293, -0.017659344, -0.018950272, -0.07062773, -0.05563038, -0.056898255, -0.08442408, -0.011165735, -0.015645776, 0.012687108, -0.057097364, 0.0884107, -0.002749259, -0.0012061995, -0.03160775, 0.01145629, -0.0016176887, -0.044155292, -0.008268884, 0.010465447, 0.036153283, -0.048118595, -0.0672344, -0.009683646, -0.029835142, 0.050300445, 0.011490803, -0.016251205, -0.02470786, -0.01673018, 0.028687328, -0.0026858824, -0.04828544, -0.020321142, -0.002762304, -0.02414204, -0.0014300281, 0.041485146, 0.06671117, 0.022978416, 0.023460787, -0.019326182, -0.005466836, 0.0040653674, 0.022688631, -0.005503082, -0.015738146, -0.014764594, -0.023008304, 0.010072965, -0.0040013404, 0.009249494, 0.006251814, -0.06854123, 0.03460326, -0.020320732, 0.12190227, 0.06032115, -0.027334157, -0.023541126, -0.023036012, -0.07852047, -0.00857006, -0.019060101, 0.025318956, 0.0020053883, -0.0053740703, 0.02791257, -0.07077392, 0.051574722, -0.010629622, -0.03672852, -0.03616243, -0.04235859, -0.01153877, 0.10559837, 0.020536248, 0.039568946, 0.027234143, 0.05116381, -0.043987826, -0.0052240677, -0.0010898927, 0.0010728163, -0.01314595, -0.028778018, -0.02329643, 0.12129895, 0.10691516, -0.02682315, 0.007040961, -0.010807561, -0.06645023, -0.017301768, 0.105779834, -0.01664021, 0.012688387, -0.0859551, -0.0047029606, 0.0035633633, 0.076940954, 0.06093364, 0.10639396, -0.13251889, -0.065461725, 0.080039464, 0.014157413, 0.055817038, 0.08354942, 0.069181174, -0.13453828, 0.0789596, -0.011141827, 0.15995298, -0.09573932, 0.088461384, -0.16457398], "bias": [0.0158112, 0.014103937, 0.0021640018, -0.009570115]}, "pixel_shuffle": {"name": "pixel_shuffle", "type": "pixel_shuffle", "inputs": ["conv2d_7_tf", "conv2d_7_tf1", "conv2d_7_tf2"], "output": "canvas"}}} --------------------------------------------------------------------------------