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
TypeError: 'NoneType' object is not iterable #103
Comments
I think you should chang the mask name corresponding to occluded objects and occluded objects on lines 326 and 328 in the /wwwroot/wangguangxu/BCNet-main/detectron2/data/datasets/coco.py file. |
Have you solved this problem? |
Have you try this code in COCO2017 dataset successfully? |
|
|
You can give the errors for debugging. |
按照教程中的步骤,我们发现读不到图片路劲,我们在config中将图片路径改成了绝对路径,在coco.py文件中将segm = anno.get("segmentation", None)# |
Let me see how your data files are placed, I feel like that's the problem here. |
what's in your annotations folder? |
you can try to leave the fllowing two jsonfiles only in annotations file.
instance_val2017.json
instance_train_2017_transform_slight_correct.json
发自我的iPhone
…------------------ Original ------------------
From: zhang-pan ***@***.***>
Date: Tue,May 3,2022 10:47 AM
To: lkeab/BCNet ***@***.***>
Cc: wangxueping78 ***@***.***>, Comment ***@***.***>
Subject: Re: [lkeab/BCNet] TypeError: 'NoneType' object is not iterable (Issue #103)
what's in your annotations folder?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
@zhang-pan Have you executed it successfully? |
Thank you very much for your help, because our computer server is now being used by others and the GPU memory is insufficient. I will try it as soon as the server is idle and inform you of the results. |
Ok, have you downloaded KINS datasets?I can't find it. |
|
|
http://www.cvlibs.net/datasets/kitti/eval_object.php?obj_benchmark=3d |
Oh thanks.I will try it .You can contact me for qq(934466043). |
OK |
I met the same problem...This is the problem whether it is my training coco dataset or the dataset I registered myself. The return log is as follows: (solution at the end) [04/24 16:08:31 d2.data.datasets.coco]: Loading datasets/coco/annotations/instances_train_2017_transform_slight_correct.json takes 24.22 seconds. Solve this problem by modifying the code(BCNet/detectron2/data/datasets/coco.py", line 332): |
Have you solved this problem? |
Have you solved this problem? |
Solve this problem by modifying the code(BCNet/detectron2/data/datasets/coco.py", line 332): |
Thank you for your reply, but I still have a few questions. If it is convenient, can you tell me your email, and I would like to consult further. |
Have you solved this problem? |
You can double-check the path of the changed and the name of the image. |
I want to know whether the json file that the training reads in is instances_train2017.json or instances_train_2017_transform_slight_correct.json. |
When i use the dataset created by myself, my dataset contains only one type
[04/30 21:47:18 d2.data.datasets.coco]: Loaded 80 images in COCO format from datasets/cocococo/annotations/instances_train_2017.json
Traceback (most recent call last):
File "tools/train_net.py", line 161, in
args=(args,),
File "/wwwroot/wangguangxu/BCNet-main/detectron2/engine/launch.py", line 48, in launch
daemon=False,
File "/home/wangguangxu/anaconda3/envs/bcnet/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 171, in spawn
while not spawn_context.join():
File "/home/wangguangxu/anaconda3/envs/bcnet/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 118, in join
raise Exception(msg)
Exception:
-- Process 1 terminated with the following error:
Traceback (most recent call last):
File "/home/wangguangxu/anaconda3/envs/bcnet/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 19, in _wrap
fn(i, *args)
File "/wwwroot/wangguangxu/BCNet-main/detectron2/engine/launch.py", line 83, in _distributed_worker
main_func(*args)
File "/wwwroot/wangguangxu/BCNet-main/tools/train_net.py", line 143, in main
trainer = Trainer(cfg)
File "/wwwroot/wangguangxu/BCNet-main/detectron2/engine/defaults.py", line 246, in init
data_loader = self.build_train_loader(cfg)
File "/wwwroot/wangguangxu/BCNet-main/detectron2/engine/defaults.py", line 420, in build_train_loader
return build_detection_train_loader(cfg)
File "/wwwroot/wangguangxu/BCNet-main/detectron2/data/build.py", line 306, in build_detection_train_loader
proposal_files=cfg.DATASETS.PROPOSAL_FILES_TRAIN if cfg.MODEL.LOAD_PROPOSALS else None,
File "/wwwroot/wangguangxu/BCNet-main/detectron2/data/build.py", line 226, in get_detection_dataset_dicts
dataset_dicts = [DatasetCatalog.get(dataset_name) for dataset_name in dataset_names]
File "/wwwroot/wangguangxu/BCNet-main/detectron2/data/build.py", line 226, in
dataset_dicts = [DatasetCatalog.get(dataset_name) for dataset_name in dataset_names]
File "/wwwroot/wangguangxu/BCNet-main/detectron2/data/catalog.py", line 62, in get
return f()
File "/wwwroot/wangguangxu/BCNet-main/detectron2/data/datasets/register_coco.py", line 33, in
DatasetCatalog.register(name, lambda: load_coco_json(json_file, image_root, name))
File "/wwwroot/wangguangxu/BCNet-main/detectron2/data/datasets/coco.py", line 332, in load_coco_json
bo_segm = [poly for poly in bo_segm if len(poly) % 2 == 0 and len(poly) >= 6]
TypeError: 'NoneType' object is not iterable
The text was updated successfully, but these errors were encountered: