Skip to content

Commit

Permalink
added support for yolo instance-segmentation polygon format
Browse files Browse the repository at this point in the history
  • Loading branch information
m2key1 committed Mar 4, 2024
1 parent 35f37a7 commit dd87cb8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ private ImageAnnotation loadAnnotationFromFile(File file) throws IOException {
int lineCoordinatesCount = Arrays.asList(StringUtils.split(line)).size() - 1;

try {
if(lineCoordinatesCount == 4){
if(lineCoordinatesCount <= 4){
boundingShapeDataList.add(parseBoundingBoxData(line, counter));
} else if(lineCoordinatesCount > 4){
} else {
boundingShapeDataList.add(parseBoundingPolygonData(line, counter));
}
} catch(InvalidAnnotationFormatException e) {
Expand Down

0 comments on commit dd87cb8

Please sign in to comment.