sparkfish / augraphy

Augmentation pipeline for rendering synthetic paper printing, faxing, scanning and copy machine processes
https://github.com/sparkfish/augraphy
MIT License
357 stars 46 forks source link

Interop is broken after adding masks, keypoints and bounding boxes. #435

Closed mezotaken closed 4 months ago

mezotaken commented 4 months ago

MRE is in documentation, concerning Interop functionality link

Traceback (most recent call last):
  File "D:\Misc\Projects\plate_distortion\tttt.py", line 35, in <module>
    augmented_image = pipeline.augment(image)["output"]
                      ^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Misc\Projects\plate_distortion\venv\Lib\site-packages\augraphy\base\augmentationpipeline.py", line 213, in augment
    data = self.augment_single_image(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Misc\Projects\plate_distortion\venv\Lib\site-packages\augraphy\base\augmentationpipeline.py", line 419, in augment_single_image
    self.apply_phase(data, layer="post", phase=self.post_phase)
  File "D:\Misc\Projects\plate_distortion\venv\Lib\site-packages\augraphy\base\augmentationpipeline.py", line 740, in apply_phase
    result = augmentation(
             ^^^^^^^^^^^^^
TypeError: Interop.__call__() got an unexpected keyword argument 'mask'

I believe it could be fixed by adding those arguments to Interop.__call__