Lydorn / Polygonization-by-Frame-Field-Learning

This repository contains the code for our fast polygonal building extraction from overhead images pipeline.
BSD 3-Clause "New" or "Revised" License
294 stars 70 forks source link

How to open .npy file as shown in the paper ? #25

Open Roy2xc opened 3 years ago

Roy2xc commented 3 years ago

As the title... I run an inference and got a "crossfield" dir with the output "X.npy" inside. I guess this is the frame field in Paper, but how to show it? I tried using numpy but not work, which function did you use? Could you give me some hint? Thank you very much!!!

patriksabol commented 3 years ago

You can use following script at master/scripts/plot_framefield.py

Anne-69 commented 3 years ago

Can the author Roy2xc get the output after running an Inference on an image?

Roy2xc commented 3 years ago

Can the author Roy2xc get the output after running an Inference on an image?

Yes, by modifying the inference_from_filepath , just set config["compute_seg"] = True, and config["eval_params"]["save_individual_outputs"]["seg_mask"] =True Then you can find the output.

    if config["compute_seg"]:
        if config["eval_params"]["save_individual_outputs"]["seg_mask"]:
            seg_mask = 0.5 < tile_data["seg"][0]
            save_utils.save_seg_mask(seg_mask, out_base_filepath, "mask", tile_data["image_filepath"])
        if config["eval_params"]["save_individual_outputs"]["seg"]:
            save_utils.save_seg(tile_data["seg"], out_base_filepath, "seg", tile_data["image_filepath"])
        if config["eval_params"]["save_individual_outputs"]["seg_luxcarta"]:
            save_utils.save_seg_luxcarta_format(tile_data["seg"], out_base_filepath, "seg_luxcarta_format", 
        tile_data["image_filepath"])
cyy-1234 commented 2 years ago

run an inference and got a "crossfield"

Hello, how did you achieve "run an inference and got a "crossfield", can you tell me which py file is running? Sorry, my English is not good