albumentations-team / albucore

A high-performance image processing library designed to optimize and extend the Albumentations library with specialized functions for advanced image transformations. Perfect for developers working in computer vision who require efficient and scalable image augmentation.
MIT License
12 stars 3 forks source link

Address add negative #18

Closed ternaus closed 4 months ago

ternaus commented 4 months ago

Summary by Sourcery

This pull request enhances the add, multiply, add_weighted, and multiply_add functions to handle negative values and weights. It also includes extensive new test cases to ensure the correctness of these enhancements and updates the benchmark results to reflect the performance changes.

sourcery-ai[bot] commented 4 months ago

Reviewer's Guide by Sourcery

This pull request adds support for handling negative values in addition and multiplication operations for uint8 and float32 images. It includes new test cases to ensure the correctness of these operations and updates benchmark results to reflect the performance of the new implementation. Significant changes include modifying the 'prepare_value_opencv' and 'apply_numpy' functions to handle negative values correctly, and updating the 'convert_value' utility function to simplify its logic.

File-Level Changes

Files Changes
benchmark/results/float32_1.md
benchmark/results/float32_3.md
benchmark/results/float32_5.md
benchmark/results/uint8_1.md
benchmark/results/uint8_3.md
benchmark/results/uint8_5.md
Updated benchmark results to include new performance metrics for albucore 0.0.10.

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - You can change your review settings at any time by accessing your [dashboard](https://sourcery.ai/dashboard): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.
codecov-commenter commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Please upload report for BASE (main@0a706fe). Learn more about missing BASE report.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #18 +/- ## ======================================= Coverage ? 54.91% ======================================= Files ? 14 Lines ? 1322 Branches ? 0 ======================================= Hits ? 726 Misses ? 596 Partials ? 0 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.