Fix resume (#138)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
82c849c163
commit
340376f7a6
9 changed files with 55 additions and 26 deletions
|
|
@ -37,10 +37,9 @@ class SegmentationValidator(DetectionValidator):
|
|||
|
||||
def init_metrics(self, model):
|
||||
head = model.model[-1] if self.training else model.model.model[-1]
|
||||
if self.data:
|
||||
self.is_coco = self.data.get('val', '').endswith(f'coco{os.sep}val2017.txt') # is COCO dataset
|
||||
self.class_map = ops.coco80_to_coco91_class() if self.is_coco else list(range(1000))
|
||||
self.args.save_json |= self.is_coco and not self.training # run on final val if training COCO
|
||||
self.is_coco = self.data.get('val', '').endswith(f'coco{os.sep}val2017.txt') # is COCO dataset
|
||||
self.class_map = ops.coco80_to_coco91_class() if self.is_coco else list(range(1000))
|
||||
self.args.save_json |= self.is_coco and not self.training # run on final val if training COCO
|
||||
self.nc = head.nc
|
||||
self.nm = head.nm if hasattr(head, "nm") else 32
|
||||
self.names = model.names
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue