Skip to content
This repository has been archived by the owner on Jul 2, 2019. It is now read-only.

evalTools.py #34

Open
oneOfThePeople opened this issue Jun 7, 2017 · 0 comments
Open

evalTools.py #34

oneOfThePeople opened this issue Jun 7, 2017 · 0 comments

Comments

@oneOfThePeople
Copy link

oneOfThePeople commented Jun 7, 2017

hi,
i use your code to evaluate my result and i noticed that there is a bug,
when i use iou function sometimes the intersection between the gt-poly to the pred-poly return GEOMETRYCOLLECTION and in this case the code fail and give score 0.
i add this lines if its interesting you:

elif intersection_result.GetGeometryName() == 'GEOMETRYCOLLECTION':
    maxlist = []
    for geoCol in intersection_result:
        if geoCol.GetGeometryName() == 'POLYGON' or \
                        geoCol.GetGeometryName() == 'MULTIPOLYGON':
            intersection_area = geoCol.GetArea()
            union_area = test_poly.Union(truth_polys[fid]).GetArea()
            maxlist.append(intersection_area / union_area)
    iou_list.append(np.max(maxlist))
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant