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

bugs when process human cropping ( process_human_points.py) #15

Open
coralemon opened this issue May 3, 2023 · 1 comment
Open

bugs when process human cropping ( process_human_points.py) #15

coralemon opened this issue May 3, 2023 · 1 comment

Comments

@coralemon
Copy link

The error are as follows:

File "/remote-home/c/diffusion/data/SLOPER4D/utils/multiprocess.py", line 18, in istarmap
    result = mpp.IMapIterator(self) # istarmap.py for Python 3.8+
File "/root/anaconda3/envs/dataenv/lib/python3.7/multiprocessing/pool.py", line 725, in __init__
    cache[self._job] = self
TypeError: 'Pool' object does not support item assignment

I notice the code
map_func = p.istarmap if multi_param else p.imap
and if I set multi_param=False

I get:
TypeError: crop_and_save() missing 2 required positional arguments: 'frame_id' and 'bbox'

@climbingdaily
Copy link
Owner

第一个问题是因为你的python版本低于3.8, 这个多线程操作需要python>3.8

如果你在升级python后仍然遇到多线程问题,我建议你直接注释掉多线程部分,改用for循环得到结果。
如果嫌麻烦,你可以直接跳过运行process_human_points.py,因为这步不是必须的,数据集中PKL完全包含了这一步的信息

Please use Python > 3.8+, otherwise, it could be causing issues with certain operations in the multiprocessing function.

If you still encounter errors with the multiprocessing function, (I have no problems running in my old environment but encounter issues after reinstalling the environment, and I don't know why. It's very frustrating.)

  1. You can try commenting out all the code related to the multi_func and instead use a for loop iteration. Like the code below:
    from tqdm import tqdm
    for i in tqdm(range(len(pcd_paths))):
        temp_data.append(crop_and_save(pcd_paths[i], frame_ids[i], bboxes[i], point_cloud_dir, save_dir))

    # temp_data = multi_func(
    #     functools.partial(crop_and_save, point_cloud_dir=point_cloud_dir, save_dir=save_dir), 
    #                        4, 
    #                        len(pcd_paths), 
    #                        'Re-crop humans', 
    #                        False, 
    #                        pcd_paths, 
    #                        frame_ids, 
    #                        bboxes)
  1. Alternatively, you can skip this step since the PKL file provided in the dataset already contains the necessary information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants