biosensics / yolov3-tf2

YoloV3 Implemented in Tensorflow 2.0
MIT License
0 stars 0 forks source link

Ultrasound Augmentation - #84 #1

Open abbylindsay opened 2 years ago

abbylindsay commented 2 years ago

https://github.com/biosensics/medical-imaging-pipeline/issues/84

ilkyyldz95 commented 2 years ago

Next goal is to be able to control the FLAGS parameters directly from medical-imaging-pipeline.

In addition to the parameters that are already given in train.py, I have added two more hyperparameters (that do not change the Yolo architecture and training), which improved generalization performance for ultrasound:

1) In yolov3_tf2/models.py: Control the hard-coded l2 regularization parameter on line 49 via FLAGS (say FLAGS.l2_reg) 2) In train.py: Add a small Gaussian noise on the inputs for better generalization. This can be implemented as a layer as below and be controlled via a boolean (say FLAGS.add_training_noise)

    - If FLAGS.add_training_noise, apply the following on x in line 132
    - augmentation = tf.keras.Sequential([tf.keras.layers.GaussianNoise(0.2)])
    - augmentation(x, training=True)