The local visualization effect of the segmentation results is as follows
The segmentation results are visualized on the web as follows. Note that the leftmost object is missing.
System information
OS Platform and Distribution :Linux Ubuntu 22.04
Python version :3.8
FiftyOne version :0.23.8
FiftyOne installed from:pip
Other info/logs
Suggestion: The _coco_segmentation_to_mask function in python3.8/site-packages/fiftyone/utils/coco.py should check the validity of the coordinate value of the bbox as below:
x = max(0, min(x, width-1))
y = max(0, min(y, height-1))
Willingness to contribute
The FiftyOne Community encourages bug fix contributions. Would you or another
member of your organization be willing to contribute a fix for this bug to the
FiftyOne codebase?
[ ] Yes. I can contribute a fix for this bug independently
[ ] Yes. I would be willing to contribute a fix for this bug with guidance
from the FiftyOne community
Describe the problem
The bbox pixel coordinate is less than 0, causing the mask to not be displayed.
Code to reproduce issue
dataset = fo.Dataset.from_dir( dataset_type=fo.types.COCODetectionDataset, data_path=args.image_path, labels_path=args.coco_json_gt, label_field="ground_truth", label_types=["segmentations"] ) session = fo.launch_app(dataset, port=args.port, remote=True) session.wait()
The local visualization effect of the segmentation results is as follows![2024-05-24 19-13-31屏幕截图](https://github.com/voxel51/fiftyone/assets/33647005/a18393ae-a9b2-4181-bb3f-48b9393eb608)
The segmentation results are visualized on the web as follows. Note that the leftmost object is missing.![2024-05-24 19-13-54屏幕截图](https://github.com/voxel51/fiftyone/assets/33647005/4b5bc126-79ed-42d6-85e4-64dd6ce29ce6)
System information
Other info/logs
Suggestion: The _coco_segmentation_to_mask function in python3.8/site-packages/fiftyone/utils/coco.py should check the validity of the coordinate value of the bbox as below:
x = max(0, min(x, width-1)) y = max(0, min(y, height-1))
Willingness to contribute
The FiftyOne Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the FiftyOne codebase?