-
Notifications
You must be signed in to change notification settings - Fork 20
Triggering processing workflow after new photo upload method #691
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
base: dev
Are you sure you want to change the base?
Conversation
β¦es; update moduleResolution to bundler
β¦le handling - Added Uppy instance to the global App component for shared file upload functionality. - Implemented UppyImageUploader component to utilize Uppy for image uploads with AWS S3 integration. - Refactored file handling to extract EXIF data upon file addition and display upload progress. - Updated Vite configuration to target 'esnext' for improved compatibility
β¦inIO - Replaced MinIO client with boto3 for S3 operations in s3.py. - Updated methods for file upload, download, and presigned URL generation to align with boto3 API. - Adjusted error handling to use ClientError from botocore. - Modified user_schemas.py to generate presigned URLs using boto3. - Updated dependencies in pyproject.toml to include boto3 and remove MinIO. - Ensured compatibility with existing code by stripping leading slashes from S3 paths. - Added content type headers for multipart upload requests in the frontend UppyImageUploader component
β¦dability and maintainability
β¦w UI with upload, classification, review, and processing steps
β¦ance upload functionality - Replaced UppyImageUploader with UppyFileUploader for consistency across components. - Improved ImageUpload component to track upload progress and display upload queue. - Added support for staging uploads in UppyFileUploader. - Updated DroneImageProcessingWorkflow to adjust modal dimensions for better usability. - Removed unused UppyImageUploader component and its related code BREAKING CHANGE: Switch from minio to boto3
β¦ance upload functionality - Replaced UppyImageUploader with UppyFileUploader for consistency across components. - Improved ImageUpload component to track upload progress and display upload queue. - Added support for staging uploads in UppyFileUploader. - Updated DroneImageProcessingWorkflow to adjust modal dimensions for better usability. - Removed unused UppyImageUploader component and its related code
β¦d request in UppyFileUploader
for more information, see https://pre-commit.ci
β¦ table migration with conditional enum creation and improved index handling
β¦one-tm into feat/resumable-uploads
for more information, see https://pre-commit.ci
β¦epSwitcher component for project steps navigation
β¦l for managing project images with relationships and indexing
β¦se save function and EXIF handling
β¦ code formatting in image logic and migration files
β¦ with generate_presigned_download_url across the codebase; add new migration script for images from S3
β¦migration with conflict handling and improved logging
* feat: added multipart initate upload route * feat: added all multipart upload functions * feat(UploadBox): Swapped upload from single to multipart upload using uppy * feat(frontend): add @uppy/drag-drop and @uppy/progress-bar dependencies; update moduleResolution to bundler * feat(frontend): feat: integrate Uppy for image uploads and enhance file handling - Added Uppy instance to the global App component for shared file upload functionality. - Implemented UppyImageUploader component to utilize Uppy for image uploads with AWS S3 integration. - Refactored file handling to extract EXIF data upon file addition and display upload progress. - Updated Vite configuration to target 'esnext' for improved compatibility * feat(image-upload): Refactor S3 integration to use boto3 instead of MinIO - Replaced MinIO client with boto3 for S3 operations in s3.py. - Updated methods for file upload, download, and presigned URL generation to align with boto3 API. - Adjusted error handling to use ClientError from botocore. - Modified user_schemas.py to generate presigned URLs using boto3. - Updated dependencies in pyproject.toml to include boto3 and remove MinIO. - Ensured compatibility with existing code by stripping leading slashes from S3 paths. - Added content type headers for multipart upload requests in the frontend UppyImageUploader component * feat(image-upload-workflow): Refactor code structure for improved readability and maintainability * feat(image-upload-workflow): Implement drone image processing workflow UI with upload, classification, review, and processing steps * feat(image-upload-workflow): Refactor image upload components and enhance upload functionality - Replaced UppyImageUploader with UppyFileUploader for consistency across components. - Improved ImageUpload component to track upload progress and display upload queue. - Added support for staging uploads in UppyFileUploader. - Updated DroneImageProcessingWorkflow to adjust modal dimensions for better usability. - Removed unused UppyImageUploader component and its related code BREAKING CHANGE: Switch from minio to boto3 * feat(image-upload-workflow): Refactor image upload components and enhance upload functionality - Replaced UppyImageUploader with UppyFileUploader for consistency across components. - Improved ImageUpload component to track upload progress and display upload queue. - Added support for staging uploads in UppyFileUploader. - Updated DroneImageProcessingWorkflow to adjust modal dimensions for better usability. - Removed unused UppyImageUploader component and its related code * fixed with minio * feat(image-upload-workflow): Add project_id and filename to the upload request in UppyFileUploader * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat(image-upload-workflow): feat(migrations): Enhance project_images table migration with conditional enum creation and improved index handling * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix(image-upload-workflow): feat(step-switcher): Implement generic StepSwitcher component for project steps navigation * feat(image-upload-workflow): feat(db-models): Add DbProjectImage model for managing project images with relationships and indexing * feat(image-upload-workflow): Enhance image processing with new database save function and EXIF handling * refactor(image-upload-workflow): Replace deprecated get_presigned_url with generate_presigned_download_url across the codebase; add new migration script for images from S3 * fix(image-upload-workflow): Implement upsert functionality for image migration with conflict handling and improved logging * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: AbdulHafeez AbdulRaheem <aabdulraheem@joinernest.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Added new hooks for starting classification, fetching batch status, and retrieving batch images in the projects API. - Enhanced the ImageClassification component to handle classification processes, including polling for updates and displaying status. - Updated the DroneImageProcessingWorkflow to manage batch ID and transition between upload and classification steps. - Modified UppyFileUploader to support batch ID generation and pass it upon upload completion. - Created a new migration to add classification-related fields to the project_images table. - Developed new classification routes for starting batch classification and retrieving batch status and images. - Implemented the ImageClassifier class to handle image classification logic, including quality checks and task matching. - Added service functions for interacting with the classification API, including starting classification and fetching batch details
β¦ges and implement sharpness calculation in image classification
β¦processing and status checks
β¦oaded' to 'staged' and enhance upload notifications
β¦and image count checks
β¦ID handling and add task group interfaces
β¦th accept/reject functionality - Updated `useGetBatchImagesQuery` to specify query options for image classification results. - Implemented image acceptance mutation in `ImageClassification` component to handle rejected images. - Added warning for high issue rates in classified images. - Introduced a button to mark rejected images as good in `ImageClassification`. - Enhanced `ImageReview` component with map integration and improved image handling. - Added batch deletion functionality with confirmation dialog in `DroneImageProcessingWorkflow`. - Refactored `Accordion` component to support dynamic content and improved styling. - Updated classification service to include image acceptance and batch deletion methods
β¦k waypoint query - Added dotenv package version 16.4.7 to pnpm-lock.yaml. - Modified useGetTaskWaypointQuery to include projectId and taskId in queryKey for better cache management. - Updated LocateUser component usage in MapSection to remove unnecessary isMapLoaded prop. - Enhanced DescriptionBox to indicate estimated flight time with an asterisk and added explanatory note. - Improved MapSection to handle battery warnings and waypoint limits, including user notifications for excessive waypoints. - Added a basic OSM raster basemap to VectorLayerWithCluster to prevent blank maps when vector tiles fail to load. - Refactored ToolTip component styles for better readability. - Introduced waypointUpperLimit constant to manage waypoint limits in task descriptions. - Created a Justfile for backend testing setup and execution
β¦ and summary retrieval
|
This is a good improvement I think! Comments / user story:
[question 3]: this triggers the processing of the intermediate products for task areas. These 'fast orthophotos' are simply used for visual inspection of the task area, to assess the imagery looks good enough (coverage, quality, etc). Once all of the task areas are processed, how do we go about triggering the full 'final orthomosaic' processing for the project? p.s. How come every PR has pre-commit issues & merge conflicts? π Nothing should have changed on |
|
Can we have some tests on https://dev.dronetm.org of this workflow too? π |
|
Also, for users that expect imagery to be uploaded on the task page, we should probably add a prompt to say 'To upload imagery, please go to the main |
|
TODO (copied from Slack):
|
β¦ask selection and verification - Added task selection functionality in ImageProcessing component, allowing users to select multiple tasks for processing. - Implemented a warning for tasks with insufficient images for ODM processing. - Updated processing start message to reflect the number of selected tasks. - Introduced a new TaskVerificationModal for verifying tasks on the map, including image previews and deletion options. - Enhanced ImageReview component to support task verification and display duplicate image status. - Updated classification service to handle task verification data and image deletion. - Added new status 'duplicate' for task images to indicate duplicate entries
|
Sam, The above comments has been looked into. |
|
Thanks! Looking forward to seeing the changes π The branch has merge conflicts though & pre-commit issues not solved. I'll wait until they are solved before I review π |
β¦e upload logic to new resumable workflow
for more information, see https://pre-commit.ci
|
Installing pre-commit hooks are useful, as they help catch simple issues like this π |
|
Also was the uv lock updated using uv, or using another tool? |
|
I fixed the uv lock file issues and pre-commit issue π Could you possibly provide a video of the latest functionality in action before we sign off? π |
|
@spwoodcock Thanks! I would provide the video to you by tomorrow. |
β¦sk management - Update task state to IMAGE_PROCESSING_STARTED when processing begins. - Modify webhook handling to use system-level updates for task states. - Introduce internal S3 client for Docker network operations. - Add functionality to generate presigned URLs for internal S3 access. - Implement new task state update function for system processes. - Improve frontend components to reflect processing status and task states. - Add polling mechanism for task processing status updates. - Update UI to provide better feedback on task processing and completion. - Disable old image upload component and guide users to the new workflow. - Adjust styling and layout for better user experience in task management
What type of PR is this? (check all applicable)
Related Issue
Implements the batch processing step (Step 4) of the drone image processing workflow.
Describe this PR
This PR adds the final processing step to the drone image workflow, enabling batch processing of classified and reviewed images.
Key Features:
Batch Processing (Step 4)
user-uploads/) to task folders ({task_id}/images/)Backend Changes:
move_batch_images_to_tasks()inImageClassifier- copies images from staging to task folders in S3get_batch_processing_summary()- returns task-grouped summary for the UIGET /api/projects/{id}/batch/{batch_id}/processing-summary/- Get processing summaryPOST /api/projects/{id}/batch/{batch_id}/process/- Start batch processingprocess_batch_imagesARQ background task that moves images and triggers ODM jobsFrontend Changes:
ImageProcessing.tsxcomponent with task list and processing controlsgetProcessingSummary(),startBatchProcessing()Screenshots
Review Guide
API Endpoints to test:
GET /api/projects/{id}/batch/{batch_id}/processing-summary/POST /api/projects/{id}/batch/{batch_id}/process/Checklist before requesting a review