GithubHelp home page GithubHelp logo

shinya7y / universenet Goto Github PK

View Code? Open in Web Editor NEW
419.0 16.0 53.0 32.72 MB

USB: Universal-Scale Object Detection Benchmark (BMVC 2022)

License: Apache License 2.0

Python 99.11% Dockerfile 0.04% Shell 0.85%
object-detection pytorch mmdetection waymo-open-dataset

universenet's People

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  avatar  avatar  avatar

universenet's Issues

when use model inference, RuntimeError: input image is smaller than kernel.How can I solve the error?

Thanks for your error report and we appreciate it a lot.

Checklist

  1. I have searched related issues but cannot get the expected help.
  2. The bug has not been fixed in the latest version.

Describe the bug
A clear and concise description of what the bug is.

Reproduction

  1. What command or script did you run?
A placeholder for the command.
  1. Did you make any modifications on the code or config? Did you understand what you have modified?
  2. What dataset did you use?

Environment

  1. Please run python mmdet/utils/collect_env.py to collect necessary environment information and paste it here.
  2. You may add addition that may be helpful for locating the problem, such as
    • How you installed PyTorch [e.g., pip, conda, source]
    • Other environment variables that may be related (such as $PATH, $LD_LIBRARY_PATH, $PYTHONPATH, etc.)

Error traceback
If applicable, paste the error trackback here.

A placeholder for trackback.

Bug fix
If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!

Have you tried PAA assign as anchor assigner?

As shown in Table 10(USB: Universal-Scale Object Detection Benchmark), PAA has a better performance than atss. Actually, the difference between paa and atss is the way of IOU awareness and anchor assigner(atss uses atss assigner, paa uses paa assigner based on maxiou assigner). and according to the paper of PAA, the 2 step anchor assigner PAA contributes more to the better performance. However, I got a worse result when I combined paa assigner and vfocal dense head(maybe a wrong implemention?). Have you tried paa assigner on GFL(vfocal is similiar with gfl)? Will paa assigner produce a worse result?

Test picture

Hello, when I test with pictures, I find that only the bounding box and accuracy are displayed in the test results, and the test category is not displayed. What should I do?

image

loss nan error when set filter_empty_gt=False

Hello, thanks for your outstanding work!

I want to train universeNet with the images which do not contain objects, so I set filter_empty_gt=False, but the loss is nan.

I have reduced the learning rate and tried to increase the warm-up step, but they are not work.

I have also tried to train my data with other models like cascade rcnn or faster rcnn with the same setting, the losses for them are both normal.

So, how can i fix this issue?

Very low AP when using cfg.data.val to build the dataset

Hi, I'm currently trying universenet on Waymo dataset. I used your WaymoCOCO code to generate f0 training and validation set.

After training, I run tools/test.py with the default setting. It loads 4038 samples for validation, and the performance is good. However, when I change this line to dataset = build_dataset(cfg.data.val), the progress bar shows only 3945 samples, and the resulting AP is very very low (close to 0).

I checked the config file - the cfg.data.val has exactly the same field as cfg.data.test.

What was going wrong in this case?

Pretrained model for universenet in Nightowls dataset

Hi,shinya7y!

Is it the pretrained model for universenet in Nightowls dataset available?I can't find the file "load_from = '../data/checkpoints/universenet50_fp16_8x2_lr0001_mstrain_640_1280_7e_waymo_open_20200526_080330/epoch_7_for_nightowls.pth'" in your project.

Thanks a lot!

loss nan error

Thank you for your great work! But the loss is always nan when I train my own dataset.Can you help me?

This is my config:

# This config shows an example for small-batch fine-tuning from a COCO model.
# Please see also the MMDetection tutorial below.
# https://github.com/shinya7y/UniverseNet/blob/master/docs/tutorials/finetune.md

_base_ = [
    '../_base_/models/universenet50_2008.py',
    # Please change to your dataset config.
    # '../_base_/datasets/coco_detection_mstrain_480_960.py',
    '../_base_/schedules/schedule_1x.py',
    '../_base_/default_runtime.py'
]

model = dict(
    pretrained=None,
    # SyncBN is used in universenet50_2008.py
    # If total batch size < 16, please change BN settings of backbone.
    backbone=dict(
        norm_cfg=dict(type='BN', requires_grad=True), norm_eval=True),
    # iBN of SEPC is used in universenet50_2008.py
    # If samples_per_gpu < 4, please change BN settings of SEPC.
    neck=[
        dict(
            type='FPN',
            in_channels=[256, 512, 1024, 2048],
            out_channels=256,
            start_level=1,
            add_extra_convs='on_output',
            # add_extra_convs=True,
            # extra_convs_on_inputs=False,
            num_outs=5),
        dict(
            type='SEPC',
            out_channels=256,
            stacked_convs=4,
            pconv_deform=False,
            lcconv_deform=True,
            ibn=True,
            pnorm_eval=True,  # please set True if samples_per_gpu < 4
            lcnorm_eval=True,  # please set True if samples_per_gpu < 4
            lcconv_padding=1)
    ],
    bbox_head=dict(num_classes=6))  # please change for your dataset




dataset_type = 'MyDataset'

data_root = '/cache/my_dataset/'
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),

    
    dict(type='Resize', img_scale=[(4000, 2000), (4000, 2400)],
         multiscale_mode='range', 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=[(4000, 2000), (4000, 2200), (4000, 2400)],
        flip=True,
        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(
    imgs_per_gpu=1,
    workers_per_gpu=1,
    train=dict(
        type=dataset_type,
        
        ann_file=data_root + 'annotations/instances_train2017.json',
        img_prefix=data_root + 'train2017/',
      
        pipeline=train_pipeline),
    val=dict(
        type=dataset_type,
        ann_file=data_root + 'annotations/instances_val2017.json',
        img_prefix=data_root + 'val2017/',
        pipeline=test_pipeline),
    test=dict(
        type=dataset_type,
        ann_file=data_root + 'annotations/instances_val2017.json',
        img_prefix=data_root + 'val2017/',
        pipeline=test_pipeline))
evaluation = dict(interval=1, metric='bbox')




# Optimal total batch size depends on dataset size and learning rate.
# If image sizes are not so large and you have enough GPU memory,
# larger samples_per_gpu will be preferable.
# data = dict(samples_per_gpu=2)

# This config assumes that total batch size is 8 (4 GPUs * 2 samples_per_gpu).
# Since the batch size is half of other configs,
# the learning rate is also halved according to the Linear Scaling Rule.
# Tuning learning rate around it will be important on other datasets.
# For example, you can try 0.005 first, then 0.002, 0.01, 0.001, and 0.02.
optimizer = dict(type='SGD', lr=1.25e-3, momentum=0.9, weight_decay=0.0001)
# optimizer_config = dict(_delete_=True, grad_clip=dict(max_norm=35, norm_type=2))

# If fine-tuning from COCO, gradients should not be so large.
# It is natural to train models without gradient clipping.
optimizer_config = dict(_delete_=True, grad_clip=None)

# If fine-tuning from COCO, a warmup_iters of 500 or less may be enough.
# This setting is not so important unless losses are unstable during warmup.
lr_config = dict(warmup_iters=500)

fp16 = dict(loss_scale=512.)

# Please set `load_from` to use a COCO pre-trained model.
load_from = '/cache/universenet50_2008_fp16_4x4_mstrain_480_960_2x_coco_20200815_epoch_24-81356447.pth'  # noqa

RuntimeError: The size of tensor a (4) must match the size of tensor b (7) at non-singleton dimension 1

we use my own dataset, the dataset has 10 classes, and i change num_classes=10 in the model config file.
when i start train ,after few epoches, i met this error.
File "/home/detmodel/UniverseNet/mmdet/models/losses/iou_loss.py", line 344, in forward
return (pred * weight).sum() # 0
RuntimeError: The size of tensor a (4) must match the size of tensor b (7) at non-singleton dimension 1.
can you give me some suggestions.
Thanks a alot.
ps: my dataset works well with cascade rcnn.

For universenet is it possible to use pretrained weights while changing the class number from 80 to 1?

The config file I am using is this

The pretrained I am using is this (The default pretrained)

So the problem I was having is I modified my dataset and distribute as the coco format and then change the coco.py accordingly. I changed the model's bbox_head's num_classes parameter to 1 (default was 80) as my dataset has only one class and start the training. The training had started but at the middle of epoch 1 it stopped giving me a tensor mismatch type runtimeError. Then I changed the model's bbox_head's num_classes back to default (80) and again started the training and this time I got no error while completing epoch 1. So, I was thinking the error was created because of using pretrained weight and my question is that is there any way I can bypass that meaning use pretrained weight as well as change the num_classes from 80 to 1.

PS: I have one short query , how is the batch size is selected could you please point me the direction in the config file where it is defined? (I am using google colab)

Request for NightOwls Model weights

Came across your repository and it is really helpful and intuitive.

With recent major focus on night time object detection, would it be possible for you to share your NightOwls model weights?

It would mean a great deal to further research efforts.
Thanks! :)

YOLOv4 of mmdet. version

Hi, Thanks for your great work first. I would like to know if Yolov4 has been implemented and where can I find it? Thank you!

How to calculate mAP for each category for waymo 2D object detection

I would like to know how to get mAP for each class according to waymo metrics. I tried seeing waymo's official quick start page but the ground truth is available for the entire validation set. I would like to test for only a subset of it, will the annotations file be okay for ground truth?

Weirdly low AP at early epochs of fine-tuning. Could you please share your log file ?

hello, The config file I am using is default .
And the pretrained I am using is coco pretrained weight you shared.
I set the num_classes =10 , and the coco.py was modified at the same time.
but get very poor result . AP is zero or just 0.001 .
I don't know if I do something wrong.
(ps: I have tried the same hyperparameter settings in another object detection network in mmdetection , but it works well )

Train other datasets

Hello, when I was training my own data set in coco format, because my data set did not have a mask, I put if Ann ['area '] < = 0 or W < 1 or H < 1 in line 133 of mmdet.datasets.coco.py change to if w < 1 or H < 1, but there are the following errors:

2021-10-03 16:08:17,352 - mmcv - INFO - Reducer buckets have been rebuilt in this iteration.
2021-10-03 16:11:31,063 - mmdet - INFO - Epoch [1][50/367] lr: 9.890e-04, eta: 8:37:53, time: 4.262, data_time: 0.331, memory: 9512, kpt_loss_point_cls: 1.1301, kpt_loss_point_offset: 0.0854, bbox_loss_cls: 1.1355, bbox_loss_bbox: 0.6738, loss: 3.0248
2021-10-03 16:14:54,468 - mmdet - INFO - Epoch [1][100/367] lr: 1.988e-03, eta: 8:22:37, time: 4.068, data_time: 0.006, memory: 9512, kpt_loss_point_cls: 0.9700, kpt_loss_point_offset: 0.0889, bbox_loss_cls: 1.1190, bbox_loss_bbox: 0.6012, loss: 2.7791
2021-10-03 16:18:09,565 - mmdet - INFO - Epoch [1][150/367] lr: 2.987e-03, eta: 8:08:37, time: 3.902, data_time: 0.007, memory: 9512, kpt_loss_point_cls: 0.8648, kpt_loss_point_offset: 0.0878, bbox_loss_cls: 1.1331, bbox_loss_bbox: 0.5795, loss: 2.6652
2021-10-03 16:21:27,164 - mmdet - INFO - Epoch [1][200/367] lr: 3.986e-03, eta: 8:01:29, time: 3.952, data_time: 0.007, memory: 9541, kpt_loss_point_cls: 0.7960, kpt_loss_point_offset: 0.0863, bbox_loss_cls: 1.1200, bbox_loss_bbox: 0.5794, loss: 2.5817
2021-10-03 16:24:47,569 - mmdet - INFO - Epoch [1][250/367] lr: 4.985e-03, eta: 7:57:13, time: 4.008, data_time: 0.007, memory: 9541, kpt_loss_point_cls: 0.8372, kpt_loss_point_offset: 0.0843, bbox_loss_cls: 1.1260, bbox_loss_bbox: 0.5690, loss: 2.6165
2021-10-03 16:28:09,630 - mmdet - INFO - Epoch [1][300/367] lr: 5.984e-03, eta: 7:53:54, time: 4.041, data_time: 0.007, memory: 9541, kpt_loss_point_cls: 0.6968, kpt_loss_point_offset: 0.0834, bbox_loss_cls: 1.1199, bbox_loss_bbox: 0.5709, loss: 2.4710
2021-10-03 16:31:30,102 - mmdet - INFO - Epoch [1][350/367] lr: 6.983e-03, eta: 7:50:03, time: 4.009, data_time: 0.006, memory: 10288, kpt_loss_point_cls: 0.8081, kpt_loss_point_offset: 0.0854, bbox_loss_cls: 1.1074, bbox_loss_bbox: inf, loss: inf
2021-10-03 16:32:38,249 - mmdet - INFO - Saving checkpoint at 1 epochs
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 420/420, 5.1 task/s, elapsed: 83s, ETA: 0s

