MCPcopy Create free account
hub / github.com/AllentDan/LibtorchSegmentation / VerticalFlip

Method VerticalFlip

src/utils/Augmentations.cpp:78–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78Data Augmentations::VerticalFlip(Data mData, float probability) {
79 float rand_number = RandomNum<float>(0, 1);
80 if (rand_number <= probability) {
81
82 cv::flip(mData.image, mData.image, 0);
83 cv::flip(mData.mask, mData.mask, 0);
84
85 }
86 return mData;
87}
88
89Data Augmentations::RandomScaleRotate(Data mData, float probability, float rotate_limit, float scale_limit, int interpolation, int boder_mode) {
90 float rand_number = RandomNum<float>(0, 1);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected