Tao-toolkit Yolov4_tiny Custom dataset

• Hardware: RXT Titan
• Network Type: Yolo_v4_tiny
• TLT Version: nvcr.io/nvidia/tao/tao-toolkit-tf:v3.21.11-tf1.15.5-py3
• Training spec file:

random_seed: 42
yolov4_config {
  big_anchor_shape: "[(260.69, 172.35), (125.91, 81.47), (72.27, 42.42)]"
  mid_anchor_shape: "[(30.80, 71.40), (38.97, 26.86), (18.88, 17.11)]"
  box_matching_iou: 0.25
  matching_neutral_box_iou: 0.5
  arch: "cspdarknet_tiny"
  loss_loc_weight: 1.0
  loss_neg_obj_weights: 1.0
  loss_class_weights: 1.0
  label_smoothing: 0.0
  big_grid_xy_extend: 0.05
  mid_grid_xy_extend: 0.05
  freeze_bn: false
  #freeze_blocks: 0
  force_relu: false
}
training_config {
  batch_size_per_gpu: 8
  num_epochs: 80
  enable_qat: false
  checkpoint_interval: 10
  learning_rate {
    soft_start_cosine_annealing_schedule {
      min_learning_rate: 1e-7
      max_learning_rate: 1e-4
      soft_start: 0.3
    }
  }
  regularizer {
    type: L1
    weight: 3e-5
  }
  optimizer {
    adam {
      epsilon: 1e-7
      beta1: 0.9
      beta2: 0.999
      amsgrad: false
    }
  }
  pretrain_model_path: "/data/phuongdd/cv_samples_v1.3.0/yolo_v4_tiny/pretrained_cspdarknet_tiny/pretrained_object_detection_vcspdarknet_tiny/cspdarknet_tiny.hdf5"
}
eval_config {
  average_precision_mode: SAMPLE
  batch_size: 8
  matching_iou_threshold: 0.5
}
nms_config {
  confidence_threshold: 0.001
  clustering_iou_threshold: 0.5
  force_on_cpu: true
  top_k: 200
}
augmentation_config {
  hue: 0.1
  saturation: 1.5
  exposure:1.5
  vertical_flip:0
  horizontal_flip: 0.5
  jitter: 0.3
  output_width: 1248
  output_height: 384
  output_channel: 3
  randomize_input_shape_period: 10
  mosaic_prob: 0.5
  mosaic_min_ratio:0.2
}
dataset_config {
  data_sources: {
      tfrecords_path: "/data/phuongdd/cv_samples_v1.3.0/yolo_v4_tiny/train_tfrecords_1/train*"
      image_directory_path: "/data/phuongdd/cv_samples_v1.3.0/yolo_v4_tiny/data_person/train"
  }
  include_difficult_in_training: true
  image_extension: "png"

  target_class_mapping {
      key: "person"
      value: "person"
  }
  validation_data_sources: {
      tfrecords_path: "/data/phuongdd/cv_samples_v1.3.0/yolo_v4_tiny/valid_tfrecords_1/valid*"
      image_directory_path: "/data/phuongdd/cv_samples_v1.3.0/yolo_v4_tiny/data_person/valid"
  }
}

I met same error when training both of extension (‘jpg’ and ‘png’). That’s is format image error.
I has 2 files training logs with 2 different format:

For png:
yolov4_tiny_train_log_png.txt (74.0 KB)

For jpg:
yolov4_tiny_train_log_jpg.txt (73.6 KB)

Anyone help me ?

I solved this problem.

Could you please share what is changed? Thanks.

That’s is simple error which I forgot to resize height image is multiple of 38.

OK, thanks for the sharing~

Not sure if it is typo. Should be multiple of 32.
(YOLOv4-tiny — TAO Toolkit 3.22.02 documentation)

oh, sorry.That’s a typing error

No problem. Thanks a lot!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.