glenn-jocher commited on
Commit
306fc01
1 Parent(s): 53bfcbe

Update Autoshape forward header (#4271)

Browse files
Files changed (1) hide show
  1. models/common.py +2 -2
models/common.py CHANGED
@@ -232,10 +232,10 @@ class AutoShape(nn.Module):
232
  @torch.no_grad()
233
  def forward(self, imgs, size=640, augment=False, profile=False):
234
  # Inference from various sources. For height=640, width=1280, RGB images example inputs are:
235
- # filename: imgs = 'data/images/zidane.jpg' # str or PosixPath
236
  # URI: = 'https://ultralytics.com/images/zidane.jpg'
237
  # OpenCV: = cv2.imread('image.jpg')[:,:,::-1] # HWC BGR to RGB x(640,1280,3)
238
- # PIL: = Image.open('image.jpg') # HWC x(640,1280,3)
239
  # numpy: = np.zeros((640,1280,3)) # HWC
240
  # torch: = torch.zeros(16,3,320,640) # BCHW (scaled to size=640, 0-1 values)
241
  # multiple: = [Image.open('image1.jpg'), Image.open('image2.jpg'), ...] # list of images
 
232
  @torch.no_grad()
233
  def forward(self, imgs, size=640, augment=False, profile=False):
234
  # Inference from various sources. For height=640, width=1280, RGB images example inputs are:
235
+ # file: imgs = 'data/images/zidane.jpg' # str or PosixPath
236
  # URI: = 'https://ultralytics.com/images/zidane.jpg'
237
  # OpenCV: = cv2.imread('image.jpg')[:,:,::-1] # HWC BGR to RGB x(640,1280,3)
238
+ # PIL: = Image.open('image.jpg') or ImageGrab.grab() # HWC x(640,1280,3)
239
  # numpy: = np.zeros((640,1280,3)) # HWC
240
  # torch: = torch.zeros(16,3,320,640) # BCHW (scaled to size=640, 0-1 values)
241
  # multiple: = [Image.open('image1.jpg'), Image.open('image2.jpg'), ...] # list of images