当前位置:网站首页>README_Albumentations
README_Albumentations
2022-08-09 21:51:00 【InfoQ】
一、文档:
二、Installation
三、Keypoints augmentation Example:
1. Import the required libraries
2. Define an augmentation pipeline.
3. Read images, keypoints and class_labels
4. Pass an image and keypoints to the augmentation pipeline and receive augmented images and points.
四、List of augmentations
1、Spatial-level transforms (空间变换)
- Affine(scale=None, translate_percent=None, translate_px=None, rotate=None, shear=None, interpolation=1, mask_interpolation=0, cval=0, cval_mask=0, mode=0, fit_output=False, always_apply=False, p=0.5)-support keypoints
- Perspective(scale=(0.05, 0.1), keep_size=True, pad_mode=0, pad_val=0, mask_pad_val=0, fit_output=False, interpolation=1, always_apply=False, p=0.5)(support keypoints)
- PiecewiseAffine
(scale=(0.03, 0.05), nb_rows=4, nb_cols=4, interpolation=1, mask_interpolation=0, cval=0, cval_mask=0, mode='constant', absolute_scale=False, always_apply=False, keypoints_threshold=0.01, p=0.5)
(support keypoints)
- ShiftScaleRotate(shift_limit=0.0625, scale_limit=0.1, rotate_limit=45, interpolation=1, border_mode=4, value=None, mask_value=None, shift_limit_x=None, shift_limit_y=None, always_apply=False, p=0.5) (support keypoints)
- ElasticTransform#图像弹性变形
- Crop(x_min=0, y_min=0, x_max=1024, y_max=1024, always_apply=False, p=1.0)(support keypoints)
- CenterCrop
(height, width, always_apply=False, p=1.0)
(support keypoints)
- CropAndPad
(px=None, percent=None, pad_mode=0, pad_cval=0, pad_cval_mask=0, keep_size=True, sample_independently=True, interpolation=1, always_apply=False, p=1.0)
(support keypoints)
- CropNonEmptyMaskIfExists
(height, width, ignore_values=None, ignore_channels=None, always_apply=False, p=1.0)
(support keypoints)
- RandomCrop(height, width, always_apply=False, p=1.0)(support keypoints)
- RandomCropNearBBox(max_part_shift=(0.3,0.3), cropping_box_key='cropping_bbox', always_apply=False, p=1.0)(support keypoints)
- RandomResizedCrop
(height, width, scale=(0.08, 1.0), ratio=(0.75, 1.3333333333333333), interpolation=1, always_apply=False, p=1.0)
(support keypoints)
- RandomSizedCrop
(min_max_height, height, width, w2h_ratio=1.0, interpolation=1, always_apply=False, p=1.0)
(support keypoints)
min_max_height
参数:表示裁剪高的大小限制,格式为
[int
,
int]
height
参数:剪裁并调整大小后的高
width
参数:参数:剪裁并调整大小后的宽
w2h_ratio
参数:剪裁比例,默认为
1.0
p
参数:表示应用此变换的概率,默认为
1.0
- Flip.apply
(self, img, d=0, **params)
(support keypoints)
- HorizontalFlip(support keypoints)
- VerticalFlip(support keypoints)
- RandomRotate90(support keypoints)
p
参数:表示应用此变换的概率,默认为
0.5
- Rotate
(limit=90, interpolation=1, border_mode=4, value=None, mask_value=None, always_apply=False, p=0.5)
(support keypoints)
limit
参数:表示旋转的范围限制,范围为(
-limit,limit
),默认为(
-90,90
)
p
参数:表示应用此变换的概率,默认为
0.5
- SafeRotate
(limit=90, interpolation=1, border_mode=4, value=None, mask_value=None, always_apply=False, p=0.5)
(support keypoints)
- LongestMaxSize
(max_size=1024, interpolation=1, always_apply=False, p=1)
(support keypoints)
- RandomScale
(scale_limit=0.1, interpolation=1, always_apply=False, p=0.5)
(support keypoints)
scale_limit
参数:表示缩放范围,为(
1-scale_limit,1+scale_limit
)
,
默认为(
0.9,1.1
)
p
参数:表示应用此变换的概率,默认为
0.5
- Resize
(height, width, interpolation=1, always_apply=False, p=1)
(support keypoints)
- SmallestMaxSize
(max_size=1024, interpolation=1, always_apply=False, p=1)
(support keypoints)
max_size
- PadIfNeeded
(min_height=1024, min_width=1024, pad_height_divisor=None, pad_width_divisor=None, position=<PositionType.CENTER: 'center'>, border_mode=4, value=None, mask_value=None, always_apply=False, p=1.0)
(support keypoints)
- Lambda
(image=None, mask=None, keypoint=None, bbox=None, name=None, always_apply=False, p=1.0)
(support keypoints)
image
参数:图像变换函数
mask
参数:掩码变换函数
keypoint
参数:关键点变换函数
bbox
参数:边框变换函数
always_apply
参数:是否这个变换总是应用
p
参数:应用此变换的概率,默认为
1.0
- NoOp(support keypoints)#什么也不做
- Transpose(support keypoints)
- CoarseDropout
- GridDistortion
- GridDropout
- MaskDropout
- OpticalDistortion
- RandomGridShuffle
- RandomSizedBBoxSafeCrop
2、Pixel-level transforms (support any additional targets) (像素变换)
- Blur
- CLAHE
- ChannelDropout
- ChannelShuffle
- ColorJitter
- Downscale
- Emboss
- Equalize
- FDA
- FancyPCA
- FromFloat
- GaussNoise
- GaussianBlur
- GlassBlur
- HistogramMatching
- HueSaturationValue
- ISONoise
- ImageCompression
- InvertImg
- MedianBlur
- MotionBlur
- MultiplicativeNoise
- Normalize
- PixelDistributionAdaptation
- Posterize
- RGBShift
- RandomBrightnessContrast
- RandomFog
- RandomGamma
- RandomRain
- RandomShadow
- RandomSnow
- RandomSunFlare
- RandomToneCurve
- Sharpen
- Solarize
- Superpixels
- TemplateTransform
- ToFloat
- ToGray
- ToSepia
边栏推荐
猜你喜欢
在“企业通讯录”的盲区,融云的边界与分寸
hdu 1503 Advanced Fruits(最长公共子序列的应用)
CVPR22 Oral|通过多尺度token聚合分流自注意力,代码已开源
Flask之路由(app.route)详解
Shanghai Konan SmartRocket series product introduction (3): SmartRocket iVerifier computer interlocking system verification tool
6 rules to sanitize your code
POWER SOURCE ETA埃塔电源维修FHG24SX-U概述
4D Summary: 38 Knowledge Points of Distributed Systems
Reinforcement Learning Weekly Issue 57: DL-DRL, FedDRL & Deep VULMAN
腾讯继续挥舞降本增效“大刀”,外包员工免费餐饮福利被砍了
随机推荐
String hashing (2014 SERC J question)
【EF】 更新条目时出错。有关详细信息,请参见内部异常。[通俗易懂]
国内手机厂商曾为它大打出手,如今它却最先垮台……
台风生成,广州公交站场积极开展台风防御安全隐患排查
简单问题窥见数学
Flask之路由(app.route)详解
TRUNCATE表之后空间未释放
AI+Medical: Using Neural Networks for Medical Image Recognition and Analysis
Metasploit常用命令、技术功能模块
Deceptive Dice(期望计算)
mysql 找不到或无法加载已注册的 .Net Framework Data Provider。
BulkInsert方法实现批量导入
Simple questions peek into mathematics
JSON 基本使用
knn到底咋回事?
“稚晖君”为2022昇腾AI创新大赛打call&nbsp;期待广大开发者加入
Jensen (琴生) 不等式
宝塔实测-搭建LightPicture开源图床系统
Interpretation of the paper (DropEdge) "DropEdge: Towards Deep Graph Convolutional Networks on Node Classification"
2022 首期线下 Workshop!面向应用开发者们的数据应用体验日来了 | TiDB Workshop Day