mirror of
https://github.com/WongKinYiu/yolov7.git
synced 2025-06-03 21:54:57 +08:00
u7 code
update seg code
This commit is contained in:
parent
a4df031e45
commit
bcc3eff9e2
@ -405,7 +405,7 @@ class DetectMultiBackend(nn.Module):
|
|||||||
names = model.module.names if hasattr(model, 'module') else model.names # get class names
|
names = model.module.names if hasattr(model, 'module') else model.names # get class names
|
||||||
model.half() if fp16 else model.float()
|
model.half() if fp16 else model.float()
|
||||||
self.model = model # explicitly assign for to(), cpu(), cuda(), half()
|
self.model = model # explicitly assign for to(), cpu(), cuda(), half()
|
||||||
segmentation_model = type(model.model[-1]).__name__ == 'Segment'
|
segmentation_model = type(model.model[-1]).__name__ in ['Segment', 'ISegment', 'IRSegment']
|
||||||
elif jit: # TorchScript
|
elif jit: # TorchScript
|
||||||
LOGGER.info(f'Loading {w} for TorchScript inference...')
|
LOGGER.info(f'Loading {w} for TorchScript inference...')
|
||||||
extra_files = {'config.txt': ''} # model metadata
|
extra_files = {'config.txt': ''} # model metadata
|
||||||
|
Loading…
x
Reference in New Issue
Block a user