BinLiunls commited on
Commit
5b420cf
·
1 Parent(s): 90f09bc

update output

Browse files

Signed-off-by: binliu <[email protected]>

Files changed (1) hide show
  1. vista3d_pipeline.py +6 -5
vista3d_pipeline.py CHANGED
@@ -430,16 +430,17 @@ class VISTA3DPipeline(Pipeline):
430
 
431
  def postprocess(self, outputs, **kwargs):
432
  for key, value in kwargs.items():
 
 
433
  if (
434
  key in self._postprocess_params
435
  and value != self._postprocess_params[key]
436
- ):
437
- logging.warning(
438
- f"Please set the parameter {key} during initialization."
 
439
  )
440
 
441
- if key not in self.POSTPROCESSING_EXTRA_ARGS:
442
- logging.warning(f"Cannot set parameter {key} for postprocessing.")
443
  outputs = self.postprocessing_transforms(decollate_batch(outputs))
444
  return outputs
445
 
 
430
 
431
  def postprocess(self, outputs, **kwargs):
432
  for key, value in kwargs.items():
433
+ if key not in self.POSTPROCESSING_EXTRA_ARGS:
434
+ logging.warning(f"Cannot set parameter {key} for postprocessing.")
435
  if (
436
  key in self._postprocess_params
437
  and value != self._postprocess_params[key]
438
+ ) or (key not in self._postprocess_params):
439
+ self._postprocess_params.update(kwargs)
440
+ self.postprocessing_transforms = self._init_postprocessing_transforms(
441
+ **self._postprocess_params
442
  )
443
 
 
 
444
  outputs = self.postprocessing_transforms(decollate_batch(outputs))
445
  return outputs
446