Prevent final val if val=False (#16776)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
28eb65694c
commit
84fd8f6e49
2 changed files with 3 additions and 2 deletions
|
|
@ -75,7 +75,7 @@ class DetectionValidator(BaseValidator):
|
|||
) # is COCO
|
||||
self.is_lvis = isinstance(val, str) and "lvis" in val and not self.is_coco # is LVIS
|
||||
self.class_map = converter.coco80_to_coco91_class() if self.is_coco else list(range(len(model.names)))
|
||||
self.args.save_json |= (self.is_coco or self.is_lvis) and not self.training # run on final val if training COCO
|
||||
self.args.save_json |= self.args.val and (self.is_coco or self.is_lvis) and not self.training # run final val
|
||||
self.names = model.names
|
||||
self.nc = len(model.names)
|
||||
self.metrics.names = self.names
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue