PyCharm Code Inspect fixes (#18392)

Signed-off-by: UltralyticsAssistant <web@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
Glenn Jocher 2024-12-25 16:24:29 +01:00 committed by GitHub
parent d35860d4a1
commit e5e91967d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 72 additions and 72 deletions

View file

@ -68,7 +68,7 @@ class YOLODataset(BaseDataset):
Cache dataset labels, check images and read shapes.
Args:
path (Path): Path where to save the cache file. Default is Path('./labels.cache').
path (Path): Path where to save the cache file. Default is Path("./labels.cache").
Returns:
(dict): labels.
@ -219,7 +219,7 @@ class YOLODataset(BaseDataset):
segment_resamples = 100 if self.use_obb else 1000
if len(segments) > 0:
# make sure segments interpolate correctly if original length is greater than segment_resamples
max_len = max([len(s) for s in segments])
max_len = max(len(s) for s in segments)
segment_resamples = (max_len + 1) if segment_resamples < max_len else segment_resamples
# list[np.array(segment_resamples, 2)] * num_samples
segments = np.stack(resample_segments(segments, n=segment_resamples), axis=0)