You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to start the UI with run.py, the script hangs when it tries to generate the color_levels. Through some investigation, I found that it was hanging in resize_frames(). I'm not sure exactly why the multiprocessing doesn't work, but changing the function to directly resize the images fixed the issue for me. Here's how I altered resize frames:
defresize_frames(src_dir, dst_dir, rig, first, last, threshold=None):
"""Resizes a frame to the appropriate pyramid level sizes. Files are saved in level_0/[camera], ..., level_9/[camera] in the destination directory. Args: src_dir (str): Path to the source directory. dst_dir (str): Path to the destination directory. rig (dict[str, _]): Rig descriptor object. first (str): Name of the first frame to render. last (str): Name of the last frame to render. threshold (int): Threshold to be used for binary thresholding. No thresholding is performed if None is passed in. """forframeinrange(int(first), int(last) +1):
forcamerainrig["cameras"]:
verify_frame(src_dir, camera["id"], get_frame_name(frame))
resize_camera(
src_dir,
dst_dir,
camera["id"],
camera["resolution"],
get_frame_name(frame),
threshold,
)
I'm on Windows 10, using Docker with the WSL 2 configuration. I'm sure this function works on other setups, but in case anyone else sees this issue, this might help.
The text was updated successfully, but these errors were encountered:
Interesting find! Given that it works when you directly call it, I would assume this has to do with the mp.set_start_method("spawn", force=True) call we do beforehand to work around opencv/opencv#5150. The best way to verify this is by replacing pool.apply_async( with pool.apply( and seeing what errors are produced (since the former silences errors).
When I try to start the UI with run.py, the script hangs when it tries to generate the color_levels. Through some investigation, I found that it was hanging in resize_frames(). I'm not sure exactly why the multiprocessing doesn't work, but changing the function to directly resize the images fixed the issue for me. Here's how I altered resize frames:
I'm on Windows 10, using Docker with the WSL 2 configuration. I'm sure this function works on other setups, but in case anyone else sees this issue, this might help.
The text was updated successfully, but these errors were encountered: