Skip to content

Commit

Permalink
replace function
Browse files Browse the repository at this point in the history
  • Loading branch information
yasakova-anastasia committed May 26, 2021
1 parent dfaf09a commit 5d0d369
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions datumaro/plugins/widerface_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
import os
import os.path as osp
import re
from distutils.util import strtobool

from datumaro.components.converter import Converter
from datumaro.components.extractor import (AnnotationType, Bbox, DatasetItem,
Importer, Label, LabelCategories, SourceExtractor)
from datumaro.util import str_to_bool


class WiderFacePath:
Expand Down Expand Up @@ -121,7 +121,7 @@ def _load_items(self, path):
for attr in WiderFacePath.BBOX_ATTRIBUTES:
if bbox_list[i] != '-':
if bbox_list[i] in ['True', 'False']:
attributes[attr] = strtobool(bbox_list[i])
attributes[attr] = str_to_bool(bbox_list[i])
else:
attributes[attr] = bbox_list[i]
i += 1
Expand Down

0 comments on commit 5d0d369

Please sign in to comment.