Skip to content

Commit

Permalink
fix: fix #69
Browse files Browse the repository at this point in the history
  • Loading branch information
gary-Shen committed Nov 15, 2024
1 parent f4731bc commit 0baa13c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions labelu/internal/common/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@ def convert_to_mask(
file_relative_path_model_l = f"{file_relative_path_base_name}-trainIds.png"
file_full_path_model_l = out_data_dir.joinpath(file_relative_path_model_l)
img_model_l = Image.new("L", (width, height), 0)
for p in polygons:
ImageDraw.Draw(img_model_l).polygon(p, outline=1, fill=1)
for _index, p in enumerate(polygons):
ImageDraw.Draw(img_model_l).polygon(p, outline=1, fill=_index + 1)
img_model_l.save(file_full_path_model_l, "PNG")
export_files.append(file_full_path_model_l)

Expand Down

0 comments on commit 0baa13c

Please sign in to comment.