zhu-xlab/MRPolyBuild ? reverse-engineered prompt

Reverse engineered prompt

Build me a Python project for detecting building footprints from medium resolution satellite tiles and turning them into polygon GeoJSON outputs.

I want a two step pipeline, first a semantic segmentation model that finds buildings in the image, then a refinement step that converts those masks into cleaner polygon outlines. It should support training, evaluation, and single image inference from the command line, and it should save predictions as GeoJSON so they can be compared against ground truth tiles.

Please include a small demo workflow that runs on one sample PlanetScope style image, plus scripts for training on my own data and for evaluating predictions against matching GeoJSON annotations. If needed, look up current docs online for the geospatial and training pieces.

Keep the project organized so I can install it in a Python environment, point it at my own .tif image tiles and annotation files, and run the official inference and evaluation scripts without much setup.