Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 67f9b9c5 authored by Robin Tissot's avatar Robin Tissot
Browse files

Merge branch 'develop'

parents 8ae48b59 4ee687b8
Branches
Tags v0.6.7c
1 merge request!52Api model
......@@ -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'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment