biigle / maia

:m: BIIGLE module for the Machine Learning Assisted Image Annotation method
GNU General Public License v3.0
2 stars 3 forks source link

Error with knowledge transfer #62

Closed mzur closed 3 years ago

mzur commented 3 years ago

There was an error with a MAIA job which used knowledge transfer:

Error while executing python command '/var/www/vendor/biigle/maia/src/config/../resources/scripts/instance-segmentation/DatasetGenerator.py /var/www/storage/maia_jobs/maia-451-instance-segmentation/input-dataset.json':
Traceback (most recent call last):
  File "/var/www/vendor/biigle/maia/src/config/../resources/scripts/instance-segmentation/DatasetGenerator.py", line 140, in <module>
    output = runner.generate()
  File "/var/www/vendor/biigle/maia/src/config/../resources/scripts/instance-segmentation/DatasetGenerator.py", line 42, in generate
    i, m, p = job.result()
  File "/usr/lib/python3.6/concurrent/futures/_base.py", line 425, in result
    return self.__get_result()
  File "/usr/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/var/www/vendor/biigle/maia/src/config/../resources/scripts/instance-segmentation/DatasetGenerator.py", line 95, in process_image
    image_crop, mask_crops = self.generate_crop(image, masks, proposal)
  File "/var/www/vendor/biigle/maia/src/config/../resources/scripts/instance-segmentation/DatasetGenerator.py", line 124, in generate_crop
    image_crop = image.extract_area(topLeft[0], topLeft[1], current_crop_dimension[0], current_crop_dimension[1])
  File "/usr/local/lib/python3.6/dist-packages/pyvips/vimage.py", line 921, in call_function
    return pyvips.Operation.call(name, self, *args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/pyvips/voperation.py", line 292, in call
    raise Error('unable to call {0}'.format(operation_name))
pyvips.error.Error: unable to call extract_area
  extract_area: bad extract area
mzur commented 3 years ago

This is probably because the images to be processed are consistently smaller than 512x512 px (#28). If we don't implement support for smaller images, there should at least be an error message that prevents the job from submission. The image dimensions are known so this should not be a problem.