Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSD MobileNet V2 recipe #2002

Open
Budelon opened this issue May 24, 2024 · 1 comment
Open

SSD MobileNet V2 recipe #2002

Budelon opened this issue May 24, 2024 · 1 comment

Comments

@Budelon
Copy link

Budelon commented May 24, 2024

馃挕 Your Question

I've read the docs on the COCO SSD recipe. The recipe train the model with

  • DetectionHSV:
    prob: 1.0 # probability to apply HSV transform
    hgain: 5 # HSV transform hue gain (randomly sampled from [-hgain, hgain])
    sgain: 30 # HSV transform saturation gain (randomly sampled from [-sgain, sgain])
    vgain: 30 # HSV transform value gain (randomly sampled from [-vgain, vgain])

But it validates without the HSV transform.
val_dataset_params:
data_dir: /data/coco # root path to coco data
subdir: images/val2017 # sub directory path of data_dir containing the train data.
json_file: instances_val2017.json # path to coco train json file, data_dir/annotations/train_json_file.
input_dim: [320, 320]
cache_annotations: True
ignore_empty_annotations: True
transforms:
- DetectionPaddedRescale:
input_dim: ${dataset_params.val_dataset_params.input_dim}
- DetectionTargetsFormatTransform:
input_dim: ${dataset_params.val_dataset_params.input_dim}
output_format: LABEL_NORMALIZED_CXCYWH
class_inclusion_list:
max_num_samples:
with_crowd: True

Questions:

  1. Why does the validation not use the HSV transform?
  2. If i want to run the model trained on COCO, should i transform the BGR image to HSV before running?

Thanks.

Versions

No response

@BloodAxe
Copy link
Collaborator

There is no mistake.A DetectionHSV is a augmentation transformation, which takes image in BGR colorspace, transform it to HSV colorspace and apply random shifts to H,S and V components and then convert image back to BGR. This is data augmentation transformation aimed to improve model robustness to color changes. On validation you don't want to have any sort of randomness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants