Coder Social home page Coder Social logo

liwentomng / boxinstseg Goto Github PK

View Code? Open in Web Editor NEW
399.0 13.0 35.0 10.82 MB

A toolbox for box-supervised instance segmentation.

License: Apache License 2.0

Python 97.90% Dockerfile 0.10% Shell 0.11% C++ 0.41% Cuda 1.48%
box-supervision instance-segmentation mmdetection toolbox

boxinstseg's People

Contributors

circleradon avatar eltociear avatar li-qingyun avatar liwentomng avatar songw-zju avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

boxinstseg's Issues

数据集

大佬,能不能把那个voc增强版的数据集分享给我呀。

loss 'nan',Customised datasets with 1 category in boxinst

I train boxinst with a customised datasets contain 1 category, loss 'nan', but I have visualize the dataset, there is nothing wrong with the annotation.
This is my config file:
base = [
'../base/default_runtime.py'
]

model settings

model = dict(
type='CondInst',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
zero_init_residual=False,
norm_cfg=dict(type='BN', requires_grad=True),
norm_eval=True,
style='pytorch',
init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
neck=dict(
type='FPN',
in_channels=[256, 512, 1024, 2048],
out_channels=256,
start_level=1,
add_extra_convs='on_output', # use P5
num_outs=5,
relu_before_extra_convs=True),
bbox_head=dict(
type='CondInstBoxHead',
num_classes=1,
in_channels=256,
center_sampling=True,
center_sample_radius=1.5,
norm_on_bbox=True,
stacked_convs=4,
feat_channels=256,
strides=[8, 16, 32, 64, 128],
loss_cls=dict(
type='FocalLoss',
use_sigmoid=True,
gamma=2.0,
alpha=0.25,
loss_weight=1.0),
loss_bbox=dict(type='GIoULoss', loss_weight=1.0),
loss_centerness=dict(
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0)),
mask_branch=dict(
type='CondInstMaskBranch',
in_channels=256,
in_indices=[0, 1, 2],
strides=[8, 16, 32],
branch_convs=4,
branch_channels=128,
branch_out_channels=16),
mask_head=dict(
type='CondInstMaskHead',
in_channels=16,
in_stride=8,
out_stride=4,
dynamic_convs=3,
dynamic_channels=8,
disable_rel_coors=False,
bbox_head_channels=256,
sizes_of_interest=[64, 128, 256, 512, 1024],
max_proposals=-1,
topk_per_img=64,
boxinst_enabled=True,
bottom_pixels_removed=10,
pairwise_size=3,
pairwise_dilation=2,
pairwise_color_thresh=0.3,
pairwise_warmup=10000),
# training and testing settings
train_cfg=dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.5,
neg_iou_thr=0.4,
min_pos_iou=0,
ignore_iof_thr=-1),
allowed_border=-1,
pos_weight=-1,
debug=False),
test_cfg=dict(
nms_pre=2000,
min_bbox_size=0,
score_thr=0.05,
nms=dict(type='nms', iou_threshold=0.5),
max_per_img=2000,
output_segm=False))

dataset_type = 'CocoDataset'
data_root = '/data/shjiang/VDD-C/'
img_norm_cfg = dict(
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
train_pipeline = [
dict(type='LoadImageFromFile'),
dict(type='LoadAnnotations', with_bbox=True, with_mask=False),
dict(type='Resize',
img_scale=[(1333, 800), (1333, 768), (1333, 736),
(1333, 704), (1333, 672), (1333, 640)],
multiscale_mode='value',
keep_ratio=True),
dict(type='RandomFlip', flip_ratio=0.5),
dict(type='Normalize', **img_norm_cfg),
dict(type='Pad', size_divisor=32),
dict(type='DefaultFormatBundle'),
dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']),
]
test_pipeline = [
dict(type='LoadImageFromFile'),
dict(
type='MultiScaleFlipAug',
img_scale=(1333, 800),
flip=False,
transforms=[
dict(type='Resize', keep_ratio=True),
dict(type='RandomFlip'),
dict(type='Normalize', **img_norm_cfg),
dict(type='Pad', size_divisor=32),
dict(type='ImageToTensor', keys=['img']),
dict(type='Collect', keys=['img']),
])
]
data = dict(
samples_per_gpu=2,
workers_per_gpu=2,
train=dict(
classes=('diver',),
type=dataset_type,
ann_file=data_root + 'annotations/train.json',
img_prefix=data_root + 'images/',
pipeline=train_pipeline),
val=dict(
classes=('diver',),
type=dataset_type,
ann_file=data_root + 'annotations/val.json',
img_prefix=data_root + 'images/',
pipeline=test_pipeline),
test=dict(
classes=('diver',),
type=dataset_type,
ann_file=data_root + 'annotations/test.json',
img_prefix=data_root + 'images/',
pipeline=test_pipeline))
evaluation = dict(metric=['bbox', 'segm'])

optimizer = dict(type='SGD', lr=0.001, momentum=0.9, weight_decay=0.0001)
optimizer_config = dict(grad_clip=None)

learning policy

lr_config = dict(
policy='step',
warmup='linear',
warmup_iters=500,
warmup_ratio=0.001,
step=[27, 33])

runner = dict(type='EpochBasedRunner', max_epochs=36)
evaluation = dict(interval=1, metric=['bbox', 'segm'])
checkpoint_config = dict(interval=1)
work_dir = './work_dirs/boxinst_vddc_3x'
load_from = None
resume_from = None

Below are my annotation samples:
{"images": [{"file_name": "barbados_scuba_011_A_0352.jpg", "height": 1080, "width": 1920, "id": 20352}, {"file_name": "barbados_scuba_003_B_0845.jpg", "height": 1080, "width": 1920, "id": 60845}]
"annotations": [{"area": 843402, "iscrowd": 0, "bbox": [986, 177, 934, 903], "category_id": 1, "ignore": 0, "segmentation": [], "image_id": 20352, "id": 1}]
"categories": [{"id": 1, "name": "diver"}]}

ValueError: matrix contains invalid numeric entries

Hello, @LiWentomng
I tried to reproduce your paper box2mask, but I had the following problems and the model had a very large loss at the beginning of training. How to solve it?

2023-01-07 12:27:40,129 - mmdet - INFO - Iter [50/368750] lr: 5.000e-06, eta: 3 days, 14:44:25, time: 0.847, data_time: 0.050, memory: 6779, loss_cls: 9.3236, loss_project: 6.2381, loss_levelset: 0.0710, d0.loss_cls: 9.0557, d0.loss_project: 5.5436, d0.loss_levelset: 0.0670, d1.loss_cls: 9.3925, d1.loss_project: 5.5199, d1.loss_levelset: 0.0640, d2.loss_cls: 9.1847, d2.loss_project: 5.7577, d2.loss_levelset: 0.0549, d3.loss_cls: 9.3142, d3.loss_project: 5.8749, d3.loss_levelset: 0.0656, d4.loss_cls: 9.4000, d4.loss_project: 5.8713, d4.loss_levelset: 0.0596, d5.loss_cls: 9.0998, d5.loss_project: 6.2049, d5.loss_levelset: 0.0682, d6.loss_cls: 9.1544, d6.loss_project: 6.1733, d6.loss_levelset: 0.0779, d7.loss_cls: 9.0938, d7.loss_project: 6.3329, d7.loss_levelset: 0.0836, d8.loss_cls: 8.7211, d8.loss_project: 6.4827, d8.loss_levelset: 0.0856, loss: 152.4366, grad_norm: 307.3523

Traceback (most recent call last):
File "./tools/train.py", line 242, in
main()
File "./tools/train.py", line 231, in main
train_detector(
File "/home/ubuntu/wzy/BoxInstSeg/mmdet/apis/train.py", line 244, in train_detector
runner.run(data_loaders, cfg.workflow)
File "/home/ubuntu/miniconda3/envs/boxinstseg/lib/python3.8/site-packages/mmcv/runner/iter_based_runner.py", line 144, in run
iter_runner(iter_loaders[i], **kwargs)
File "/home/ubuntu/miniconda3/envs/boxinstseg/lib/python3.8/site-packages/mmcv/runner/iter_based_runner.py", line 64, in train
outputs = self.model.train_step(data_batch, self.optimizer, **kwargs)
File "/home/ubuntu/miniconda3/envs/boxinstseg/lib/python3.8/site-packages/mmcv/parallel/distributed.py", line 63, in train_step
output = self.module.train_step(*inputs[0], **kwargs[0])
File "/home/ubuntu/wzy/BoxInstSeg/mmdet/models/detectors/base.py", line 248, in train_step
losses = self(**data)
File "/home/ubuntu/miniconda3/envs/boxinstseg/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/home/ubuntu/miniconda3/envs/boxinstseg/lib/python3.8/site-packages/mmcv/runner/fp16_utils.py", line 116, in new_func
return old_func(*args, **kwargs)
File "/home/ubuntu/wzy/BoxInstSeg/mmdet/models/detectors/base.py", line 172, in forward
return self.forward_train(img, img_metas, **kwargs)
File "/home/ubuntu/wzy/BoxInstSeg/mmdet/models/detectors/maskformer.py", line 104, in forward_train
losses = self.panoptic_head.forward_train(x, img_metas, gt_bboxes,
File "/home/ubuntu/wzy/BoxInstSeg/mmdet/models/dense_heads/box2mask_head.py", line 440, in forward_train
losses = self.loss(all_cls_scores, all_mask_preds, all_lst_feats,gt_labels, gt_masks,
File "/home/ubuntu/miniconda3/envs/boxinstseg/lib/python3.8/site-packages/mmcv/runner/fp16_utils.py", line 205, in new_func
return old_func(*args, **kwargs)
File "/home/ubuntu/wzy/BoxInstSeg/mmdet/models/dense_heads/box2mask_head.py", line 203, in loss
losses_cls, loss_project, loss_levelset = multi_apply(
File "/home/ubuntu/wzy/BoxInstSeg/mmdet/core/utils/misc.py", line 30, in multi_apply
return tuple(map(list, zip(*map_results)))
File "/home/ubuntu/wzy/BoxInstSeg/mmdet/models/dense_heads/box2mask_head.py", line 239, in loss_single
num_total_pos,num_total_neg) = self.get_targets(cls_scores_list, mask_preds_list,
File "/home/ubuntu/wzy/BoxInstSeg/mmdet/models/dense_heads/box2mask_head.py", line 142, in get_targets
neg_inds_list) = multi_apply(self._get_target_single, cls_scores_list,
File "/home/ubuntu/wzy/BoxInstSeg/mmdet/core/utils/misc.py", line 30, in multi_apply
return tuple(map(list, zip(*map_results)))
File "/home/ubuntu/wzy/BoxInstSeg/mmdet/models/dense_heads/box2mask_head.py", line 167, in _get_target_single
assign_result = self.assigner.assign(cls_score, mask_pred,
File "/home/ubuntu/wzy/BoxInstSeg/mmdet/core/bbox/assigners/mask_hungarian_assigner.py", line 119, in assign
matched_row_inds, matched_col_inds = linear_sum_assignment(cost)
ValueError: matrix contains invalid numeric entries

Instance segmenation for lanes , roads

@LiWentomng thanks for thsi toolbox it shall be very helpfull to the community, just had few queries

  1. can we use this to train instance segmentation using BDD100k dataset for all the scenes
  2. Panpotic based segmentation dataset
    Thanks in adavance

Custom dataset in coco format, Commands to run

First of all very cool work.

I would like to know for my dataset in coco format with just one class, I would like to try your model.

  1. Do you recommend any changes other than num_classes?

  2. Also what is num_things_classes=80,num_stuff_classes=0, in box2Mask?

  3. Also the commands to run are the same as mmdetection right?

about Box2Mask-C

Hello, thanks for your contribution~ I have a issue about Box2Mask-C and BoxLevelSet:
I noticed in the paper that there seems to be no difference between Box2Mask-C and BoxLevelset (except the local consistency module ). However, why does Box2Mask-C outperform BoxLevelset? Are there any differences between the two? Can you provide the configuration file for Box2Mask-C?

数据集

大佬,能不能把iSAID数据集再分享给我呀。

No module named 'tree_filter_cuda'

Hi,
I tried installing your package inside an nvidia cuda docker, I made sure to install correct and cuda supporting versions of pytorch and mmcv-full, and used the bash setup.sh command to install your package, but when I tried to run it, I receive the following error:
File "/*****.py", line 5, in <module> from mmdet.apis import init_detector File "/app/BoxInstSeg/mmdet/apis/__init__.py", line 2, in <module> from .inference import (async_inference_detector, inference_detector, File "/app/BoxInstSeg/mmdet/apis/inference.py", line 13, in <module> from mmdet.datasets import replace_ImageToTensor File "/app/BoxInstSeg/mmdet/datasets/__init__.py", line 9, in <module> from .utils import (NumClassCheckHook, get_loading_pipeline, File "/app/BoxInstSeg/mmdet/datasets/utils.py", line 11, in <module> from mmdet.models.roi_heads.mask_heads import FusedSemanticHead File "/app/BoxInstSeg/mmdet/models/__init__.py", line 7, in <module> from .dense_heads import * # noqa: F401,F403 File "/app/BoxInstSeg/mmdet/models/dense_heads/__init__.py", line 5, in <module> from .box_solov2_head import BoxSOLOv2Head File "/app/BoxInstSeg/mmdet/models/dense_heads/box_solov2_head.py", line 13, in <module> from mmdet.ops.tree_filter.modules.tree_filter import MinimumSpanningTree, TreeFilter2D File "/app/BoxInstSeg/mmdet/ops/tree_filter/modules/tree_filter.py", line 5, in <module> from ..functions.mst import mst File "/app/BoxInstSeg/mmdet/ops/tree_filter/functions/mst.py", line 7, in <module> import tree_filter_cuda as _C ModuleNotFoundError: No module named 'tree_filter_cuda'
Any advice on what I did wrong in the installation?
Thanks!

system details:
CUDA: 11.1.1
cudnn: 8
ubuntu: 20.04
python 3.9
pytorch 1.10.1
mmcv-full: 1.5.0

the config file of Box2Mask-C

Hello author,

I followed your instructions to implement Box2Mask-C (incorporating the local consistency module into the config file of boxlevelset). However, the results obtained on the VOC2012 dataset under Res-50 are not as high as the ones mentioned in the original paper (37.2 mAP vs 38.0 mAP).
Could you please provide the complete config file for Box2Mask-C that includes the relevant hyperparameters?

Thank you.

pairwise和tree_filter安装失败

windows10,完全按照install.md安装环境,torch、mmcv、python版本都是一致的,但是编译cu算子失败,请问代码是否可以在windows上运行?

config file for Box2Mask-T Swin-L backbone?

Will you be providing the config file for Box2Mask-T Swin-L backbone (the only missing config in the table) anytime soon? I was excited to try training with that architecture. I could try to figure it out, but just checking first to see if you have it available? Thanks!

Box2Mask failing for custom class of just one class.

I get the following error:


file "/opt/conda/lib/python3.8/site-packages/torch/nn/functional.py", line 2805, in cross_entropy
    return torch._C._nn.cross_entropy_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index)
RuntimeError: weight tensor should be defined either for all 2 classes or no classes but got weight tensor of shape: [81] at /tmp/pip-req-build-g2m34a_4/aten/src/THCUNN/generic/ClassNLLCriterion.cu:43

Attaching my config:

_base_ = [
    '../_base_/datasets/coco_panoptic.py', '../_base_/default_runtime.py'
]

model = dict(
    type='Box2Mask',
    backbone=dict(
        type='ResNet',
        depth=101,
        num_stages=4,
        out_indices=(0, 1, 2, 3),
        frozen_stages=-1,
        norm_cfg=dict(type='BN', requires_grad=False),
        norm_eval=True,
        style='pytorch',
        init_cfg=dict(type='Pretrained', checkpoint='https://download.pytorch.org/models/resnet101-b641f3a9.pth')),
    panoptic_head=dict(
        type='Box2MaskHead',
        in_channels=[256, 512, 1024, 2048],  # pass to pixel_decoder inside
        strides=[4, 8, 16, 32],
        feat_channels=256,
        out_channels=256,
        num_things_classes=1,
        num_stuff_classes=0,
        num_queries=100,
        num_transformer_feat_level=3,
        pixel_decoder=dict(
            type='MSDeformAttnPixelDecoder',
            num_outs=3,
            norm_cfg=dict(type='GN', num_groups=32),
            act_cfg=dict(type='ReLU'),
            encoder=dict(
                type='DetrTransformerEncoder',
                num_layers=6,
                transformerlayers=dict(
                    type='BaseTransformerLayer',
                    attn_cfgs=dict(
                        type='MultiScaleDeformableAttention',
                        embed_dims=256,
                        num_heads=8,
                        num_levels=3,
                        num_points=4,
                        im2col_step=64,
                        dropout=0.0,
                        batch_first=False,
                        norm_cfg=None,
                        init_cfg=None),
                    ffn_cfgs=dict(
                        type='FFN',
                        embed_dims=256,
                        feedforward_channels=1024,
                        num_fcs=2,
                        ffn_drop=0.0,
                        act_cfg=dict(type='ReLU', inplace=True)),
                    operation_order=('self_attn', 'norm', 'ffn', 'norm')),
                init_cfg=None),
            positional_encoding=dict(
                type='SinePositionalEncoding', num_feats=128, normalize=True),
            init_cfg=None),
        enforce_decoder_input_project=False,
        positional_encoding=dict(
            type='SinePositionalEncoding', num_feats=128, normalize=True),
        transformer_decoder=dict(
            type='DetrTransformerDecoder',
            return_intermediate=True,
            num_layers=9,
            transformerlayers=dict(
                type='DetrTransformerDecoderLayer',
                attn_cfgs=dict(
                    type='MultiheadAttention',
                    embed_dims=256,
                    num_heads=8,
                    attn_drop=0.0,
                    proj_drop=0.0,
                    dropout_layer=None,
                    batch_first=False),
                ffn_cfgs=dict(
                    embed_dims=256,
                    feedforward_channels=2048,
                    num_fcs=2,
                    act_cfg=dict(type='ReLU', inplace=True),
                    ffn_drop=0.0,
                    dropout_layer=None,
                    add_identity=True),
                feedforward_channels=2048,
                operation_order=('cross_attn', 'norm', 'self_attn', 'norm',
                                 'ffn', 'norm')),
            init_cfg=None),
        loss_cls=dict(
            type='CrossEntropyLoss',
            use_sigmoid=False,
            loss_weight=2.0,
            reduction='mean',
            class_weight=[1.0] * 80 + [0.1]),
        loss_mask=dict(
            type='LevelsetLoss',
            loss_weight=1.0),
        loss_box=dict(
            type='BoxProjectionLoss',
            loss_weight=5.0)),
    panoptic_fusion_head=dict(
        type='MaskFormerFusionHead',
        num_things_classes=1,
        num_stuff_classes=0,
        loss_panoptic=None,
        init_cfg=None),
    train_cfg=dict(
        assigner=dict(
            type='MaskHungarianAssigner',
            cls_cost=dict(type='ClassificationCost', weight=2.0),
            dice_cost=dict(type='BoxMatchingCost', weight=5.0, pred_act=True, eps=1.0)),
        sampler=dict(type='MaskPseudoSampler')),
    test_cfg=dict(
        panoptic_on=False,
        semantic_on=False,
        instance_on=True,
        max_per_image=1500,
        iou_thr=0.8,
        filter_low_score=True),
    init_cfg=None)

# dataset settings
image_size = (1024, 1024)
img_norm_cfg = dict(
    mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
pad_cfg = dict(img=(128, 128, 128), masks=0, seg=255)
train_pipeline = [
    dict(type='LoadImageFromFile', to_float32=True),
    dict(type='LoadAnnotations', with_bbox=True, with_mask=False),
    dict(type='GenerateBoxMask'), #genenrate box mask
    dict(type='RandomFlip', flip_ratio=0.5),
    # large scale jittering
    dict(
        type='Resize',
        img_scale=image_size,
        ratio_range=(0.1, 2.0),
        multiscale_mode='range',
        keep_ratio=True),
    dict(
        type='RandomCrop',
        crop_size=image_size,
        crop_type='absolute',
        recompute_bbox=True,
        allow_negative_crop=True),
    dict(type='FilterAnnotations', min_gt_bbox_wh=(1e-5, 1e-5), keep_empty=True),
    dict(type='Pad', size=image_size, pad_val=pad_cfg),
    dict(type='Normalize', **img_norm_cfg),
    dict(type='DefaultFormatBundle', img_to_float=True),
    dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels', 'gt_masks']),
]
test_pipeline = [
    dict(type='LoadImageFromFile'),
    dict(
        type='MultiScaleFlipAug',
        img_scale=(1333, 800),
        flip=False,
        transforms=[
            dict(type='Resize', keep_ratio=True),
            dict(type='RandomFlip'),
            dict(type='Pad', size_divisor=32, pad_val=pad_cfg),
            dict(type='Normalize', **img_norm_cfg),
            dict(type='ImageToTensor', keys=['img']),
            dict(type='Collect', keys=['img']),
        ])
]
dataset_type = 'CocoDataset'
data_root = '/data/coco/'
classes = ('cell',)
data = dict(
    _delete_=True,
    samples_per_gpu=2,
    workers_per_gpu=2,
    train=dict(
        type=dataset_type,
        ann_file='/netscratch/nkhalid/vikas/Dataset/LiveCell/annotations/livecell_coco_train.json',
        img_prefix='/netscratch/nkhalid/vikas/Dataset/LiveCell/images/train',
        pipeline=train_pipeline,
        classes = classes),
    val=dict(
        type=dataset_type,
        ann_file='/netscratch/nkhalid/vikas/Dataset/LiveCell/annotations/livecell_coco_test.json',
        img_prefix='/netscratch/nkhalid/vikas/Dataset/LiveCell/images/test',
        pipeline=test_pipeline,
        classes = classes),
    test=dict(
       type=dataset_type,
       ann_file='/netscratch/nkhalid/vikas/Dataset/LiveCell/annotations/livecell_coco_val.json',
       img_prefix='/netscratch/nkhalid/vikas/Dataset/LiveCell/images/val',
       pipeline=test_pipeline,
       classes = classes))

embed_multi = dict(lr_mult=1.0, decay_mult=0.0)
# optimizer
optimizer = dict(
    type='AdamW',
    lr=0.0001,
    weight_decay=0.05,
    eps=1e-8,
    betas=(0.9, 0.999),
    paramwise_cfg=dict(
        custom_keys={
            'backbone': dict(lr_mult=0.1, decay_mult=1.0),
            'query_embed': embed_multi,
            'query_feat': embed_multi,
            'level_embed': embed_multi,
        },
        norm_decay_mult=0.0))
optimizer_config = dict(grad_clip=dict(max_norm=0.01, norm_type=2))

lr_config = dict(
    policy='step',
    gamma=0.1,
    by_epoch=False,
    step=[327778, 355092],
    warmup='linear',
    warmup_by_epoch=False,
    warmup_ratio=1.0,  # no warmup
    warmup_iters=10)

max_iters = 368750
runner = dict(type='IterBasedRunner', max_iters=max_iters)

log_config = dict(
    interval=50,
    hooks=[
        dict(type='TextLoggerHook', by_epoch=False),
        dict(type='TensorboardLoggerHook', by_epoch=False)
    ])

interval = 5000
workflow = [('train', interval)]
checkpoint_config = dict(
    by_epoch=False, interval=interval, save_last=True, max_keep_ckpts=3)
dynamic_intervals = [(max_iters // interval * interval + 1, max_iters)]

evaluation = dict(interval=interval, dynamic_intervals=dynamic_intervals, metric=['bbox', 'segm'])
find_unused_parameters = True
work_dir = './work_dirs/box2mask_r101_coco_50e'
load_from = '/netscratch/rajashekar/SAIL/BoxInst/models/box2mask_r101_coco_50e.pth'


No module named 'mmdet.ops.pairwise.pairwise_ext'

(openmmlab) @AMaX:/data0/ZHL/project/DET2D/rope2D/BoxInstSeg$ CUDA_VISIBLE_DEVICES=5 python tools/train.py configs/boxinst/boxinst_r50_fpn_1x_coco.py
Traceback (most recent call last):
File "tools/train.py", line 17, in
from mmdet.apis import init_random_seed, set_random_seed, train_detector
File "/data0/ZHL/project/DET2D/rope2D/BoxInstSeg/mmdet/apis/init.py", line 2, in
from .inference import (async_inference_detector, inference_detector,
File "/data0/ZHL/project/DET2D/rope2D/BoxInstSeg/mmdet/apis/inference.py", line 13, in
from mmdet.datasets import replace_ImageToTensor
File "/data0/ZHL/project/DET2D/rope2D/BoxInstSeg/mmdet/datasets/init.py", line 9, in
from .utils import (NumClassCheckHook, get_loading_pipeline,
File "/data0/ZHL/project/DET2D/rope2D/BoxInstSeg/mmdet/datasets/utils.py", line 11, in
from mmdet.models.roi_heads.mask_heads import FusedSemanticHead
File "/data0/ZHL/project/DET2D/rope2D/BoxInstSeg/mmdet/models/init.py", line 7, in
from .dense_heads import * # noqa: F401,F403
File "/data0/ZHL/project/DET2D/rope2D/BoxInstSeg/mmdet/models/dense_heads/init.py", line 4, in
from .condinst_head import CondInstBoxHead, CondInstSegmHead, CondInstMaskBranch, CondInstMaskHead
File "/data0/ZHL/project/DET2D/rope2D/BoxInstSeg/mmdet/models/dense_heads/condinst_head.py", line 14, in
from mmdet.ops.pairwise import pairwise_nlog
File "/data0/ZHL/project/DET2D/rope2D/BoxInstSeg/mmdet/ops/pairwise/init.py", line 1, in
from .pairwise import pairwise_nlog
File "/data0/ZHL/project/DET2D/rope2D/BoxInstSeg/mmdet/ops/pairwise/pairwise.py", line 3, in
from .pairwise_ext import pairwise_nlog_forward, pairwise_nlog_backward
ModuleNotFoundError: No module named 'mmdet.ops.pairwise.pairwise_ext'

Someone meet same problem? Where is pairwise_ext?

box2mask_c导出onnx报错

我使用box2mask_r50_lsj_8x2_50e_duanmian.py配置文件训练模型,模型训练完成后导出onnx报错,在debug过程中发现会跳转到maskformer.py中,但是跳转到其中的self.onnx_export()函数时,函数为空,raise NotImplementedError。
请问是我使用错误,还是代码并未实现呢?single_stage.py中是有onnx_export.py实现的

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.