Implement Barcode Detection based on Mac Vision Framework |
||
Issue descriptionVision framework recognizes barcode symbologies more than Core Image Framework that only work on QR format.
,
Jun 26 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4db64ed1349007e15544cd855659c91d7147a2ad commit 4db64ed1349007e15544cd855659c91d7147a2ad Author: junweifu <junwei.fu@intel.com> Date: Tue Jun 26 05:07:18 2018 ShapeDetection: Start the minimum implementation of mojom::BarcodeDetection The new implementation is based on Mac OS Vision Framework[1] which recognizes more barcode symbologies, then use the @available(macOS 10.13, *) in the barcode detection provider to choose different implementation. Split original large CL[2] up in smaller subpatches including this CL. [1] https://developer.apple.com/documentation/vision [2] https://chromium-review.googlesource.com/c/chromium/src/+/1088466 BUG=848182 Cq-Include-Trybots: luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win10_chromium_x64_rel_ng Change-Id: I5cb8634240a35e52b3c0b696c1ccab9c24cd023e Reviewed-on: https://chromium-review.googlesource.com/1107493 Commit-Queue: Junwei Fu <junwei.fu@intel.com> Reviewed-by: Miguel Casas <mcasas@chromium.org> Reviewed-by: Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/heads/master@{#570336} [modify] https://crrev.com/4db64ed1349007e15544cd855659c91d7147a2ad/services/shape_detection/BUILD.gn [modify] https://crrev.com/4db64ed1349007e15544cd855659c91d7147a2ad/services/shape_detection/barcode_detection_impl_mac_unittest.mm [add] https://crrev.com/4db64ed1349007e15544cd855659c91d7147a2ad/services/shape_detection/barcode_detection_impl_mac_vision.h [add] https://crrev.com/4db64ed1349007e15544cd855659c91d7147a2ad/services/shape_detection/barcode_detection_impl_mac_vision.mm [modify] https://crrev.com/4db64ed1349007e15544cd855659c91d7147a2ad/services/shape_detection/barcode_detection_provider_mac.mm [modify] https://crrev.com/4db64ed1349007e15544cd855659c91d7147a2ad/services/shape_detection/face_detection_impl_mac_vision.mm [modify] https://crrev.com/4db64ed1349007e15544cd855659c91d7147a2ad/services/shape_detection/shape_detection_service.cc [modify] https://crrev.com/4db64ed1349007e15544cd855659c91d7147a2ad/services/shape_detection/shape_detection_service.h
,
Jun 26 2018
https://chromium-review.googlesource.com/c/chromium/src/+/1107493 fails FaceDetectionImplMacTest on several GPU.FYI bots: https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Mac%20FYI%20Experimental%20Release%20%28Intel%29/3320 https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Mac%20FYI%20Experimental%20Retina%20Release%20%28AMD%29/2614 https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Mac%20FYI%20Experimental%20Retina%20Release%20%28NVIDIA%29/822 [ RUN ] FaceDetectionImplMacTest.ScanOneFace/2 [20658:775:0625/230612.812434:30082867592228:ERROR:face_detection_impl_mac_vision.mm(118)] Failed to load VNDetectFaceLandmarksRequest class [20658:775:0625/230612.812709:30082867865441:FATAL:face_detection_impl_mac_vision.mm(133)] Check failed: landmarks_async_request_. 0 services_unittests 0x000000010493f18c base::debug::StackTrace::StackTrace(unsigned long) + 28 1 services_unittests 0x0000000104871e3f logging::LogMessage::~LogMessage() + 223 2 services_unittests 0x00000001047e8295 shape_detection::FaceDetectionImplMacVision::Detect(SkBitmap const&, base::OnceCallback<void (std::__1::vector<mojo::StructPtr<shape_detection::mojom::FaceDetectionResult>, std::__1::allocator<mojo::StructPtr<shape_detection::mojom::FaceDetectionResult> > >)>) + 101 3 services_unittests 0x000000010253d6ac shape_detection::FaceDetectionImplMacTest_ScanOneFace_Test::TestBody() + 3404 4 services_unittests 0x0000000102644092 testing::Test::Run() + 274 5 services_unittests 0x0000000102644d00 testing::TestInfo::Run() + 320 6 services_unittests 0x0000000102645337 testing::TestCase::Run() + 279 7 services_unittests 0x0000000102651ac7 testing::internal::UnitTestImpl::RunAllTests() + 871 8 services_unittests 0x000000010265173d testing::UnitTest::Run() + 109 9 services_unittests 0x0000000104cda0c6 base::TestSuite::Run() + 166 10 services_unittests 0x0000000104cf357e base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback<int ()>, unsigned long, int, bool, base::OnceCallback<void ()>) + 382 11 services_unittests 0x0000000104cf33d1 base::LaunchUnitTests(int, char**, base::OnceCallback<int ()>) + 161 12 services_unittests 0x000000010484b2e5 service_manager::InitializeAndLaunchUnitTests(int, char**, base::OnceCallback<int ()>) + 453 13 services_unittests 0x00000001025ecfa9 main + 153 14 libdyld.dylib 0x00007fff5875e015 start + 1 15 ??? 0x000000000000000a 0x0 + 10 [15/18] FaceDetectionImplMacTest.ScanOneFace/2 (CRASHED) Please fix or revert the CL ASAP.
,
Jun 26 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/76b00af0919dac082f93413c9c08a56e9697b8e9 commit 76b00af0919dac082f93413c9c08a56e9697b8e9 Author: Miguel Casas <mcasas@chromium.org> Date: Tue Jun 26 20:58:56 2018 Revert "ShapeDetection: Start the minimum implementation of mojom::BarcodeDetection" This reverts commit 4db64ed1349007e15544cd855659c91d7147a2ad. Reason for revert: broke some bots (e.g. Mac FYI Experimental ... Intel) , see: https://bugs.chromium.org/p/chromium/issues/detail?id=848182#c3 Original change's description: > ShapeDetection: Start the minimum implementation of mojom::BarcodeDetection > > The new implementation is based on Mac OS Vision Framework[1] which recognizes > more barcode symbologies, then use the @available(macOS 10.13, *) in the barcode > detection provider to choose different implementation. > > Split original large CL[2] up in smaller subpatches including this CL. > > [1] https://developer.apple.com/documentation/vision > [2] https://chromium-review.googlesource.com/c/chromium/src/+/1088466 > > BUG=848182 > > Cq-Include-Trybots: luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win10_chromium_x64_rel_ng > Change-Id: I5cb8634240a35e52b3c0b696c1ccab9c24cd023e > Reviewed-on: https://chromium-review.googlesource.com/1107493 > Commit-Queue: Junwei Fu <junwei.fu@intel.com> > Reviewed-by: Miguel Casas <mcasas@chromium.org> > Reviewed-by: Reilly Grant <reillyg@chromium.org> > Cr-Commit-Position: refs/heads/master@{#570336} TBR=reillyg@chromium.org,mcasas@chromium.org,junwei.fu@intel.com Change-Id: Ibde8b37fea960671a85bbaf8a4bae59614b50eef No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 848182 Cq-Include-Trybots: luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win10_chromium_x64_rel_ng Reviewed-on: https://chromium-review.googlesource.com/1115638 Reviewed-by: Miguel Casas <mcasas@chromium.org> Commit-Queue: Miguel Casas <mcasas@chromium.org> Cr-Commit-Position: refs/heads/master@{#570528} [modify] https://crrev.com/76b00af0919dac082f93413c9c08a56e9697b8e9/services/shape_detection/BUILD.gn [modify] https://crrev.com/76b00af0919dac082f93413c9c08a56e9697b8e9/services/shape_detection/barcode_detection_impl_mac_unittest.mm [delete] https://crrev.com/79cd1eee97e64e7f08dd4cc8ed846b73c7bb5859/services/shape_detection/barcode_detection_impl_mac_vision.h [delete] https://crrev.com/79cd1eee97e64e7f08dd4cc8ed846b73c7bb5859/services/shape_detection/barcode_detection_impl_mac_vision.mm [modify] https://crrev.com/76b00af0919dac082f93413c9c08a56e9697b8e9/services/shape_detection/barcode_detection_provider_mac.mm [modify] https://crrev.com/76b00af0919dac082f93413c9c08a56e9697b8e9/services/shape_detection/face_detection_impl_mac_vision.mm [modify] https://crrev.com/76b00af0919dac082f93413c9c08a56e9697b8e9/services/shape_detection/shape_detection_service.cc [modify] https://crrev.com/76b00af0919dac082f93413c9c08a56e9697b8e9/services/shape_detection/shape_detection_service.h
,
Jun 26 2018
,
Jun 26 2018
Sorry that this wasn't caught by Chromium's commit queue. We will upgrade the Mac GPU bots (on which the shape detection unit tests run) to 10.13 so that errors in this code will be caught on the commit queue.
,
Jun 27 2018
Thanks, please let me know when it's ready.
,
Jul 2
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d5cd3dcbda5f5387d3a86cf4b203997854e84a1c commit d5cd3dcbda5f5387d3a86cf4b203997854e84a1c Author: junweifu <junwei.fu@intel.com> Date: Mon Jul 02 07:05:35 2018 Reland "ShapeDetection: Start the minimum implementation of mojom::BarcodeDetection" Original CL got reverted because the Vision.Framework isn't loaded in services unit tests. This is a reland of 4db64ed1349007e15544cd855659c91d7147a2ad Original change's description: > ShapeDetection: Start the minimum implementation of mojom::BarcodeDetection > > The new implementation is based on Mac OS Vision Framework[1] which recognizes > more barcode symbologies, then use the @available(macOS 10.13, *) in the barcode > detection provider to choose different implementation. > > Split original large CL[2] up in smaller subpatches including this CL. > > [1] https://developer.apple.com/documentation/vision > [2] https://chromium-review.googlesource.com/c/chromium/src/+/1088466 > > BUG=848182 > > Cq-Include-Trybots: luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win10_chromium_x64_rel_ng > Change-Id: I5cb8634240a35e52b3c0b696c1ccab9c24cd023e > Reviewed-on: https://chromium-review.googlesource.com/1107493 > Commit-Queue: Junwei Fu <junwei.fu@intel.com> > Reviewed-by: Miguel Casas <mcasas@chromium.org> > Reviewed-by: Reilly Grant <reillyg@chromium.org> > Cr-Commit-Position: refs/heads/master@{#570336} Bug: 848182 Change-Id: I143f1c2b1977690d50aa4bf4b31d5eda1cb92ece Cq-Include-Trybots: luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win10_chromium_x64_rel_ng Reviewed-on: https://chromium-review.googlesource.com/1116258 Reviewed-by: Miguel Casas <mcasas@chromium.org> Reviewed-by: Reilly Grant <reillyg@chromium.org> Commit-Queue: Junwei Fu <junwei.fu@intel.com> Cr-Commit-Position: refs/heads/master@{#571830} [modify] https://crrev.com/d5cd3dcbda5f5387d3a86cf4b203997854e84a1c/services/shape_detection/BUILD.gn [modify] https://crrev.com/d5cd3dcbda5f5387d3a86cf4b203997854e84a1c/services/shape_detection/barcode_detection_impl_mac_unittest.mm [add] https://crrev.com/d5cd3dcbda5f5387d3a86cf4b203997854e84a1c/services/shape_detection/barcode_detection_impl_mac_vision.h [add] https://crrev.com/d5cd3dcbda5f5387d3a86cf4b203997854e84a1c/services/shape_detection/barcode_detection_impl_mac_vision.mm [modify] https://crrev.com/d5cd3dcbda5f5387d3a86cf4b203997854e84a1c/services/shape_detection/barcode_detection_provider_mac.mm [modify] https://crrev.com/d5cd3dcbda5f5387d3a86cf4b203997854e84a1c/services/shape_detection/face_detection_impl_mac_unittest.mm [modify] https://crrev.com/d5cd3dcbda5f5387d3a86cf4b203997854e84a1c/services/shape_detection/face_detection_impl_mac_vision.mm [modify] https://crrev.com/d5cd3dcbda5f5387d3a86cf4b203997854e84a1c/services/shape_detection/shape_detection_service.cc [modify] https://crrev.com/d5cd3dcbda5f5387d3a86cf4b203997854e84a1c/services/shape_detection/shape_detection_service.h
,
Jul 17
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bba148964a4b65e30a24aac450da0b1afd0eb693 commit bba148964a4b65e30a24aac450da0b1afd0eb693 Author: junweifu <junwei.fu@intel.com> Date: Tue Jul 17 02:31:47 2018 ShapeDetection: Move VisionAPIAsyncRequestMac to a common location Only move code without modifying the implementation so that Barcode Detection can reuse it. BUG=848182 Cq-Include-Trybots: luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win10_chromium_x64_rel_ng Change-Id: Ia04a56efbd2ace4eb05f0ebaa4e341ef7a032fa4 Reviewed-on: https://chromium-review.googlesource.com/1128625 Commit-Queue: Junwei Fu <junwei.fu@intel.com> Reviewed-by: Reilly Grant <reillyg@chromium.org> Reviewed-by: Miguel Casas <mcasas@chromium.org> Cr-Commit-Position: refs/heads/master@{#575522} [modify] https://crrev.com/bba148964a4b65e30a24aac450da0b1afd0eb693/services/shape_detection/detection_utils_mac.h [modify] https://crrev.com/bba148964a4b65e30a24aac450da0b1afd0eb693/services/shape_detection/detection_utils_mac.mm [modify] https://crrev.com/bba148964a4b65e30a24aac450da0b1afd0eb693/services/shape_detection/face_detection_impl_mac_vision.h [modify] https://crrev.com/bba148964a4b65e30a24aac450da0b1afd0eb693/services/shape_detection/face_detection_impl_mac_vision.mm
,
Jul 18
Sorry for the long delay, but now that Issue 856799 is fixed, the Mac AMD GPU bots are running 10.13. It should be possible to test your new tests on mac_chromium_rel_ng now.
,
Jul 18
Thank you very much.
,
Jul 24
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/29d124ffc18e63c6699c0b8828734d975e31106a commit 29d124ffc18e63c6699c0b8828734d975e31106a Author: junweifu <junwei.fu@intel.com> Date: Tue Jul 24 00:30:30 2018 ShapeDetection: Detect barcode informations by VNDetectBarcodesRequest The native request first locates all barcodes in the input image, then analyzes each to decode payload. The bounding box of the detected barcode are normalized to the dimensions of the processed image, so the coordinates need to be converted. Forward declaring the necessary symbols in sdk_forward_declarations.h. BUG=848182 Cq-Include-Trybots: luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win10_chromium_x64_rel_ng Change-Id: I03b966a1886feaf64a87e778396ad96e3d16b85e Reviewed-on: https://chromium-review.googlesource.com/1142831 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Miguel Casas <mcasas@chromium.org> Reviewed-by: Reilly Grant <reillyg@chromium.org> Commit-Queue: Junwei Fu <junwei.fu@intel.com> Cr-Commit-Position: refs/heads/master@{#577368} [modify] https://crrev.com/29d124ffc18e63c6699c0b8828734d975e31106a/base/mac/sdk_forward_declarations.h [modify] https://crrev.com/29d124ffc18e63c6699c0b8828734d975e31106a/services/shape_detection/barcode_detection_impl_mac_unittest.mm [modify] https://crrev.com/29d124ffc18e63c6699c0b8828734d975e31106a/services/shape_detection/barcode_detection_impl_mac_vision.h [modify] https://crrev.com/29d124ffc18e63c6699c0b8828734d975e31106a/services/shape_detection/barcode_detection_impl_mac_vision.mm [modify] https://crrev.com/29d124ffc18e63c6699c0b8828734d975e31106a/services/shape_detection/barcode_detection_provider_mac.mm |
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Jun 19 2018