Deep Occlusion-Aware Instance Segmentation with Overlapping BiLayers [CVPR 2021]

Overview

Deep Occlusion-Aware Instance Segmentation with Overlapping BiLayers [BCNet, CVPR 2021]

This is the official pytorch implementation of BCNet built on the open-source detectron2.

Deep Occlusion-Aware Instance Segmentation with Overlapping BiLayers
Lei Ke, Yu-Wing Tai, Chi-Keung Tang
CVPR 2021

  • Two-stage instance segmentation with state-of-the-art performance.
  • Image formation as composition of two overlapping layers.
  • Bilayer decoupling for the occluder and occludee.
  • Efficacy on both the FCOS and Faster R-CNN detectors.

Under construction. Our code and pretrained model will be fully released in two months.

Visualization of Occluded Objects

Qualitative instance segmentation results of our BCNet, using ResNet-101-FPN and Faster R-CNN detector. The bottom row visualizes squared heatmap of contour and mask predictions by the two GCN layers for the occluder and occludee in the same ROI region specified by the red bounding box, which also makes the final segmentation result of BCNet more explainable than previous methods.

Qualitative instance segmentation results of our BCNet, using ResNet-101-FPN and FCOS detector.

Results on COCO test-dev

(Check Table 8 of the paper for full results, all methods are trained on COCO train2017)

Detector Backbone Method mAP(mask)
Faster R-CNN ResNet-50 FPN Mask R-CNN 34.2
Faster R-CNN ResNet-50 FPN MS R-CNN 35.6
Faster R-CNN ResNet-50 FPN PointRend 36.3
Faster R-CNN ResNet-50 FPN PANet 36.6
Faster R-CNN ResNet-50 FPN BCNet 38.4
Faster R-CNN ResNet-101 FPN Mask R-CNN 36.1
Faster R-CNN ResNet-101 FPN BMask R-CNN 37.7
Faster R-CNN ResNet-101 FPN MS R-CNN 38.3
Faster R-CNN ResNet-101 FPN BCNet 39.8, [Pretrained Model]
FCOS ResNet-101 FPN SipMask 37.8
FCOS ResNet-101 FPN BlendMask 38.4
FCOS ResNet-101 FPN CenterMask 38.3
FCOS ResNet-101 FPN BCNet 39.6, [Pretrained Model]

Introduction

Segmenting highly-overlapping objects is challenging, because typically no distinction is made between real object contours and occlusion boundaries. Unlike previous two-stage instance segmentation methods, BCNet models image formation as composition of two overlapping layers, where the top GCN layer detects the occluding objects (occluder) and the bottom GCN layer infers partially occluded instance (occludee). The explicit modeling of occlusion relationship with bilayer structure naturally decouples the boundaries of both the occluding and occluded instances, and considers the interaction between them during mask regression. We validate the efficacy of bilayer decoupling on both one-stage and two-stage object detectors with different backbones and network layer choices. The network of BCNet is as follows:

Step-by-step Installation

conda create -n bcnet python=3.7 -y
source activate bcnet
 
conda install pytorch==1.4.0 torchvision==0.5.0 cudatoolkit=10.1 -c pytorch
 
# FCOS and coco api and visualization dependencies
pip install ninja yacs cython matplotlib tqdm
pip install opencv-python==4.4.0.40
 
export INSTALL_DIR=$PWD
 
# install pycocotools. Please make sure you have installed cython.
cd $INSTALL_DIR
git clone https://github.com/cocodataset/cocoapi.git
cd cocoapi/PythonAPI
python setup.py build_ext install
 
# install BCNet
cd $INSTALL_DIR
git clone https://github.com/lkeab/BCNet.git
cd BCNet/
python3 setup.py build develop
 
unset INSTALL_DIR

Dataset Preparation

Prepare for coco2017 dataset following this instruction. And use our converted mask annotations to replace original annotation file for bilayer decoupling training.

  mkdir -p datasets/coco
  ln -s /path_to_coco_dataset/annotations datasets/coco/annotations
  ln -s /path_to_coco_dataset/train2017 datasets/coco/train2017
  ln -s /path_to_coco_dataset/test2017 datasets/coco/test2017
  ln -s /path_to_coco_dataset/val2017 datasets/coco/val2017

