5e2f713a0601c85bb68723cd9e52a0884f517879,test/color/test_hls.py,TestRgbToHls,test_batch_rgb_to_hls,#TestRgbToHls#,39

Before Change


                             [[8., 8.],
                              [8., 8.]]])  // 3x2x2

        expected = torch.tensor([[[0.0641, 0.07138],
                                  [0.07138, 0.07138]],

                                 [[0.0569, 0.0588],
                                  [0.0588, 0.0588]],

                                 [[0.4483, 0.4667],
                                  [0.4667, 0.4667]]])  // 3x2x2
        f = kornia.color.RgbToHls()
        data = data.repeat(2, 1, 1, 1)  // 2x3x2x2
        expected = expected.repeat(2, 1, 1, 1)  // 2x3x2x2

After Change



    def test_batch_rgb_to_hls(self):

        data = torch.rand(3,5,5)

        // OpenCV
        data_cv = data.numpy().transpose(1, 2, 0)
        expected = cv2.cvtColor(data_cv, cv2.COLOR_RGB2HLS)

        expected[:,:,0] = 2*math.pi*expected[:,:,0]/360.
        expected = expected.transpose(2,0,1)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 14

Instances


Project Name: arraiy/torchgeometry
Commit Name: 5e2f713a0601c85bb68723cd9e52a0884f517879
Time: 2019-11-13
Author: priba@cvc.uab.cat
File Name: test/color/test_hls.py
Class Name: TestRgbToHls
Method Name: test_batch_rgb_to_hls


Project Name: arraiy/torchgeometry
Commit Name: 1c467cd116eb68d1de7d881fe24bb7123234c252
Time: 2019-11-13
Author: priba@cvc.uab.cat
File Name: test/color/test_hsv.py
Class Name: TestRgbToHsv
Method Name: test_gradcheck


Project Name: arraiy/torchgeometry
Commit Name: 1c467cd116eb68d1de7d881fe24bb7123234c252
Time: 2019-11-13
Author: priba@cvc.uab.cat
File Name: test/color/test_hls.py
Class Name: TestRgbToHls
Method Name: test_gradcheck