Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
torch example input now shown resized to size=640 and also now a multiple of P6 stride 64 (see #2722 (comment))
  • Loading branch information
glenn-jocher committed Apr 7, 2021
1 parent bfba802 commit ccbe7de
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions models/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,13 @@ def autoshape(self):
return self

def forward(self, imgs, size=640, augment=False, profile=False):
# Inference from various sources. For height=720, width=1280, RGB images example inputs are:
# Inference from various sources. For height=640, width=1280, RGB images example inputs are:
# filename: imgs = 'data/samples/zidane.jpg'
# URI: = 'https://github.com/ultralytics/yolov5/releases/download/v1.0/zidane.jpg'
# OpenCV: = cv2.imread('image.jpg')[:,:,::-1] # HWC BGR to RGB x(720,1280,3)
# PIL: = Image.open('image.jpg') # HWC x(720,1280,3)
# numpy: = np.zeros((720,1280,3)) # HWC
# torch: = torch.zeros(16,3,720,1280) # BCHW
# OpenCV: = cv2.imread('image.jpg')[:,:,::-1] # HWC BGR to RGB x(640,1280,3)
# PIL: = Image.open('image.jpg') # HWC x(640,1280,3)
# numpy: = np.zeros((640,1280,3)) # HWC
# torch: = torch.zeros(16,3,320,640) # BCHW (scaled to size=640)
# multiple: = [Image.open('image1.jpg'), Image.open('image2.jpg'), ...] # list of images

t = [time_synchronized()]
Expand Down

0 comments on commit ccbe7de

Please sign in to comment.