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): ...@@ -614,15 +614,16 @@ class DocumentPart(OrderedModel):
# TODO: check model_type [None, 'recognition', 'segmentation'] # TODO: check model_type [None, 'recognition', 'segmentation']
# & seg_type [None, 'bbox', 'baselines'] # & seg_type [None, 'bbox', 'baselines']
if model_.one_channel_mode == '1': # will be fixed sometime in the future
# TODO: need to binarize, probably not live... # if model_.one_channel_mode == '1':
if not self.bw_image: # # TODO: need to binarize, probably not live...
self.binarize() # if not self.bw_image:
im = Image.open(self.bw_image.file.name) # self.binarize()
elif model_.one_channel_mode == 'L': # im = Image.open(self.bw_image.file.name)
im = Image.open(self.image.file.name).convert('L') # elif model_.one_channel_mode == 'L':
else: # im = Image.open(self.image.file.name).convert('L')
im = Image.open(self.image.file.name) # else:
# im = Image.open(self.image.file.name)
options = { options = {
'device': getattr(settings, 'KRAKEN_TRAINING_DEVICE', 'cpu'), '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