Multi-GPU Training and evaluation on Validation set

bash all.sh

Or

CUDA_VISIBLE_DEVICES=0,1 python3 tools/train_net.py --num-gpus 2 \
	--config-file configs/fcos/fcos_imprv_R_50_FPN_1x.yaml 2>&1 | tee log/train_log.txt

Pretrained Models

TBD

  mkdir pretrained_models
  #And put the downloaded pretrained models in this directory.

Testing on Test-dev

TBD

bash eval.sh

Citations

If you find BCNet useful in your research, please star this repository and consider citing:

@inproceedings{ke2021bcnet,
    author = {Ke, Lei and Tai, Yu-Wing and Tang, Chi-Keung},
    title = {Deep Occlusion-Aware Instance Segmentation with Overlapping BiLayers},
    booktitle = {CVPR},
    year = {2021},
}   

License

BCNet is released under the MIT license. See LICENSE for additional details. Thanks to the Third Party Libs detectron2

Comments
  • TypeError: 'NoneType' object is not iterable

    TypeError: 'NoneType' object is not iterable

    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

    opened by guangxuwang 20
  • setting NUM_CLASSES

    setting NUM_CLASSES

    in the beginning i would like to give others some notice: even though you've install pytorch via anaconda with cudatoolkit. But still. it is just for the pytorch. not for detectron2. pls consider using cuda package locally or use a docker.

    question 1: train_log_init.txt

    I've found out you've noticed, that we should change MODEL.ROI_HEADS.NUM_CLASSES and MODEL.RETINANET.NUM_CLASSES. I've changed them in detectron2/config/defaults.py Or tried to add the params in all.sh via adding MODEL.ROI_HEADS.NUM_CLASSES 2, MODEL.FCOS.NUM_CLASSES 2, MODEL.RETINANET.NUM_CLASSES 2 for my 2 classes (background not included). but none of them helps... The error: AssertionError: A prediction has category_id=62, which is not available in the dataset. question 2: the training seems stop immediately. i've changed the MAX_ITER in yaml file, but it was not helped..

    I think the both problems could be relevant, because the model is not trained for 2 classes. the log file is attached. many thanks for your help!

    opened by heizie 13
  • About loss is 0

    About loss is 0

    I processed my own dataset according to process.sh and then modified all num_class ( just have 1 category )

    during training: the loss_mask_bo, loss_boundary_bo is 0 :

    iter: 4579 total_loss: 0.810 loss_cls: 0.001 loss_reg: 0.092 loss_centerness: 0.582 loss_mask: 0.046
    loss_mask_bo: 0.000 loss_boundary_bo: 0.000 loss_boundary: 0.071 time: 5.0648 data_time: 0.0532 lr: 0.010000 max_mem: 5639M

    Occasionally they will have values, mostly are 0 iter: 3079 total_loss: 1.035 loss_cls: 0.019 loss_reg: 0.148 loss_centerness: 0.584 loss_mask: 0.097 loss_mask_bo: 0.003 loss_boundary_bo: 0.015 loss_boundary: 0.150 time: 5.0991 data_time: 0.0558 lr: 0.010000 max_mem: 5639M

    what's wrong with this?Is there something wrong with my dataset? Hope to get your help. Thanks

    opened by torchmyheart 9
  • Confuse about the training details of mask head

    Confuse about the training details of mask head

    Dear author: Thanks for your great job! I'm confused about the training details of mask head. I find that you use the roi_feat extracted from gt_bbox instand of pred box from FCOS to train maskhead, right?

    image

    In './fcos.py', you always add gt to proposals and do the match between proposals and gt. So the 'gt' added to proposals will 100% match the gt. Then in the 'self._sample_proposals' function, I find that it's not a sample function, it just return the index of matched proposal(which is the gt added to proposals). Finally, I print out the proposal boxes which will be the input of maskhead, and I find it's the same as gt_box.

    gt pred

    In the code comments, you say that when training starts the proposals will be low quality due to random initialization, so you add gt. But it will cause the input of maskhead is always the roi from gt_box.

    opened by EDENpraseHAZARD 9
  • Reproduce results on KINS dataset

    Reproduce results on KINS dataset

    Hi @lkeab, Thank you for your consideration. I have reproduced the results on the KINS dataset, the training config I used is this one (https://github.com/lkeab/BCNet/blob/main/configs/fcos/fcos_imprv_R_101_FPN.yaml)

    This is my result: Task: bbox AP,AP50,AP75,APs,APm,APl 22.1250,36.1991,22.7091,7.1252,29.4600,50.7804 Task: segm AP,AP50,AP75,APs,APm,APl 19.0872,35.3957,18.6023,5.3862,25.6557,49.1075

    I think I find that there is a large gap between my results and the reported results image

    I would like to ask if I have done something wrong or is there any specific config for the KINS dataset. Thank you.

    good first issue 
    opened by trqminh 8
  • About training my dataset

    About training my dataset

    Traceback (most recent call last): File "/home/anaconda3/envs/bcnet/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/home/anaconda3/envs/bcnet/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/BCNet/detectron2/data/datasets/process_dataset.py", line 584, in dicts = load_coco_json(sys.argv[1], sys.argv[2], sys.argv[3]) File "/home/BCNet/detectron2/data/datasets/process_dataset.py", line 101, in load_coco_json meta.thing_classes = thing_classes File "/home/BCNet/detectron2/data/catalog.py", line 136, in setattr "to a different value!\n{} != {}".format(key, self.name, oldval, val) AssertionError: Attribute 'thing_classes' in the metadata of 'coco_2017_train' cannot be set to a different value! ['person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat', 'traffic light', 'fire hydrant', 'stop sign', 'parking meter', 'bench', 'bird', 'cat', 'dog', 'horse', 'sheep', 'cow', 'elephant', 'bear', 'zebra', 'giraffe', 'backpack', 'umbrella', 'handbag', 'tie', 'suitcase', 'frisbee', 'skis', 'snowboard', 'sports ball', 'kite', 'baseball bat', 'baseball glove', 'skateboard', 'surfboard', 'tennis racket', 'bottle', 'wine glass', 'cup', 'fork', 'knife', 'spoon', 'bowl', 'banana', 'apple', 'sandwich', 'orange', 'broccoli', 'carrot', 'hot dog', 'pizza', 'donut', 'cake', 'chair', 'couch', 'potted plant', 'bed', 'dining table', 'toilet', 'tv', 'laptop', 'mouse', 'remote', 'keyboard', 'cell phone', 'microwave', 'oven', 'toaster', 'sink', 'refrigerator', 'book', 'clock', 'vase', 'scissors', 'teddy bear', 'hair drier', 'toothbrush'] != ['KU', 'PH']

    I'm extremely interested in your article. I tried to change images and json files into the coco type. Then I used your process.py to generate new json file. Then it outputted this problem. As you can see, my 'thing_classes' are two kinds ['KU', 'PH']. I want to know where can I change the 'thing_classes', then I can run the model.

    Looking forward to your reply.

    opened by breezero1994 8
  • Timed out waiting 1800000ms for send operation to complete

    Timed out waiting 1800000ms for send operation to complete

    Hi I meet a bug:RuntimeError: Application timeout caused pair closure。 This is config: Traceback (most recent call last): File "tools/train_net.py", line 162, in args=(args,), File "/data1/mazeyu/BCNet-main/detectron2/engine/launch.py", line 48, in launch daemon=False, File "/home/mazeyu/anaconda3/envs/bcnet/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 171, in spawn while not spawn_context.join(): File "/home/mazeyu/anaconda3/envs/bcnet/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 118, in join raise Exception(msg) Exception:

    -- Process 3 terminated with the following error: Traceback (most recent call last): File "/data1/mazeyu/BCNet-main/detectron2/engine/train_loop.py", line 131, in train self.run_step() File "/data1/mazeyu/BCNet-main/detectron2/engine/train_loop.py", line 218, in run_step self._write_metrics(metrics_dict) File "/data1/mazeyu/BCNet-main/detectron2/engine/train_loop.py", line 253, in _write_metrics all_metrics_dict = comm.gather(metrics_dict) File "/data1/mazeyu/BCNet-main/detectron2/utils/comm.py", line 199, in gather size_list, tensor = _pad_to_largest_tensor(tensor, group) File "/data1/mazeyu/BCNet-main/detectron2/utils/comm.py", line 125, in _pad_to_largest_tensor dist.all_gather(size_list, local_size, group=group) File "/home/mazeyu/anaconda3/envs/bcnet/lib/python3.7/site-packages/torch/distributed/distributed_c10d.py", line 1158, in all_gather work.wait() RuntimeError: [/opt/conda/conda-bld/pytorch_1579022060824/work/third_party/gloo/gloo/transport/tcp/unbound_buffer.cc:136] Timed out waiting 1800000ms for send operation to complete

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last): File "/home/mazeyu/anaconda3/envs/bcnet/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 19, in _wrap fn(i, *args) File "/data1/mazeyu/BCNet-main/detectron2/engine/launch.py", line 83, in _distributed_worker main_func(*args) File "/data1/mazeyu/BCNet-main/tools/train_net.py", line 150, in main return trainer.train() File "/data1/mazeyu/BCNet-main/detectron2/engine/defaults.py", line 373, in train super().train(self.start_iter, self.max_iter) File "/data1/mazeyu/BCNet-main/detectron2/engine/train_loop.py", line 134, in train self.after_train() File "/data1/mazeyu/BCNet-main/detectron2/engine/train_loop.py", line 142, in after_train h.after_train() File "/data1/mazeyu/BCNet-main/detectron2/engine/hooks.py", line 353, in after_train self._do_eval() File "/data1/mazeyu/BCNet-main/detectron2/engine/hooks.py", line 321, in _do_eval results = self._func() File "/data1/mazeyu/BCNet-main/detectron2/engine/defaults.py", line 324, in test_and_save_results self._last_eval_results = self.test(self.cfg, self.model) File "/data1/mazeyu/BCNet-main/detectron2/engine/defaults.py", line 484, in test results_i = inference_on_dataset(model, data_loader, evaluator) File "/data1/mazeyu/BCNet-main/detectron2/evaluation/evaluator.py", line 157, in inference_on_dataset results = evaluator.evaluate() File "/data1/mazeyu/BCNet-main/detectron2/evaluation/coco_evaluation.py", line 120, in evaluate predictions = comm.gather(self._predictions, dst=0) File "/data1/mazeyu/BCNet-main/detectron2/utils/comm.py", line 199, in gather size_list, tensor = _pad_to_largest_tensor(tensor, group) File "/data1/mazeyu/BCNet-main/detectron2/utils/comm.py", line 125, in _pad_to_largest_tensor dist.all_gather(size_list, local_size, group=group) File "/home/mazeyu/anaconda3/envs/bcnet/lib/python3.7/site-packages/torch/distributed/distributed_c10d.py", line 1158, in all_gather work.wait() RuntimeError: Application timeout caused pair closure

    Please help me,thanks!

    opened by Martin0401 8
  • Dataset replacement

    Dataset replacement

    If I wanna to use the dataset created by myself, is it right to create the dataset into coco format? What kinds of documents need to be changed? Thanks!

    opened by EVXEVXYA 7
  • Loading pretrained models

    Loading pretrained models

    Thank you for your consideration

    I've tried to load your model_final_beta.pth as a pretrained model for training on my custom dataset. I changed the WEIGHTS in the config file like this image

    but I receive this message image

    Did I do the righting for loading a pre-trained model? If not, can you help me with the right way to do so. Thank you so much.

    opened by trqminh 7
  • results on custom dataset

    results on custom dataset

    Hello @lkeab , I was training your BCNet with my dataset. The results are not so good, but the thing I dont understand is that for some cases, the occluders are not detected as you can see my pictures below: image image image

    opened by trungpham2606 7
  • Using with latest version of Detectron2

    Using with latest version of Detectron2

    Is it possible to use your model with the latest version of detectron2? I'm currently using detectron2 with good results (but not good for occluded objects).

    I'm using CUDA 11, but your repo appears to be built on an older version of detectron2 with cuda 10.

    Is it possible to just merge certain files into my existing detectron2 files and then use your model configs? (If so what files to merge?)

    good first issue 
    opened by Shadercloud 6
  • Visualizaiton result is pretty bad.

    Visualizaiton result is pretty bad.

    Thanks for such great job! I have some trouble in visualization. Run the code "bash visualization.sh" to visualize segm results.

    CUDA_VISIBLE_DEVICES=0 python3 demo/demo.py --config-file configs/fcos/fcos_imprv_R_101_FPN.yaml --input ./demo/test_img.jpg --output ./demo/result_img --opts MODEL.WEIGHTS ./pretrained_models/model_final_beta.pth
    

    The visualize results as: 000000000285

    The repo refer to https://github.com/Shadercloud/detectron2 The weight refer to https://hkustconnect-my.sharepoint.com/:u:/g/personal/lkeab_connect_ust_hk/EfiDFLLEawFJpruwuOl3h3ABBjAKysTf0qJQU80iaKbqYg?e=igzC51 I have no idea if need to train the model then visualize.

    opened by willpat1213 0
  • Nothing happened after running visualize.sh

    Nothing happened after running visualize.sh

    I got message

    [12/15 18:44:57 detectron2]: Arguments: Namespace(confidence_threshold=0.5, config_file='configs/fcos/fcos_imprv_R_50_FPN.yaml', input=['test_img/'], opts=['MODEL.WEIGHTS', './pretrained_models/model_final_beta.pth'], output='result_img/', video_input=None, webcam=False) WARNING [12/15 18:44:57 d2.config.compat]: Config 'configs/fcos/fcos_imprv_R_50_FPN.yaml' has no VERSION. Assuming it to be compatible with latest v2. ['test_img/']

    It seems messages are not error message but I dont know why nothing occur and no images in folder "result_img".

    opened by wisan-dhammatorn 0
  • train issues

    train issues

    WARNING [10/15 22:01:14 fvcore.common.checkpoint]: The checkpoint state_dict contains keys that are not used by the model: fc1000.{bias, weight} stem.conv1.bias [10/15 22:01:14 d2.engine.train_loop]: Starting training from iteration 0 ERROR [10/15 22:01:15 d2.engine.train_loop]: Exception during training: Traceback (most recent call last): File "/home/chuan/code/detectron2/detectron2/engine/train_loop.py", line 149, in train self.run_step() File "/home/chuan/code/detectron2/detectron2/engine/defaults.py", line 494, in run_step self._trainer.run_step() File "/home/chuan/code/detectron2/detectron2/engine/train_loop.py", line 273, in run_step loss_dict = self.model(data) File "/home/chuan/anaconda3/envs/bcnet2/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "/home/chuan/code/detectron2/detectron2/modeling/meta_arch/fcos.py", line 172, in forward return self._forward_train( File "/home/chuan/code/detectron2/detectron2/modeling/meta_arch/fcos.py", line 199, in _forward_train loss_mask, loss_mask_bo, loss_boundary, loss_boundary_bo = self._forward_mask(features_list, proposals) File "/home/chuan/code/detectron2/detectron2/modeling/meta_arch/fcos.py", line 251, in _forward_mask return mask_rcnn_loss(mask_logits, boundary, proposals, bo_masks, bo_bound) File "/home/chuan/code/detectron2/detectron2/modeling/roi_heads/mask_head.py", line 77, in mask_rcnn_loss gt_bo_masks_per_image = instances_per_image.gt_bo_masks.crop_and_resize( File "/home/chuan/code/detectron2/detectron2/structures/instances.py", line 65, in getattr raise AttributeError("Cannot find field '{}' in the given Instances!".format(name)) AttributeError: Cannot find field 'gt_bo_masks' in the given Instances! [10/15 22:01:15 d2.engine.hooks]: Total training time: 0:00:00 (0:00:00 on hooks) [10/15 22:01:15 d2.utils.events]: iter: 0 lr: N/A max_mem: 962M /home/chuan/anaconda3/envs/bcnet2/lib/python3.8/site-packages/torch/functional.py:445: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:2157.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] Traceback (most recent call last): File "tools/train_net.py", line 156, in launch( File "/home/chuan/code/detectron2/detectron2/engine/launch.py", line 82, in launch main_func(*args) File "tools/train_net.py", line 150, in main return trainer.train() File "/home/chuan/code/detectron2/detectron2/engine/defaults.py", line 484, in train super().train(self.start_iter, self.max_iter) File "/home/chuan/code/detectron2/detectron2/engine/train_loop.py", line 149, in train self.run_step() File "/home/chuan/code/detectron2/detectron2/engine/defaults.py", line 494, in run_step self._trainer.run_step() File "/home/chuan/code/detectron2/detectron2/engine/train_loop.py", line 273, in run_step loss_dict = self.model(data) File "/home/chuan/anaconda3/envs/bcnet2/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "/home/chuan/code/detectron2/detectron2/modeling/meta_arch/fcos.py", line 172, in forward return self._forward_train( File "/home/chuan/code/detectron2/detectron2/modeling/meta_arch/fcos.py", line 199, in _forward_train loss_mask, loss_mask_bo, loss_boundary, loss_boundary_bo = self._forward_mask(features_list, proposals) File "/home/chuan/code/detectron2/detectron2/modeling/meta_arch/fcos.py", line 251, in _forward_mask return mask_rcnn_loss(mask_logits, boundary, proposals, bo_masks, bo_bound) File "/home/chuan/code/detectron2/detectron2/modeling/roi_heads/mask_head.py", line 77, in mask_rcnn_loss gt_bo_masks_per_image = instances_per_image.gt_bo_masks.crop_and_resize( File "/home/chuan/code/detectron2/detectron2/structures/instances.py", line 65, in getattr raise AttributeError("Cannot find field '{}' in the given Instances!".format(name)) AttributeError: Cannot find field 'gt_bo_masks' in the given Instances!

    I have used process.sh generates coco.json Some formats are as follows: {"id": 2364, "image_id": 990, "bbox": [21.0, 21.0, 282.0, 256.0], "area": 72192.0, "iscrowd": 0, "category_id": 1, "segmentation": [[257.0, 276.5, 190.0, 270.5, 115.0, 272.5, 106.0, 268.5, 96.5, 258.0, 80.5, 219.0, 43.5, 177.0, 31.5, 159.0, 20.5, 124.0, 21.5, 97.0, 71.0, 38.5, 101.0, 39.5, 134.0, 25.5, 155.0, 20.5, 175.0, 20.5, 186.0, 27.5, 197.0, 42.5, 215.0, 30.5, 223.0, 29.5, 238.0, 34.5, 253.0, 28.5, 262.0, 32.5, 286.5, 55.0, 299.5, 85.0, 298.5, 122.0, 302.5, 145.0, 291.5, 171.0, 294.5, 189.0, 284.5, 206.0, 284.5, 227.0, 288.5, 237.0, 284.5, 259.0, 270.0, 271.5, 257.0, 276.5]], "bg_object_segmentation": [[302.0, 271.0, 297.0, 271.0, 292.0, 268.0, 287.0, 264.0, 282.0, 263.0, 277.0, 264.0, 272.0, 264.0, 267.0, 263.0, 262.0, 260.0, 257.0, 258.0, 252.0, 256.0, 247.0, 256.0, 242.0, 256.0, 237.0, 256.0, 232.0, 255.0, 229.0, 250.0, 226.0, 245.0, 226.0, 240.0, 226.0, 235.0, 225.0, 230.0, 224.0, 225.0, 222.0, 220.0, 220.0, 215.0, 218.0, 210.0, 214.0, 205.0, 210.0, 200.0, 206.0, 195.0, 202.0, 190.0, 198.0, 185.0, 200.0, 180.0, 203.0, 175.0, 207.0, 170.0, 212.0, 166.0, 217.0, 162.0, 222.0, 158.0, 227.0, 154.0, 232.0, 151.0, 237.0, 148.0, 242.0, 145.0, 247.0, 142.0, 251.0, 138.0, 254.0, 133.0, 258.0, 128.0, 261.0, 123.0, 264.0, 118.0, 269.0, 114.0, 274.0, 110.0, 279.0, 107.0, 284.0, 103.0, 288.0, 98.0, 292.0, 93.0, 296.0, 88.0, 301.0, 83.0, 303.0, 84.0, 303.0, 89.0, 303.0, 94.0, 303.0, 99.0, 303.0, 104.0, 303.0, 109.0, 303.0, 114.0, 303.0, 119.0, 303.0, 124.0, 303.0, 129.0, 303.0, 134.0, 303.0, 139.0, 303.0, 144.0, 303.0, 149.0, 303.0, 154.0, 303.0, 159.0, 303.0, 164.0, 303.0, 169.0, 303.0, 174.0, 303.0, 179.0, 303.0, 184.0, 303.0, 189.0, 303.0, 194.0, 303.0, 199.0, 303.0, 204.0, 303.0, 209.0, 303.0, 214.0, 303.0, 219.0, 303.0, 224.0, 303.0, 229.0, 303.0, 234.0, 303.0, 239.0, 303.0, 244.0, 303.0, 249.0, 303.0, 254.0, 303.0, 259.0, 303.0, 264.0, 303.0, 269.0]]}, The required fields have been included. How to solve this problem? 3Q

    opened by comingsoon1204 0
Owner
Lei Ke
PhD student in Computer Vision, HKUST
Lei Ke
Codes of paper "Unseen Object Amodal Instance Segmentation via Hierarchical Occlusion Modeling"

Unseen Object Amodal Instance Segmentation (UOAIS) Seunghyeok Back, Joosoon Lee, Taewon Kim, Sangjun Noh, Raeyoung Kang, Seongho Bak, Kyoobin Lee This

GIST-AILAB 92 Dec 13, 2022
Point Cloud Registration using Representative Overlapping Points.

Point Cloud Registration using Representative Overlapping Points (ROPNet) Abstract 3D point cloud registration is a fundamental task in robotics and c

ZhuLifa 36 Dec 16, 2022
Self-Supervised Monocular 3D Face Reconstruction by Occlusion-Aware Multi-view Geometry Consistency[ECCV 2020]

Self-Supervised Monocular 3D Face Reconstruction by Occlusion-Aware Multi-view Geometry Consistency(ECCV 2020) This is an official python implementati

null 304 Jan 3, 2023
[CVPR 2021] Region-aware Adaptive Instance Normalization for Image Harmonization

RainNet — Official Pytorch Implementation Region-aware Adaptive Instance Normalization for Image Harmonization Jun Ling, Han Xue, Li Song*, Rong Xie,

null 130 Dec 11, 2022
Leveraging Instance-, Image- and Dataset-Level Information for Weakly Supervised Instance Segmentation

Leveraging Instance-, Image- and Dataset-Level Information for Weakly Supervised Instance Segmentation This paper has been accepted and early accessed

Yun Liu 39 Sep 20, 2022
[ArXiv 2021] Data-Efficient Instance Generation from Instance Discrimination

InsGen - Data-Efficient Instance Generation from Instance Discrimination Data-Efficient Instance Generation from Instance Discrimination Ceyuan Yang,

GenForce: May Generative Force Be with You 93 Dec 25, 2022
[CVPR 2021] Modular Interactive Video Object Segmentation: Interaction-to-Mask, Propagation and Difference-Aware Fusion

[CVPR 2021] Modular Interactive Video Object Segmentation: Interaction-to-Mask, Propagation and Difference-Aware Fusion

Rex Cheng 364 Jan 3, 2023
Semi-supervised Semantic Segmentation with Directional Context-aware Consistency (CVPR 2021)

Semi-supervised Semantic Segmentation with Directional Context-aware Consistency (CAC) Xin Lai*, Zhuotao Tian*, Li Jiang, Shu Liu, Hengshuang Zhao, Li

Jia Research Lab 137 Dec 14, 2022
Semi-supervised Semantic Segmentation with Directional Context-aware Consistency (CVPR 2021)

Semi-supervised Semantic Segmentation with Directional Context-aware Consistency (CAC) Xin Lai*, Zhuotao Tian*, Li Jiang, Shu Liu, Hengshuang Zhao, Li

DV Lab 137 Dec 14, 2022
This repository contains codes of ICCV2021 paper: SO-Pose: Exploiting Self-Occlusion for Direct 6D Pose Estimation

SO-Pose This repository contains codes of ICCV2021 paper: SO-Pose: Exploiting Self-Occlusion for Direct 6D Pose Estimation This paper is basically an

shangbuhuan 52 Nov 25, 2022
Occlusion robust 3D face reconstruction model in CFR-GAN (WACV 2022)

Occlusion Robust 3D face Reconstruction Yeong-Joon Ju, Gun-Hee Lee, Jung-Ho Hong, and Seong-Whan Lee Code for Occlusion Robust 3D Face Reconstruction

Yeongjoon 31 Dec 19, 2022
The official repo for OC-SORT: Observation-Centric SORT on video Multi-Object Tracking. OC-SORT is simple, online and robust to occlusion/non-linear motion.

OC-SORT Observation-Centric SORT (OC-SORT) is a pure motion-model-based multi-object tracker. It aims to improve tracking robustness in crowded scenes

Jinkun Cao 325 Jan 5, 2023
code for CVPR paper Zero-shot Instance Segmentation

Code for CVPR2021 paper Zero-shot Instance Segmentation Code requirements python: python3.7 nvidia GPU pytorch1.1.0 GCC >=5.4 NCCL 2 the other python

zhengye 86 Dec 13, 2022
FreeSOLO for unsupervised instance segmentation, CVPR 2022

FreeSOLO: Learning to Segment Objects without Annotations This project hosts the code for implementing the FreeSOLO algorithm for unsupervised instanc

NVIDIA Research Projects 253 Jan 2, 2023
Temporally Efficient Vision Transformer for Video Instance Segmentation, CVPR 2022, Oral

Temporally Efficient Vision Transformer for Video Instance Segmentation Temporally Efficient Vision Transformer for Video Instance Segmentation (CVPR

Hust Visual Learning Team 203 Dec 31, 2022
Based on the paper "Geometry-aware Instance-reweighted Adversarial Training" ICLR 2021 oral

Geometry-aware Instance-reweighted Adversarial Training This repository provides codes for Geometry-aware Instance-reweighted Adversarial Training (ht

Jingfeng 47 Dec 22, 2022
Disentangled Face Attribute Editing via Instance-Aware Latent Space Search, accepted by IJCAI 2021.

Instance-Aware Latent-Space Search This is a PyTorch implementation of the following paper: Disentangled Face Attribute Editing via Instance-Aware Lat

null 67 Dec 21, 2022
TorchDistiller - a collection of the open source pytorch code for knowledge distillation, especially for the perception tasks, including semantic segmentation, depth estimation, object detection and instance segmentation.

This project is a collection of the open source pytorch code for knowledge distillation, especially for the perception tasks, including semantic segmentation, depth estimation, object detection and instance segmentation.

yifan liu 147 Dec 3, 2022
Code for Multiple Instance Active Learning for Object Detection, CVPR 2021

Language: 简体中文 | English Introduction This is the code for Multiple Instance Active Learning for Object Detection, CVPR 2021. Installation A Linux pla

Tianning Yuan 269 Dec 21, 2022