BhumikaMak commited on
Commit
524e144
·
verified ·
1 Parent(s): 17171e7

resolved device access

Browse files
Files changed (1) hide show
  1. yolov5.py +1 -2
yolov5.py CHANGED
@@ -177,8 +177,7 @@ class DeepFeatureFactorization:
177
  def dff_nmf(image, target_lyr, n_components):
178
  mean = [0.485, 0.456, 0.406] # Mean for RGB channels
179
  std = [0.229, 0.224, 0.225] # Standard deviation for RGB channels
180
- img, rgb_img_float, input_tensor = image.to(device)
181
- img = cv2.resize(img, (640, 640))
182
  rgb_img_float = np.float32(img) / 255.0
183
  input_tensor = torch.from_numpy(rgb_img_float).permute(2, 0, 1).unsqueeze(0).to(device)
184
 
 
177
  def dff_nmf(image, target_lyr, n_components):
178
  mean = [0.485, 0.456, 0.406] # Mean for RGB channels
179
  std = [0.229, 0.224, 0.225] # Standard deviation for RGB channels
180
+ img = cv2.resize(image, (640, 640))
 
181
  rgb_img_float = np.float32(img) / 255.0
182
  input_tensor = torch.from_numpy(rgb_img_float).permute(2, 0, 1).unsqueeze(0).to(device)
183