Skip to content

Commit

Permalink
Update project_to_geojson
Browse files Browse the repository at this point in the history
check the format of crowns
  • Loading branch information
0scarJ1ang authored Aug 20, 2023
1 parent 3730acd commit 803d2f9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion detectree2/models/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def to_eval_geojson(directory=None): # noqa:N803
json.dump(geofile, dest)


def project_to_geojson(tiles_path, pred_fold=None, output_fold=None): # noqa:N803
def project_to_geojson(tiles_path, pred_fold=None, output_fold=None, Multi_class = False): # noqa:N803
"""Projects json predictions back in geographic space.
Takes a json and changes it to a geojson so it can overlay with orthomosaic. Another copy is produced to overlay
Expand Down Expand Up @@ -189,6 +189,8 @@ def project_to_geojson(tiles_path, pred_fold=None, output_fold=None): # noqa:N8

# json file is formated as a list of segmentation polygons so cycle through each one
for crown_data in datajson:
if Multi_class == True:
print(crown_data)
crown = crown_data["segmentation"]
confidence_score = crown_data["score"]

Expand Down

0 comments on commit 803d2f9

Please sign in to comment.