Skip to content

关于半监督中指标不正确的情况 #161

@lzd-1230

Description

@lzd-1230

在半监督训练开启之后出现了指标掉0,并且val_loss这边一直为0

Image
               epoch,      train/box_loss,      train/obj_loss,      train/cls_loss,   metrics/precision,      metrics/recall,     metrics/mAP_0.5,metrics/mAP_0.5:0.95,        val/box_loss,        val/obj_loss,        val/cls_loss,               x/lr0,               x/lr1,               x/lr2
                   0,            0.026734,           0.0030149,           0.0025407,             0.51456,             0.33336,             0.31076,             0.14092,                   0,                   0,                   0,               6e-05,               6e-05,             0.09946
                   1,            0.024462,           0.0026633,           0.0020524,             0.51016,             0.32951,             0.30117,             0.13794,                   0,                   0,                   0,          0.00012969,          0.00012969,             0.09883
                   2,            0.026195,           0.0026313,           0.0023474,             0.42978,             0.33882,             0.29534,             0.13781,                   0,                   0,                   0,          0.00019905,          0.00019905,            0.098199
                   3,            0.027825,           0.0031602,           0.0024128,             0.51994,             0.30863,             0.29933,             0.13462,                   0,                   0,                   0,          0.00026808,          0.00026808,            0.097568
                   4,            0.024026,           0.0030408,           0.0023448,              0.5138,             0.32009,              0.2979,             0.13442,                   0,                   0,                   0,          0.00033677,          0.00033677,            0.096937
                   5,            0.025969,           0.0035441,           0.0021407,             0.49064,             0.32992,             0.30062,              0.1365,                   0,                   0,                   0,          0.00040513,          0.00040513,            0.096305
                   6,            0.024222,           0.0030058,           0.0020596,             0.42509,             0.34826,             0.29972,             0.13865,                   0,                   0,                   0,          0.00047316,          0.00047316,            0.095673
                   7,            0.024484,           0.0025748,           0.0023783,             0.49233,             0.32885,             0.30761,             0.13922,                   0,                   0,                   0,          0.00054086,          0.00054086,            0.095041
                   8,            0.025334,            0.002859,           0.0020104,             0.50474,             0.32826,             0.30648,              0.1426,                   0,                   0,                   0,          0.00060822,          0.00060822,            0.094408
                   9,            0.025303,           0.0029177,            0.002478,             0.49028,             0.32404,             0.30023,             0.13311,                   0,                   0,                   0,          0.00067525,          0.00067525,            0.093775
                  10,            0.038496,           0.0039158,           0.0042909,             0.49051,             0.32394,             0.29715,             0.13195,                   0,                   0,                   0,           0.0043931,           0.0043931,            0.059393
                  11,            0.044599,           0.0045264,           0.0069123,             0.51159,             0.31886,             0.30169,               0.132,                   0,                   0,                   0,           0.0047817,           0.0047817,            0.055682
                  12,            0.046952,           0.0051121,           0.0058509,             0.47838,             0.33643,             0.30369,             0.13104,                   0,                   0,                   0,           0.0051684,           0.0051684,            0.051968
                  13,            0.062479,           0.0087104,            0.012121,             0.53358,             0.32949,              0.3299,             0.13967,                   0,                   0,                   0,           0.0055531,           0.0055531,            0.048253
                  14,            0.094865,            0.020805,            0.024056,                   0,                   0,                   0,                   0,                   0,                   0,                   0,           0.0059359,           0.0059359,            0.044536
                  15,            0.097925,            0.012116,            0.024947,                   0,                   0,                   0,                   0,                   0,                   0,                   0,           0.0063167,           0.0063167,            0.040817
                  16,            0.090215,           0.0061514,            0.024214,                   0,                   0,                   0,                   0,                   0,                   0,                   0,           0.0066956,           0.0066956,            0.037096
                  17,            0.088175,           0.0061138,            0.022982,                   0,                   0,                   0,                   0,                   0,                   0,                   0,           0.0070725,           0.0070725,            0.033372
                  18,            0.087877,           0.0059195,            0.022877,                   0,                   0,                   0,                   0,                   0,                   0,                   0,           0.0074475,           0.0074475,            0.029647
                  19,            0.085309,           0.0059199,            0.023373,                   0,                   0,                   0,                   0,                   0,                   0,                   0,           0.0078205,           0.0078205,             0.02592
                  20,            0.086314,           0.0063424,            0.022941,                   0,                   0,                   0,                   0,                   0,                   0,                   0,           0.0081916,           0.0081916,            0.022192
                  21,             0.08436,           0.0058643,            0.022787,                   0,                   0,                   0,                   0,                   0,                   0,                   0,           0.0085607,           0.0085607,            0.018461

麻烦大神帮忙看下是否是配置有问题?

# EfficientTeacher by Alibaba Cloud 

# Parameters
project: './runs_yolov5'
adam: False
epochs: 380
weights: '/efficientteacher/runs_yolov5/exp3/weights/best.pt'
prune_finetune: False
linear_lr: True
hyp:
  lr0: 0.01
  hsv_h: 0.015
  hsv_s: 0.7
  hsv_v: 0.4
  lrf: 0.1
  scale: 0.9
  no_aug_epochs: 0
  mixup: 0.1
  warmup_epochs: 3
  burn_epochs: 10  # 添加burn_epochs参数

Model:
  depth_multiple: 1.00  # model depth multiple
  width_multiple: 1.00  # layer channel multiple
  Backbone: 
    name: 'YoloV5'
    activation: 'SiLU'
  Neck: 
    name: 'YoloV5'
    in_channels: [256, 512, 1024]
    out_channels: [256, 512, 1024]
    activation: 'SiLU'
  Head: 
    name: 'YoloV5'
    activation: 'SiLU'
  anchors: [[10,13, 16,30, 33,23],[30,61, 62,45, 59,119],[116,90, 156,198, 373,326]]  # P5/32]
Loss:
  type: 'ComputeLoss'
  cls: 0.3
  obj: 0.7
  anchor_t: 4.0

Dataset:
  data_name: 'gray_sample_raw'
  train: /home/data/lzd/honor_dataset/gray_sample_raw/train/train.txt
  val: /home/data/lzd/honor_dataset/gray_sample_raw/valid/val.txt
  test: data/custom_val.txt # 20288 of 40670 images, submit to https://competitions.codalab.org/competitions/20794^
  target: /home/data/lzd/honor_dataset/vis_good/train/unlabel.txt
  nc: 4  # number of classes
  np: 0 #number of keypoints
  names: ['aa', 'bb', 'cc', 'dd']
  img_size: 768
  # 总共的batch_size
  batch_size: 128

SSOD:
  train_domain: True
  nms_conf_thres: 0.4
  nms_iou_thres: 0.5
  teacher_loss_weight: 1.0
  cls_loss_weight: 0.3
  box_loss_weight: 0.05
  obj_loss_weight: 0.7
  loss_type: 'ComputeStudentMatchLoss'
  ignore_thres_low: 0.2
  ignore_thres_high: 0.4
  uncertain_aug: True
  use_ota: False
  multi_label: False
  ignore_obj: False
  pseudo_label_with_obj: True
  pseudo_label_with_bbox: True
  pseudo_label_with_cls: False
  with_da_loss: False
  da_loss_weights: 0.01
  epoch_adaptor: True
  resample_high_percent: 0.25
  resample_low_percent: 0.99
  ema_rate: 0.999
  cosine_ema: True
  imitate_teacher: False
  ssod_hyp:
    with_gt: False
    mosaic: 1.0
    cutout: 0.5
    autoaugment: 0.5
    scale: 0.8
    degrees: 0.0
    shear: 0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions