DeepRule icon indicating copy to clipboard operation
DeepRule copied to clipboard

what is "lighting" transformation

Open crazysal opened this issue 3 years ago • 1 comments

How were the hard coded values below calculated :

db> coco.py> Line> init()

self._eig_val = np.array([0.2141788, 0.01817699, 0.00341571], dtype=np.float32)
self._eig_vec = np.array([
           [-0.58752847, -0.69563484, 0.41340352],
           [-0.5832747, 0.00994535, -0.81221408],
           [-0.56089297, 0.71832671, 0.41158938]], dtype=np.float32)

These are then used in this function : utils>image.py> lighting_


def lighting_(data_rng, image, alphastd, eigval, eigvec):
    alpha = data_rng.normal(scale=alphastd, size=(3, ))
    image += np.dot(eigvec, eigval * alpha)


Please explain.

crazysal avatar Sep 14 '21 21:09 crazysal

Digging deeper these are values from original coco dataset. And redundant for this paper.

crazysal avatar Sep 14 '21 21:09 crazysal