Skip to content
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

Using imageio.imwrite instead of scisc.imsave (deprecated) #147

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions config.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
conf = {
"WORK_PATH": "./work",
"CUDA_VISIBLE_DEVICES": "0,1,2,3",
"WORK_PATH": "/content/drive/Shareddrives/NCKH 2021/checkpoints1",
# (Ly) In Colab, we only have 1 GPU
"CUDA_VISIBLE_DEVICES": "0",
"data": {
'dataset_path': "your_dataset_path",
'dataset_path': "/content/output",
'resolution': '64',
'dataset': 'CASIA-B',
# In CASIA-B, data of subject #5 is incomplete.
Expand Down
3 changes: 2 additions & 1 deletion pretreatment.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from warnings import warn
from time import sleep
import argparse
import imageio

from multiprocessing import Pool
from multiprocessing import TimeoutError as MP_TimeoutError
Expand Down Expand Up @@ -132,7 +133,7 @@ def cut_pickle(seq_info, pid):
if img is not None:
# Save the cut img
save_path = os.path.join(out_dir, _frame_name)
scisc.imsave(save_path, img)
imageio.imwrite(save_path, img)
count_frame += 1
# Warn if the sequence contains less than 5 frames
if count_frame < 5:
Expand Down