lkeab / BCNet

Deep Occlusion-Aware Instance Segmentation with Overlapping BiLayers [CVPR 2021]
https://arxiv.org/abs/2103.12340
MIT License
533 stars 73 forks source link

Link to the "converted mask annotation" is not working #132

Open codefortheplanet opened 1 year ago

codefortheplanet commented 1 year ago

Hello, the link to the "converted mask annotation" is not working. Could you update the link or is there another way I can download it? Thank you.

lkeab commented 1 year ago

Hi, it seems some bugs with onedrive. I provide another google drive link here.

codefortheplanet commented 1 year ago

Hi, Thanks for the link. The annotation file in google drive looks corrupt and is incomplete. Could you try to zip it before uploading? Thank you!

lkeab commented 1 year ago

sorry I updated it again: https://drive.google.com/file/d/1F2ClhTH5vZNlYvAqQhFQ3TVAbfbYp02y/view?usp=sharing

codefortheplanet commented 1 year ago

Thanks for reuploading. However, the new file is still not working. Here is the print out message and this is exactly what happened for your previous version. The JSON string is incomplete.

Traceback (most recent call last): File "tools/train_net.py", line 161, in args=(args,), File "/home/rocks/model/bcnet/BCNet/detectron2/engine/launch.py", line 51, in launch main_func(*args) File "tools/train_net.py", line 143, in main trainer = Trainer(cfg) File "/home/rocks/model/bcnet/BCNet/detectron2/engine/defaults.py", line 246, in init data_loader = self.build_train_loader(cfg) File "/home/rocks/model/bcnet/BCNet/detectron2/engine/defaults.py", line 420, in build_train_loader return build_detection_train_loader(cfg) File "/home/rocks/model/bcnet/BCNet/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 "/home/rocks/model/bcnet/BCNet/detectron2/data/build.py", line 226, in get_detection_dataset_dicts dataset_dicts = [DatasetCatalog.get(dataset_name) for dataset_name in dataset_names] File "/home/rocks/model/bcnet/BCNet/detectron2/data/build.py", line 226, in dataset_dicts = [DatasetCatalog.get(dataset_name) for dataset_name in dataset_names] File "/home/rocks/model/bcnet/BCNet/detectron2/data/catalog.py", line 61, in get return f() File "/home/rocks/model/bcnet/BCNet/detectron2/data/datasets/register_coco.py", line 33, in DatasetCatalog.register(name, lambda: load_coco_json(json_file, image_root, name)) File "/home/rocks/model/bcnet/BCNet/detectron2/data/datasets/coco.py", line 226, in load_coco_json coco_api = COCO(json_file) File "/home/rocks/anaconda3/envs/bcnet3/lib/python3.7/site-packages/pycocotools-2.0-py3.7-linux-x86_64.egg/pycocotools/coco.py", line 84, in init dataset = json.load(open(annotation_file, 'r')) File "/home/rocks/anaconda3/envs/bcnet3/lib/python3.7/json/init.py", line 296, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) File "/home/rocks/anaconda3/envs/bcnet3/lib/python3.7/json/init.py", line 348, in loads return _default_decoder.decode(s) File "/home/rocks/anaconda3/envs/bcnet3/lib/python3.7/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/home/rocks/anaconda3/envs/bcnet3/lib/python3.7/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 650681102 (char 650681101)

codefortheplanet commented 1 year ago

@lkeab Could you zip the file first and then upload it again! Thank you very much!

r-kanke commented 1 year ago

I followed the process.sh in README.md to make a bilayer mask annotation and it worked for me.

$ python -m detectron2.data.datasets.process_dataset datasets/coco/annotations/instances_train2017.json datasets/coco/train2017 coco_ 2017_train
$ mv ann.json datasets/coco/annotations/instances_train2017_bcnet.json
qgq99 commented 1 year ago

@lkeab Could you zip the file first and then upload it again! Thank you very much!

Hi, I am suffering the same problem, have you solved it?

qgq99 commented 1 year ago

sorry I updated it again: https://drive.google.com/file/d/1F2ClhTH5vZNlYvAqQhFQ3TVAbfbYp02y/view?usp=sharing

Hi, I've done the two steps as https://github.com/lkeab/BCNet/issues/132#issuecomment-1627887055, but I still suffer the same problem as https://github.com/lkeab/BCNet/issues/132#issuecomment-1591824509, and then I checked the tail content of the file downloaded from the url you provided:https://github.com/lkeab/BCNet/issues/132#issuecomment-1585516102, I found there is something wrong with the json file. I use the following code to check the content:

file_path = r"path to\instances_train_2017_transform_slight_correct.json"

if __name__ == '__main__':
    with open(file_path) as f:
        print(f.read()[-100:])

the output is:

.54, 112.44, 624.54, 123.11, 624.54, 129.52, 625.97, 129.52, 634.51, 131.65, 640.0, 139.48, 640.0, 1

It seems that it lacks a '}' or the content is incomplete. So could you please update the file and provide the url again? Thank you!