Removed unused variables found by pylint.
authorAlexander Smorkalov <alexander.smorkalov@xperience.ai>
Thu, 4 Mar 2021 14:05:15 +0000 (17:05 +0300)
committerAlexander Smorkalov <alexander.smorkalov@xperience.ai>
Tue, 9 Mar 2021 07:56:45 +0000 (10:56 +0300)
samples/dnn/virtual_try_on.py

index e4f2e518ec965a722a7efce6162bde904fc0bbaa..f10e6c601a269d80beea0e2bca1e090923900cdb 100644 (file)
@@ -112,7 +112,7 @@ class BilinearFilter(object):
             out[yy] = np.round(np.sum(img[ymin : ymin + ymax, 0:out.shape[1]] * k[:, np.newaxis], axis=0))
 
     def imaging_resample(self, img, xsize, ysize):
-        height, width, *args = img.shape
+        height, width = img.shape[0:2]
         bounds_horiz, kk_horiz, ksize_horiz = self._precompute_coeffs(width, xsize)
         bounds_vert, kk_vert, ksize_vert    = self._precompute_coeffs(height, ysize)
 
@@ -232,7 +232,6 @@ class CpVton(object):
         return Li
 
     def _prepare_to_transform(self, out_h=256, out_w=192, grid_size=5):
-        grid = np.zeros([out_h, out_w, 3], dtype=np.float32)
         grid_X, grid_Y = np.meshgrid(np.linspace(-1, 1, out_w), np.linspace(-1, 1, out_h))
         grid_X = np.expand_dims(np.expand_dims(grid_X, axis=0), axis=3)
         grid_Y = np.expand_dims(np.expand_dims(grid_Y, axis=0), axis=3)
@@ -397,7 +396,7 @@ class CorrelationLayer(object):
 
     def getMemoryShapes(self, inputs):
         fetureAShape = inputs[0]
-        b, c, h, w = fetureAShape
+        b, _, h, w = fetureAShape
         return [[b, h * w, h, w]]
 
     def forward(self, inputs):