INNER CODE UNIT · Python
main
HypoX64/DeepMosaics · deepmosaic.py:17
def main():
if os.path.isdir(opt.media_path):
files = util.Traversal(opt.media_path)
else:
files = [opt.media_path]
if opt.mode == 'add':
netS = loadmodel.bisenet(opt,'roi')
for file in files:
opt.media_path = file
if util.is_img(file):
add.addmosaic_img(opt,netS)
elif util.is_video(file):
add.addmosaic_video(opt,netS)
util.clean_tempfiles(opt, tmp_init = False)
else:
print('This type of file is not supported')
util.clean_tempfiles(opt, tmp_init = False)