imgsz warning fix, download function consolidation (#681)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: HaeJin Lee <seareale@gmail.com> Co-authored-by: Ayush Chaurasia <ayush.chaurarsia@gmail.com>
This commit is contained in:
parent
0609561549
commit
899abe9f82
26 changed files with 171 additions and 147 deletions
|
|
@ -120,7 +120,8 @@ class BaseDataset(Dataset):
|
|||
im = np.load(fn)
|
||||
else: # read image
|
||||
im = cv2.imread(f) # BGR
|
||||
assert im is not None, f"Image Not Found {f}"
|
||||
if im is None:
|
||||
raise FileNotFoundError(f"Image Not Found {f}")
|
||||
h0, w0 = im.shape[:2] # orig hw
|
||||
r = self.imgsz / max(h0, w0) # ratio
|
||||
if r != 1: # if sizes are not equal
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue