add new upscaler test

This commit is contained in:
janis
2023-05-24 10:23:08 +02:00
parent f9e14a58b4
commit d378018896
5 changed files with 177 additions and 6 deletions

15
bin/lib/test.py Normal file
View File

@@ -0,0 +1,15 @@
import edi
import numpy as np
import argparse
ap = argparse.ArgumentParser( description='Testing for edi. NOTE: No error catching!' )
ap.add_argument( 'inputfile', help='Input file for upscaling' )
ap.add_argument( 'outputfile', help='Output file' )
ap.add_argument( '-S', '--scalefactor', help='Scale factor' )
ap.add_argument( '-a', '--sampling', help='Sampling window size. The bigger, the blurrier. Best >= 4')
ap.set_defaults( sampling=4 )
ap.set_defaults( scalefactor=2 )
args = ap.parse_args()
print( edi.EDI_predict( np.load( args.inputfile, allow_pickle=True ), args.sampling, args.scalefactor ) )