Skip to content

Conversation

@scottmartinnet
Copy link

I have completed a series of new features based on this code:

  • Single image inference: split an input image into tiles, run inference on the tiles, merge and translate the resulting polygons into a single result set with pixel coordinates.
  • Automatic pretrained model downloads
  • Command line support
  • API support
  • Docker support

I am currently successfully running this project in AWS SageMaker as an inference endpoint.

@n0man-ch0wdhury
Copy link

Hey, can you help me running infer_single_image.py? I resized the image into 224 x 224, and ran the command python infer_single_image.py -e folder but no response. I have rtx 3050 4GB and i5 11th gen.

@scottmartinnet
Copy link
Author

Make sure to provide the image as stdin, or the command will just wait for input.

Example:
cat input.png | python infer_single_image.py -e runs_share/Pix2Poly_inria_coco_224

@scottmartinnet
Copy link
Author

Also, you don't have to resize, the code will automatically tile a large input image and assemble polygons from multiple runs.

@n0man-ch0wdhury
Copy link

@scottmartinnet Thank you for your response. It's working. I've another question. If it handles large input image, how large the input can be depending on the hardware?

@scottmartinnet
Copy link
Author

scottmartinnet commented Jun 30, 2025

Awesome!

The image can be arbitrarily large as long as it fits in memory and you have enough processing time to process that many tiles.

@n0man-ch0wdhury
Copy link

Okay! Is it normal to take ~10s for per 224x224 tile?

@scottmartinnet
Copy link
Author

It all depends on your hardware.

@scottmartinnet
Copy link
Author

We've improved our approach to merging polygons from different tiles with a bitmap-based approach and an increased tile overlap percentage and added a filtering layer to ignore polygons at the boundary of a tile which do not continue onto other tiles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants