michalfaber / keras_Realtime_Multi-Person_Pose_Estimation

Keras version of Realtime Multi-Person Pose Estimation project
Other
780 stars 372 forks source link

Image is never resized in augmentation #28

Closed anatolix closed 7 years ago

anatolix commented 7 years ago

While testing my py_rmpe_server, I noticed rmpe_dataset_server is never randomly resizes images. I.e. main person on image always fixed size.

params.scale_prob=1;
  float dice = Rand(RAND_MAX) / static_cast <float> (RAND_MAX);
  float scale_multiplier;

  //actually with scale_prob==1 condition is always true -- anatolix
  if(dice > param_.scale_prob) {
    img_temp = img_src.clone();
    scale_multiplier = 1;
  }
  else {
    float dice2 = Rand(RAND_MAX) / static_cast <float> (RAND_MAX);
    scale_multiplier = (param_.scale_max - param_.scale_min) * dice2 + param_.scale_min; //linear shear into [scale_min, scale_max]
  }
michalfaber commented 7 years ago

Yes, original authors decided to disable scaling https://github.com/ZheC/Realtime_Multi-Person_Pose_Estimation/blob/94d48b4aacc8e7e088482ea02392cb50bc9b4232/training/setLayers.py#L457. Feel free to experiment.

anatolix commented 7 years ago

Thanks. Closed this - not a bug.