-
Notifications
You must be signed in to change notification settings - Fork 5
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
Drone Image Processing using Open Drone Map (ODM) #227
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work 🙌
This should function is it is, but I left some comments for optimisation if needed.
There are many areas we can optimise for sure, but it's good to get a first version working before over-optimising 😁
objects = list_objects_from_bucket(bucket_name, prefix) | ||
|
||
# Process images concurrently | ||
with ThreadPoolExecutor() as executor: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend asyncio over threading for this type of downloading onto a filesystem.
asyncio.gather
would work nicely and be less blocking (using a single thread via coroutines).
Example from FMTM:
But not this would mean you need to update functions to async
and use await
settings.S3_BUCKET_NAME, f"projects/{project_id}/dem.tif", dem_path | ||
) | ||
try: | ||
get_file_from_bucket( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you rightly say below, once everything is working and we are happy, this definitely needs to be changed getting elevation data by querying the cloud optimised DEM. A DEM can be quite large, so downloading every time we process imagery is very inefficient
Overview
This pull request introduces a comprehensive image processing pipeline that:
Key Features
DroneImageProcessor Class: Manages the entire processing workflow, including downloading images, processing with NodeODM, and uploading results.
S3 Integration: Uses existing functions in
s3.py
to download the images and upload the processed imagery back to MinIOFastAPI Background Tasks: Implements background processing to keep the API responsive.
Task Status Tracking: Introduces a TaskManager to track the status of processing tasks.
API Endpoints:
POST
process_imagery/{project_id}/{task_id}/
Initiates processing