2021-10-03 16:34:11,594 - mmdet - INFO - Evaluating bbox...
Loading and preparing results...
DONE (t=0.14s)
creating index...
index created!
Running per image evaluation...
Evaluate annotation type bbox
DONE (t=2.98s).
Accumulating evaluation results...
DONE (t=1.01s).
Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.000
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=1000 ] = 0.000
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=1000 ] = 0.000
Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=1000 ] = 0.000
Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=1000 ] = 0.000
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=1000 ] = 0.000
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.002
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=300 ] = 0.002
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=1000 ] = 0.002
Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=1000 ] = 0.000
Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=1000 ] = 0.001
Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=1000 ] = 0.004
2021-10-03 16:34:15,975 - mmdet - INFO - Exp name: bvr_retinanet_x101_fpn_dcn_mstrain_400_1200_20e_coco.py
2021-10-03 16:34:15,975 - mmdet - INFO - Epoch(val) [1][210] bbox_mAP: 0.0000, bbox_mAP_50: 0.0000, bbox_mAP_75: 0.0000, bbox_mAP_s: 0.0000, bbox_mAP_m: 0.0000, bbox_mAP_l: 0.0000, bbox_mAP_copypaste: 0.000 0.000 0.000 0.000 0.000 0.000

How should I modify it, My training model is configs/bvr/bvr_retinanet_x101_fpn_dcn_mstrain_400_1200_20e_coco.py.

Welcome update to OpenMMLab 2.0

Welcome update to OpenMMLab 2.0

I am Vansin, the technical operator of OpenMMLab. In September of last year, we announced the release of OpenMMLab 2.0 at the World Artificial Intelligence Conference in Shanghai. We invite you to upgrade your algorithm library to OpenMMLab 2.0 using MMEngine, which can be used for both research and commercial purposes. If you have any questions, please feel free to join us on the OpenMMLab Discord at https://discord.gg/amFNsyUBvm or add me on WeChat (van-sin) and I will invite you to the OpenMMLab WeChat group.

Here are the OpenMMLab 2.0 repos branches:

OpenMMLab 1.0 branch OpenMMLab 2.0 branch
MMEngine 0.x
MMCV 1.x 2.x
MMDetection 0.x 、1.x、2.x 3.x
MMAction2 0.x 1.x
MMClassification 0.x 1.x
MMSegmentation 0.x 1.x
MMDetection3D 0.x 1.x
MMEditing 0.x 1.x
MMPose 0.x 1.x
MMDeploy 0.x 1.x
MMTracking 0.x 1.x
MMOCR 0.x 1.x
MMRazor 0.x 1.x
MMSelfSup 0.x 1.x
MMRotate 1.x 1.x
MMYOLO 0.x

Attention: please create a new virtual environment for OpenMMLab 2.0.

Pre-trained checkpoints on Waymo Open Dataset

Hi!

Thank you for doing such a wonderful work!

I saw you also did experiments on 2D object detection of Waymo Open Dataset. Do you plan to release the pre-trained detector weights? Sorry but I think I can not found the checkpoints in this repo?

Thank you!

Group error

Thanks for your error report and we appreciate it a lot.

Checklist

  1. I have searched related issues but cannot get the expected help.
  2. The bug has not been fixed in the latest version.

Describe the bug
when I trained with 1 gpu, this process interrupted with the following issue:
image

Reproduction

  1. What command or script did you run?
python3 tools/train.py configs/xray/universalnet_50_xray.py

  1. Did you make any modifications on the code or config? Did you understand what you have modified?
    I just use universalnet_r50 with change the number of classes and change sample per gpu to 4.
  2. What dataset did you use?
    I just use my custom dataset inherited from coco dataset with 14 class.
    Environment
    follow your requirements

the training duration of relationnet ++

Hello, what's the training duration of relationnet ++? Why does it take me so much time to train with a single GPU on the coco dataset??

2021-05-08 14:40:36,476 - mmdet - INFO - workflow: [('train', 1)], max: 20 epochs
2021-05-08 14:43:38,226 - mmdet - INFO - Epoch [1][50/58633] lr: 9.890e-04, eta: 49 days, 7:57:52, time: 3.635, data_time: 0.054, memory: 9028, kpt_loss_point_cls: 1.1461, kpt_loss_point_offset: 0.0875, bbox_loss_cls: 1.2137, bbox_loss_bbox: 0.7130, loss: 3.1603
2021-05-08 14:47:02,436 - mmdet - INFO - Epoch [1][100/58633] lr: 1.988e-03, eta: 52 days, 9:05:35, time: 4.084, data_time: 0.006, memory: 9566, kpt_loss_point_cls: 1.1375, kpt_loss_point_offset: 0.0869, bbox_loss_cls: 1.2221, bbox_loss_bbox: 0.7509, loss: 3.1974
2021-05-08 14:50:23,529 - mmdet - INFO - Epoch [1][150/58633] lr: 2.987e-03, eta: 53 days, 2:39:41, time: 4.022, data_time: 0.005, memory: 9566, kpt_loss_point_cls: 1.1513, kpt_loss_point_offset: 0.0866, bbox_loss_cls: 1.2318, bbox_loss_bbox: 0.7351, loss: 3.2049
2021-05-08 14:53:27,445 - mmdet - INFO - Epoch [1][200/58633] lr: 3.986e-03, eta: 52 days, 7:26:42, time: 3.678, data_time: 0.005, memory: 9566, kpt_loss_point_cls: 1.1245, kpt_loss_point_offset: 0.0859, bbox_loss_cls: 1.1802, bbox_loss_bbox: 0.6615, loss: 3.0520
2021-05-08 14:56:36,176 - mmdet - INFO - Epoch [1][250/58633] lr: 4.985e-03, eta: 52 days, 2:10:09, time: 3.775, data_time: 0.005, memory: 9566, kpt_loss_point_cls: 1.0461, kpt_loss_point_offset: 0.0853, bbox_loss_cls: 1.2102, bbox_loss_bbox: 0.7289, loss: 3.0704

I try to fine-tuning from a COCO pre-trained model,but the loss is always nan.

When I replace the datasets config, the train loss is always "nan". Can you help me, thx!
I only change the path of new datasets and other configurations are the same as your example.

model = dict(
type='GFL',
backbone=dict(
type='Res2Net',
depth=50,
scales=4,
base_width=26,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=True),
norm_eval=True,
style='pytorch',
dcn=dict(type='DCN', deform_groups=1, fallback_on_stride=False),
stage_with_dcn=(False, False, False, True)),
neck=[
dict(
type='FPN',
in_channels=[256, 512, 1024, 2048],
out_channels=256,
start_level=1,
add_extra_convs='on_output',
num_outs=5),
dict(
type='SEPC',
out_channels=256,
stacked_convs=4,
pconv_deform=False,
lcconv_deform=True,
ibn=True,
pnorm_eval=True,
lcnorm_eval=True,
lcconv_padding=1)
],
bbox_head=dict(
type='GFLSEPCHead',
num_classes=6,
in_channels=256,
stacked_convs=0,
feat_channels=256,
anchor_generator=dict(
type='AnchorGenerator',
ratios=[1.0],
octave_base_scale=8,
scales_per_octave=1,
strides=[8, 16, 32, 64, 128]),
loss_cls=dict(
type='QualityFocalLoss',
use_sigmoid=True,
beta=2.0,
loss_weight=1.0),
loss_dfl=dict(type='DistributionFocalLoss', loss_weight=0.25),
reg_max=16,
loss_bbox=dict(type='GIoULoss', loss_weight=2.0)))
train_cfg = dict(
assigner=dict(type='ATSSAssigner', topk=9),
allowed_border=-1,
pos_weight=-1,
debug=False)
test_cfg = dict(
nms_pre=1000,
min_bbox_size=0,
score_thr=0.05,
nms=dict(type='nms', iou_threshold=0.6),
max_per_img=100)
dataset_type = 'Tile'
data_root = '/media/xieyi/b8f66a88-09dd-4190-b817-493aef1819d5/xieyi/Detetection/datasets/tianchi_tile/tc_dataset/'
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),
dict(
type='Resize',
img_scale=[(1333, 480), (1333, 960)],
multiscale_mode='range',
keep_ratio=True),
dict(type='RandomFlip', flip_ratio=0.5),
dict(
type='Normalize',
mean=[123.675, 116.28, 103.53],
std=[58.395, 57.12, 57.375],
to_rgb=True),
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',
mean=[123.675, 116.28, 103.53],
std=[58.395, 57.12, 57.375],
to_rgb=True),
dict(type='Pad', size_divisor=32),
dict(type='ImageToTensor', keys=['img']),
dict(type='Collect', keys=['img'])
])
]
data = dict(
samples_per_gpu=4,
workers_per_gpu=2,
train=dict(
type='Tile',
ann_file=
'/media/xieyi/b8f66a88-09dd-4190-b817-493aef1819d5/xieyi/Detetection/datasets/tianchi_tile/tc_dataset/annotations/instances_train2017.json',
img_prefix=
'/media/xieyi/b8f66a88-09dd-4190-b817-493aef1819d5/xieyi/Detetection/datasets/tianchi_tile/tc_dataset/train2017/',
pipeline=[
dict(type='LoadImageFromFile'),
dict(type='LoadAnnotations', with_bbox=True),
dict(
type='Resize',
img_scale=[(1333, 480), (1333, 960)],
multiscale_mode='range',
keep_ratio=True),
dict(type='RandomFlip', flip_ratio=0.5),
dict(
type='Normalize',
mean=[123.675, 116.28, 103.53],
std=[58.395, 57.12, 57.375],
to_rgb=True),
dict(type='Pad', size_divisor=32),
dict(type='DefaultFormatBundle'),
dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels'])
]),
val=dict(
type='Tile',
ann_file=
'/media/xieyi/b8f66a88-09dd-4190-b817-493aef1819d5/xieyi/Detetection/datasets/tianchi_tile/tc_dataset/annotations/instances_val2017.json',
img_prefix=
'/media/xieyi/b8f66a88-09dd-4190-b817-493aef1819d5/xieyi/Detetection/datasets/tianchi_tile/tc_dataset/val2017/',
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',
mean=[123.675, 116.28, 103.53],
std=[58.395, 57.12, 57.375],
to_rgb=True),
dict(type='Pad', size_divisor=32),
dict(type='ImageToTensor', keys=['img']),
dict(type='Collect', keys=['img'])
])
]),
test=dict(
type='Tile',
ann_file=
'/media/xieyi/b8f66a88-09dd-4190-b817-493aef1819d5/xieyi/Detetection/datasets/tianchi_tile/tc_dataset/annotations/instances_val2017.json',
img_prefix=
'/media/xieyi/b8f66a88-09dd-4190-b817-493aef1819d5/xieyi/Detetection/datasets/tianchi_tile/tc_dataset/val2017/',
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',
mean=[123.675, 116.28, 103.53],
std=[58.395, 57.12, 57.375],
to_rgb=True),
dict(type='Pad', size_divisor=32),
dict(type='ImageToTensor', keys=['img']),
dict(type='Collect', keys=['img'])
])
]))
evaluation = dict(interval=1, metric='bbox')
optimizer = dict(type='SGD', lr=0.05, momentum=0.9, weight_decay=0.0001)
optimizer_config = dict(grad_clip=None)
lr_config = dict(
policy='step',
warmup='linear',
warmup_iters=1000,
warmup_ratio=0.001,
step=[8, 11])
total_epochs = 12
checkpoint_config = dict(interval=1)
log_config = dict(interval=50, hooks=[dict(type='TextLoggerHook')])
dist_params = dict(backend='nccl')
log_level = 'INFO'
load_from = '/media/xieyi/b8f66a88-09dd-4190-b817-493aef1819d5/xieyi/Detetection/coco_model/res2net50_v1b_26w_4s-3cf99910_mmdetv2.pth'
resume_from = None
workflow = [('train', 1)]
fp16 = dict(loss_scale=512.0)
work_dir = './work_dirs/universenet50_2008_fp16_4x2_mstrain_480_960_1x_smallbatch_finetuning_example'
gpu_ids = range(0, 1)

Multi gpu training

Is it possible to train with more than one gpu. When I try running bash tools/dist_train.sh configs/gflv2/gflv2_visdrone.py 2 I get AttributeError: 'ConfigDict' object has no attribute 'total_epochs'

UniverseNet Pretrained on Manga109

Hello there,

I can't seem to find any checkpoints for the UniverseNet other than checkpoints from COCO pretraining. Are there any checkpoints available that have been pretrained on the Manga109 dataset?

UniverseNet using experience

A pretty work and I have carefully read your paper! There is a question:
we use your UniverseNet on our benchmark for a different task and do lots of works. So far, we have found your network was fifty-fifty with Faster RCNN in the Detectron2. So, I'd like to ask you what are the significant improvements in your model that allow the network to be "universal" and have better performance than Faster RCNN or other networks.

f'{obj_type} is not in the {registry.name} registry') KeyError: 'WaymoOpenDataset is not in the dataset registry' and python -m torch.distributed.launch --nproc_per_node=$GPUS --master_port=$PORT \ SyntaxError: invalid syntax

Hello @shinya7y

1st error = f'{obj_type} is not in the {registry.name} registry') KeyError: 'WaymoOpenDataset is not in the dataset registry'

Executed statement:
! python /content/drive/Shareddrives/som1/Universenet/UniverseNet/tools/train.py /content/drive/Shareddrives/som1/Universenet/UniverseNet/configs/waymo_open/retinanet_r50_fpn_fp16_4x4_1x_waymo_open_f0.py

2nd error = python -m torch.distributed.launch --nproc_per_node=$GPUS --master_port=$PORT \ SyntaxError: invalid syntax

Executed statement
! bash python /content/drive/Shareddrives/som1/Universenet/UniverseNet/tools/dist_train.sh

I am working on 2d detection on the waymo open dataset I am getting the 1st error when I execute the train.py file in tools folder and 2nd error is when dist_train.sh is executed.

For the first error I am working in google colab environement I am not unable to modify the files installed.
Is there any way I can solve this issue I have seen this issue and I also know that the waymo open dataset is declared in mmdet in the "UniverseNet" folder but when I am executing the system is verifying from the installed library in "/usr/local/lib/python3.7/dist-packages/mmcv/utils/registry.py"

Am I executing the scripts properly?

for the second one I don't have much idea about pytorch so I am not sure what should be passed to port values, etc....

dist_train.sh file while executing

CONFIG='/content/drive/Shareddrives/som1/Universenet/UniverseNet/configs/waymo_open/retinanet_r50_fpn_fp16_4x4_1x_waymo_open_f0.py'
GPUS= 1
PORT=1000

PYTHONPATH="/content/drive/Shareddrives/som1/Universenet/UniverseNet/mmdet/"

python -m torch.distributed.launch --nproc_per_node=$GPUS --master_port=$PORT
$(dirname "$0")/train.py $CONFIG --launcher pytorch ${@:3}

I have less practical experience in ML so any help would be appretiated.
Thank you

Hardware requirements for trainning Waymo Open Dataset

image

In the README said that "A machine with 208-416 GB of CPU memory is needed for full training as of MMDetection v2.0.", CPU memory that you means in this situation is RAM?, so what's the requirements of GPU, CPU, RAM, Hard disk for training this dataset, thank you so much for answering this quetion!

visualization technologies

Does mmdetection support some visualization technologies, such as attention map or heatmap in transformer

There are many memory occupation in GPU0

Hi,

I trained detector in my dataset using 'universenet50_gfl_xxx.py' and there were many memory occupation in GPU0
image

And I noticed that extra memory occupation occured when the program go to the lines:

model = MMDistributedDataParallel( model.cuda(), device_ids=[torch.cuda.current_device()], broadcast_buffers=False, find_unused_parameters=find_unused_parameters)

Also I try to train detector with cascade rcnn. There are no memory occupation

Could you provide some suggestion?

Thanks!

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.