Commit 67f9b9c5 authored by Robin Tissot's avatar Robin Tissot
Browse files

Merge branch 'develop'

parents 8ae48b59 4ee687b8
......@@ -614,15 +614,16 @@ class DocumentPart(OrderedModel):
# TODO: check model_type [None, 'recognition', 'segmentation']
# & seg_type [None, 'bbox', 'baselines']
if model_.one_channel_mode == '1':
# TODO: need to binarize, probably not live...
if not self.bw_image:
self.binarize()
im = Image.open(self.bw_image.file.name)
elif model_.one_channel_mode == 'L':
im = Image.open(self.image.file.name).convert('L')
else:
im = Image.open(self.image.file.name)
# will be fixed sometime in the future
# if model_.one_channel_mode == '1':
# # TODO: need to binarize, probably not live...
# if not self.bw_image:
# self.binarize()
# im = Image.open(self.bw_image.file.name)
# elif model_.one_channel_mode == 'L':
# im = Image.open(self.image.file.name).convert('L')
# else:
# im = Image.open(self.image.file.name)
options = {
'device': getattr(settings, 'KRAKEN_TRAINING_DEVICE', 'cpu'),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment