Shortcuts

Lighting

class mmpretrain.datasets.transforms.Lighting(eigval, eigvec, alphastd=0.1, to_rgb=False)[源代码]

使用 AlexNet 风格的 PCA 抖动随机调整图像照明

Required Keys:

  • img

Modified Keys:

  • img

参数:
  • eigval (Sequence[float]) – the eigenvalue of the convariance matrix of pixel values, respectively.

  • eigvec (list[list]) – the eigenvector of the convariance matrix of pixel values, respectively.

  • alphastd (float) – The standard deviation for distribution of alpha. Defaults to 0.1.

  • to_rgb (bool) – Whether to convert img to rgb. Defaults to False.

transform(results)[源代码]

Transform function to resize images.

参数:

results (dict) – Result dict from loading pipeline.

返回:

Lightinged results, ‘img’ key is updated in result dict.

返回类型:

dict

Read the Docs v: latest
Versions
latest
stable
mmcls-1.x
mmcls-0.x
dev
Downloads
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.