Fix mask/converter.py to show correctly background color. (#547)

main
Nikita Manovich 7 years ago committed by GitHub
parent ce0e69d988
commit bbdf014442
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -25,12 +25,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
-
### Fixed
- Fixed incorrect width of shapes borders in some cases
- Fixed annotation parser for tracks with a start frame less than the first segment frame
- Fixed interpolation on the server near outside frames
- Fixed dump for case when task name has a slash
- Fixed auto annotation fail for multijob tasks
- Fixed installation of CVAT with OpenVINO on the Windows platform
- Incorrect width of shapes borders in some cases
- Annotation parser for tracks with a start frame less than the first segment frame
- Interpolation on the server near outside frames
- Dump for case when task name has a slash
- Auto annotation fail for multijob tasks
- Installation of CVAT with OpenVINO on the Windows platform
- Background color was always black in utils/mask/converter.py
### Security
-

@ -78,7 +78,7 @@ def parse_anno_file(cvat_xml):
return anno
def create_mask_file(mask_path, width, height, bitness, color_map, background, shapes):
mask = np.zeros((height, width, bitness // 8), dtype=np.uint8)
mask = np.full((height, width, bitness // 8), background, dtype=np.uint8)
for shape in shapes:
color = color_map.get(shape['label'], background)
points = [tuple(map(float, p.split(','))) for p in shape['points'].split(';')]

Loading…
Cancel
Save