Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/multi batch processing #127

Merged
merged 15 commits into from
Jan 9, 2024
Merged

Feat/multi batch processing #127

merged 15 commits into from
Jan 9, 2024

Conversation

bartoszptak
Copy link
Contributor

No description provided.

@@ -37,6 +37,8 @@ class MapProcessingParameters:
resolution_cm_per_px: float # image resolution to used during processing
processed_area_type: ProcessedAreaType # whether to perform operation on the entire field or part
tile_size_px: int # Tile size for processing (model input size)
batch_size: int # Batch size for processing
local_cache: bool # Whether to use local cache for tiles
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about adding in comment it is caching on disk?

@bartoszptak bartoszptak marked this pull request as ready for review January 5, 2024 11:42
params=params,
)

map_processor.run()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about adding an assert for the result (also in the original non-batched test)

map_processor.run()
result_img = map_processor.get_result_img()

assert result_img.shape == (2351, 2068)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about asserting some pixels also, to check the result?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check the last commit, please.

@bartoszptak
Copy link
Contributor Author

Tests show poor acceleration with multi-batch processing. For example, large area map processing using RTX4090 results 5m11s (batch=1) vs 4m42s (batch=32).

Profiling results:
image (1)

@bartoszptak bartoszptak merged commit b023c6a into devel Jan 9, 2024
2 checks passed
@bartoszptak bartoszptak deleted the feat/multi_batch_processing branch February 8, 2024 21:43
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