@@ -143,7 +143,7 @@ def check_dataset(dict):
143143 if val and len (val ):
144144 val = [os .path .abspath (x ) for x in (val if isinstance (val , list ) else [val ])] # val path
145145 if not all (os .path .exists (x ) for x in val ):
146- print ('\n WARNING: Dataset not found, nonexistant paths: %s' % [* val ])
146+ print ('\n WARNING: Dataset not found, nonexistent paths: %s' % [* val ])
147147 if s and len (s ): # download script
148148 print ('Downloading %s ...' % s )
149149 if s .startswith ('http' ) and s .endswith ('.zip' ): # URL
@@ -158,7 +158,7 @@ def check_dataset(dict):
158158
159159
160160def make_divisible (x , divisor ):
161- # Returns x evenly divisble by divisor
161+ # Returns x evenly divisible by divisor
162162 return math .ceil (x / divisor ) * divisor
163163
164164
@@ -169,9 +169,9 @@ def labels_to_class_weights(labels, nc=80):
169169
170170 labels = np .concatenate (labels , 0 ) # labels.shape = (866643, 5) for COCO
171171 classes = labels [:, 0 ].astype (np .int ) # labels = [class xywh]
172- weights = np .bincount (classes , minlength = nc ) # occurences per class
172+ weights = np .bincount (classes , minlength = nc ) # occurrences per class
173173
174- # Prepend gridpoint count (for uCE trianing )
174+ # Prepend gridpoint count (for uCE training )
175175 # gpi = ((320 / 32 * np.array([1, 2, 4])) ** 2 * 3).sum() # gridpoints per image
176176 # weights = np.hstack([gpi * len(labels) - weights.sum() * 9, weights * 9]) ** 0.5 # prepend gridpoints to start
177177
@@ -820,7 +820,7 @@ def print_results(k):
820820 k , dist = kmeans (wh / s , n , iter = 30 ) # points, mean distance
821821 k *= s
822822 wh = torch .tensor (wh , dtype = torch .float32 ) # filtered
823- wh0 = torch .tensor (wh0 , dtype = torch .float32 ) # unflitered
823+ wh0 = torch .tensor (wh0 , dtype = torch .float32 ) # unfiltered
824824 k = print_results (k )
825825
826826 # Plot
@@ -1281,7 +1281,7 @@ def plot_results(start=0, stop=0, bucket='', id=(), labels=(), save_dir=''):
12811281 for i in range (10 ):
12821282 y = results [i , x ]
12831283 if i in [0 , 1 , 2 , 5 , 6 , 7 ]:
1284- y [y == 0 ] = np .nan # dont show zero loss values
1284+ y [y == 0 ] = np .nan # don't show zero loss values
12851285 # y /= y[0] # normalize
12861286 label = labels [fi ] if len (labels ) else Path (f ).stem
12871287 ax [i ].plot (x , y , marker = '.' , label = label , linewidth = 1 , markersize = 6 )
0 commit comments