|
|
@ -105,6 +105,7 @@ class BasePredictor:
|
|
|
|
self.results = None
|
|
|
|
self.results = None
|
|
|
|
self.transforms = None
|
|
|
|
self.transforms = None
|
|
|
|
self.callbacks = _callbacks or callbacks.get_default_callbacks()
|
|
|
|
self.callbacks = _callbacks or callbacks.get_default_callbacks()
|
|
|
|
|
|
|
|
self.txt_path = None
|
|
|
|
callbacks.add_integration_callbacks(self)
|
|
|
|
callbacks.add_integration_callbacks(self)
|
|
|
|
|
|
|
|
|
|
|
|
def get_save_dir(self):
|
|
|
|
def get_save_dir(self):
|
|
|
@ -178,7 +179,8 @@ class BasePredictor:
|
|
|
|
if self.args.save_txt:
|
|
|
|
if self.args.save_txt:
|
|
|
|
result.save_txt(f'{self.txt_path}.txt', save_conf=self.args.save_conf)
|
|
|
|
result.save_txt(f'{self.txt_path}.txt', save_conf=self.args.save_conf)
|
|
|
|
if self.args.save_crop:
|
|
|
|
if self.args.save_crop:
|
|
|
|
result.save_crop(save_dir=self.save_dir / 'crops', file_name=self.data_path.stem)
|
|
|
|
result.save_crop(save_dir=self.save_dir / 'crops',
|
|
|
|
|
|
|
|
file_name=self.data_path.stem + ('' if self.dataset.mode == 'image' else f'_{frame}'))
|
|
|
|
|
|
|
|
|
|
|
|
return log_string
|
|
|
|
return log_string
|
|
|
|
|
|
|
|
|
|
|
|