-
Notifications
You must be signed in to change notification settings - Fork 837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSError: unknown file format #149
Comments
Hi! Please verify that the files are accessible in the right directory and that, if using a networked source like GDrive, the connection is active. |
for say true we got this
on this line
i try this one too |
This line:
Makes me think you might be using an outdated version. Try this one: https://colab.research.google.com/github/AlphaGit/DAIN/blob/master/Colab_DAIN.ipynb I have included several updates and fixes in it, which should match the version from here: https://github.com/AlphaGit/DAIN Let me know if it helps! |
look finish on same error at first WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv about front import ` Interpolation%shell mkdir -p '{FRAME_OUTPUT_DIR}' !python -W ignore colab_interpolate.py --netName DAIN_slowmotion --time_step {fps/TARGET_FPS} --start_frame 1 --end_frame {frame_count} --frame_input_dir '{FRAME_INPUT_DIR}' --frame_output_dir '{FRAME_OUTPUT_DIR}' --mixer={FRAME_MIXER} --resize_hotfix {RESIZE_HOTFIX} so i have change the colab interpotale for import manualy big_font = ImageFont.truetype("/content/DAIN/Roboto-Bold.ttf"), size=24)
|
Hi! Sorry, I don't fully understand how this part is related:
Are you manually importing fonts? What are you doing with them? |
yes manually importing fonts for try fix the File "colab_interpolate.py", line 64 |
I see -- those fonts are only used to write over the image and debug intermediate interpolation results. Feel free to comment out:
And replaces the contents of the the d debug method (lines 339 to 342) with the word "pass". This would take out all that interaction and still allow the rest of the notebook to run. |
got one frame result and assertionError /content/DAIN have try and retry |
Good, progress!
It seems that your image files have 4 channels instead of 3. DAIN can only
work with 3. Maybe they have a transparency layer?
Make sure that the part of the code that removes the alpha layer is
running.
…On Wed, Jan 26, 2022 at 4:41 AM kilik128 ***@***.***> wrote:
got one frame result and assertionError
/content/DAIN
revise the unique id to a random numer 65014
Namespace(SAVED_MODEL=None, alpha=[0.0, 1.0],
arg='./model_weights/65014-Wed-Jan-26-09-36/args.txt', batch_size=1,
channels=3, ctx_lr_coe=1.0, datasetName='Vimeo_90K_interp', datasetPath='',
dataset_split=97, debug=False, depth_lr_coe=0.001,
doubleframe_distorted_pixel_ratio=0.002,
doubleframe_distortion_threshold=20, dtype=<class
'torch.cuda.FloatTensor'>, end_frame=36, epsilon=1e-06, factor=0.2,
filter_lr_coe=1.0, filter_size=4, flow_lr_coe=0.01, force=False,
frame_input_dir='/content/DAIN/input_frames',
frame_output_dir='/content/DAIN/output_frames',
log='./model_weights/65014-Wed-Jan-26-09-36/log.txt', lr=0.002,
mixer='normal', netName='DAIN_slowmotion', no_date=False, numEpoch=100,
occ_lr_coe=1.0, patience=5, rectify_lr=0.001, resize_hotfix=True,
save_path='./model_weights/65014-Wed-Jan-26-09-36', save_which=1, seed=1,
start_frame=1, time_step=0.1998001998001998, uid=None, use_cuda=True,
use_cudnn=1, weight_decay=0, workers=8)
cudnn is used
Interpolate 4 frames
3% 1/35 [00:00<00:00, 41.87it/s]
Traceback (most recent call last):
File "colab_interpolate.py", line 397, in
interpolate_mixer(input_frame)
File "colab_interpolate.py", line 213, in normal_interpolate
interpolate(input_frame, input_frame+1)
File "colab_interpolate.py", line 205, in interpolate
for frame, time_offset in zip(subframes(image_1, image_2), time_offsets):
File "colab_interpolate.py", line 125, in subframes
assert channels == 3
AssertionError
have try and retry
—
Reply to this email directly, view it on GitHub
<#149 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIP2WMFTOCMTPEU34C74GTUX66TVANCNFSM5MTJB6CA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Done Thank's ! it's realy cool :) |
got this
/content/DAIN
revise the unique id to a random numer 67519
Namespace(SAVED_MODEL=None, alpha=[0.0, 1.0], arg='./model_weights/67519-Sun-Jan-23-12-26/args.txt', batch_size=1, channels=3, ctx_lr_coe=1.0, datasetName='Vimeo_90K_interp', datasetPath='', dataset_split=97, debug=False, depth_lr_coe=0.001, doubleframe_distorted_pixel_ratio=0.002, doubleframe_distortion_threshold=20, dtype=<class 'torch.cuda.FloatTensor'>, end_frame=36, epsilon=1e-06, factor=0.2, filter_lr_coe=1.0, filter_size=4, flow_lr_coe=0.01, force=False, frame_input_dir='/content/DAIN/input_frames', frame_output_dir='/content/DAIN/output_frames', log='./model_weights/67519-Sun-Jan-23-12-26/log.txt', lr=0.002, mixer='normal', netName='DAIN_slowmotion', no_date=False, numEpoch=100, occ_lr_coe=1.0, patience=5, rectify_lr=0.001, resize_hotfix=False, save_path='./model_weights/67519-Sun-Jan-23-12-26', save_which=1, seed=1, start_frame=1, time_step=0.11988011988011989, uid=None, use_cuda=True, use_cudnn=1, weight_decay=0, workers=8)
cudnn is used
Interpolate 7 frames
Traceback (most recent call last):
File "colab_interpolate.py", line 64, in
big_font = ImageFont.truetype(urlopen(font_url), size=24)
File "/usr/local/lib/python3.7/dist-packages/PIL/ImageFont.py", line 648, in truetype
return freetype(font)
File "/usr/local/lib/python3.7/dist-packages/PIL/ImageFont.py", line 645, in freetype
return FreeTypeFont(font, size, index, encoding, layout_engine)
File "/usr/local/lib/python3.7/dist-packages/PIL/ImageFont.py", line 197, in init
load_from_bytes(font)
File "/usr/local/lib/python3.7/dist-packages/PIL/ImageFont.py", line 179, in load_from_bytes
"", size, index, encoding, self.font_bytes, layout_engine
OSError: unknown file format
on !python -W ignore colab_interpolate.py --netName DAIN_slowmotion --time_step {fps/TARGET_FPS} --start_frame 1 --end_frame {pngs_generated_count} --frame_input_dir '{FRAME_INPUT_DIR}' --frame_output_dir '{FRAME_OUTPUT_DIR}'
The text was updated successfully, but these errors were encountered: