Skip to content

Commit

Permalink
fix typos and add warning messages when using --cache (#733)
Browse files Browse the repository at this point in the history
Co-authored-by: Songtao Liu <ruinmessi@gmail.com>
  • Loading branch information
Joker316701882 and GOATmessi7 committed Sep 27, 2021
1 parent 9a957f5 commit abc8c87
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion yolox/data/datasets/coco.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ def _cache_images(self):
pbar.close()
else:
logger.warning(
"You are using cached imgs! Make sure your dataset is not changed!!"
"You are using cached imgs! Make sure your dataset is not changed!!\n"
"Everytime the self.input_size is changed in your exp file, you need to delete\n"
"the cached data and re-generate them.\n"
)

logger.info("Loading cached imgs...")
Expand Down
6 changes: 4 additions & 2 deletions yolox/data/datasets/voc.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def _cache_images(self):
cache_file = self.root + "/img_resized_cache_" + self.name + ".array"
if not os.path.exists(cache_file):
logger.info(
"Caching images for the frist time. This might take about 3 minutes for VOC"
"Caching images for the first time. This might take about 3 minutes for VOC"
)
self.imgs = np.memmap(
cache_file,
Expand All @@ -175,7 +175,9 @@ def _cache_images(self):
pbar.close()
else:
logger.warning(
"You are using cached imgs! Make sure your dataset is not changed!!"
"You are using cached imgs! Make sure your dataset is not changed!!\n"
"Everytime the self.input_size is changed in your exp file, you need to delete\n"
"the cached data and re-generate them.\n"
)

logger.info("Loading cached imgs...")
Expand Down

0 comments on commit abc8c87

Please sign in to comment.