Add image processing utilities for HDR/SDR video preprocessing#17269
Add image processing utilities for HDR/SDR video preprocessing#17269metascroy wants to merge 1 commit intopytorch:mainfrom
Conversation
Summary: This diff adds a new `executorch.extension.vision` module with image processing utilities for preprocessing and postprocessing video frames in ML pipelines. **Key features:** - Transfer functions: PQ (ST.2084), HLG (BT.2100), sRGB gamma - Color gamut conversion: BT.2020 ↔ BT.709 matrices - Factory methods for common pipelines: HDR10→linear, HLG→linear, SDR→linear, ImageNet normalization - `ImagePreprocessor` and `ImagePostprocessor` classes that produce `torch.export.ExportedProgram` for on-device execution **Testing:** - Comprehensive tests validate implementations against the `colour-science` reference library - Tests cover transfer function accuracy, gamut matrix correctness, and full E2E pipelines - Added `colour-science` as a test dependency in both Buck (TARGETS) and OSS (pyproject.toml) This diff adds a new `executorch.extension.vision` module with image processing utilities for preprocessing and postprocessing video frames in ML pipelines. **Key features:** - Transfer functions: PQ (ST.2084), HLG (BT.2100), sRGB gamma - Color gamut conversion: BT.2020 ↔ BT.709 matrices - Factory methods for common pipelines: HDR10→linear, HLG→linear, SDR→linear, ImageNet normalization - `ImagePreprocessor` and `ImagePostprocessor` classes that produce `torch.export.ExportedProgram` for on-device execution **Testing:** - Reference correctness tests in `extension/vision/test/` validate implementations against the `colour-science` library - CoreML integration tests in `backends/apple/coreml/test/test_image_processing.py` verify CoreML delegate matches EP output and demonstrate recommended dtype/compute precision patterns for deployment - Added `colour-science` as a test dependency in both Buck (TARGETS) and OSS (pyproject.toml) Differential Revision: D92471879
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17269
Note: Links to docs will display an error until the docs builds have been completed. ❌ 5 New Failures, 2 Unrelated FailuresAs of commit e1effb7 with merge base f48a600 ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@metascroy has exported this pull request. If you are a Meta employee, you can view the originating Diff in D92471879. |
This PR needs a
|
Summary:
This diff adds a new
executorch.extension.visionmodule with image processing utilities for preprocessing and postprocessing video frames in ML pipelines.Key features:
ImagePreprocessorandImagePostprocessorclasses that producetorch.export.ExportedProgramfor on-device executionTesting:
colour-sciencereference librarycolour-scienceas a test dependency in both Buck (TARGETS) and OSS (pyproject.toml)This diff adds a new
executorch.extension.visionmodule with image processing utilities for preprocessing and postprocessing video frames in ML pipelines.Key features:
ImagePreprocessorandImagePostprocessorclasses that producetorch.export.ExportedProgramfor on-device executionTesting:
extension/vision/test/validate implementations against thecolour-sciencelibrarybackends/apple/coreml/test/test_image_processing.pyverify CoreML delegate matches EP output and demonstrate recommended dtype/compute precision patterns for deploymentcolour-scienceas a test dependency in both Buck (TARGETS) and OSS (pyproject.toml)Differential Revision: D92471879