Commit 74badc60 authored by Yuxin Wu's avatar Yuxin Wu

fix the use of cfg in workers

parent a6ca79c3
...@@ -99,7 +99,8 @@ class TrainingDataPreprocessor: ...@@ -99,7 +99,8 @@ class TrainingDataPreprocessor:
points = tfms.apply_coords(points) points = tfms.apply_coords(points)
boxes = point8_to_box(points) boxes = point8_to_box(points)
if len(boxes): if len(boxes):
assert klass.max() <= cfg.DATA.NUM_CATEGORY, "Invalid category {}!".format(klass.max()) assert klass.max() <= self.cfg.DATA.NUM_CATEGORY, \
"Invalid category {}!".format(klass.max())
assert np.min(np_area(boxes)) > 0, "Some boxes have zero area!" assert np.min(np_area(boxes)) > 0, "Some boxes have zero area!"
ret = {"image": im} ret = {"image": im}
......
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