Add Java junit tests for Shape Detection |
|||
Issue descriptionAs said, add Junit Tests.
,
May 18 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e268ff50e685b07e22e4c1d2e59d70e93c36a1a0 commit e268ff50e685b07e22e4c1d2e59d70e93c36a1a0 Author: treib <treib@chromium.org> Date: Thu May 18 09:06:35 2017 Revert of Shape Detection: Face detection junit tests (patchset #4 id:180001 of https://codereview.chromium.org/2863773005/ ) Reason for revert: The news tests are flaky, they've failed in 3 out of 4 runs right now: https://build.chromium.org/p/chromium.linux/builders/Android%20Tests Original issue's description: > Shape Detection: Face detection junit tests > > This CL adds two robolectric Junit tests: > > - one for SharedBufferUtils, which tests error conditions such > as unmappable buffer, wrong dimensions, or wrong map()ped size > > - one for Face Detection, that verifies that the given callback > is called with the appropriate arguments in a series of cases. > This test is parameterized with a boolean indicating fast-mode > or not. > > Added alongside the (relatively new) service_junit_tests. > > BUG= 722931 > CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.mac:mac_optional_gpu_tests_rel > > Review-Url: https://codereview.chromium.org/2863773005 > Cr-Commit-Position: refs/heads/master@{#472679} > Committed: https://chromium.googlesource.com/chromium/src/+/5bd36b1f586432d4b127d956a4b3c355e19a9f3d TBR=rockot@chromium.org,scheib@chromium.org,mcasas@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= 722931 Review-Url: https://codereview.chromium.org/2886943008 Cr-Commit-Position: refs/heads/master@{#472748} [modify] https://crrev.com/e268ff50e685b07e22e4c1d2e59d70e93c36a1a0/services/BUILD.gn [modify] https://crrev.com/e268ff50e685b07e22e4c1d2e59d70e93c36a1a0/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImpl.java [delete] https://crrev.com/43102f798945c3fb8179e9841046d4015ebe9127/services/shape_detection/android/junit/src/org/chromium/shape_detection/FaceDetectionImplTest.java [delete] https://crrev.com/43102f798945c3fb8179e9841046d4015ebe9127/services/shape_detection/android/junit/src/org/chromium/shape_detection/SharedBufferUtilsTest.java
,
May 19 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/440ee8acf5fc2995762db08f722aa060b14a5e5d commit 440ee8acf5fc2995762db08f722aa060b14a5e5d Author: mcasas <mcasas@chromium.org> Date: Fri May 19 02:49:47 2017 RELAND: Shape Detection: Face detection junit tests The original CL got reverted due to a given test timing out in bots (might be slow). This CL, in the interest of increasing coverage, lands the part that worked fine: SharedBufferUtilsTest.java, and removes the FaceDetectionImplTest.java and mods to FaceDetectionImpl.java. TBR=rockot@chromium.org, scheib@chromium.org since it's a strict subset of the reviewed-approved CL. Original CL ----------------------------------------------------------- Shape Detection: Face detection junit tests This CL adds two robolectric Junit tests: - one for SharedBufferUtils, which tests error conditions such as unmappable buffer, wrong dimensions, or wrong map()ped size - one for Face Detection, that verifies that the given callback is called with the appropriate arguments in a series of cases. This test is parameterized with a boolean indicating fast-mode or not. Added alongside the (relatively new) service_junit_tests. BUG= 722931 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.mac:mac_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2863773005 Cr-Commit-Position: refs/heads/master@{#472679} Committed: https://chromium.googlesource.com/chromium/src/+/5bd36b1f586432d4b127d956a4b3c355e19a9f3d patch from issue 2863773005 at patchset 180001 (http://crrev.com/2863773005#ps180001) Review-Url: https://codereview.chromium.org/2891153003 Cr-Commit-Position: refs/heads/master@{#473045} [modify] https://crrev.com/440ee8acf5fc2995762db08f722aa060b14a5e5d/services/BUILD.gn [add] https://crrev.com/440ee8acf5fc2995762db08f722aa060b14a5e5d/services/shape_detection/android/junit/src/org/chromium/shape_detection/SharedBufferUtilsTest.java
,
Jun 8 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3a0467d09ee04895790ebc65034a3537aeb97efd commit 3a0467d09ee04895790ebc65034a3537aeb97efd Author: Conley Owens <cco3@chromium.org> Date: Thu Jun 08 20:47:24 2017 Add instrumentation tests for face detection Currently Android face detection has no tests. This change rectifies that situation. These are instrumentation test rather than junit tests because face detection doesn't actually return any results in junit. The tests are registered to run as part of chrome_test_java. These are run on the linux_android_rel_ng trybots. BUG= 718329 , 722931 Change-Id: I512aa4391f6910c7992781fb59cb9cd0bbd5fe58 Reviewed-on: https://chromium-review.googlesource.com/523013 Commit-Queue: Conley Owens <cco3@chromium.org> Reviewed-by: Tommy Nyquist <nyquist@chromium.org> Reviewed-by: Ken Rockot <rockot@chromium.org> Reviewed-by: Miguel Casas <mcasas@chromium.org> Cr-Commit-Position: refs/heads/master@{#478078} [modify] https://crrev.com/3a0467d09ee04895790ebc65034a3537aeb97efd/chrome/android/BUILD.gn [modify] https://crrev.com/3a0467d09ee04895790ebc65034a3537aeb97efd/services/BUILD.gn [add] https://crrev.com/3a0467d09ee04895790ebc65034a3537aeb97efd/services/shape_detection/android/javatests/src/org/chromium/shape_detection/FaceDetectionImplTest.java [modify] https://crrev.com/3a0467d09ee04895790ebc65034a3537aeb97efd/services/shape_detection/face_detection_impl_mac_unittest.mm [add] https://crrev.com/3a0467d09ee04895790ebc65034a3537aeb97efd/services/test/data/mona_lisa.jpg
,
Jul 6 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/afd27c28465fe877c97f3c6a0afb96eeff36fce8 commit afd27c28465fe877c97f3c6a0afb96eeff36fce8 Author: junweifu <junwei.fu@intel.com> Date: Thu Jul 06 04:33:52 2017 ShapeDetection: Get the face bounding box based on eye distance This CL changes the calculation of the face bounding box to be based on eye distance where possible, because the GMScore and Android Face APIs give different results. Extend tests for Gms core which will be used to detect face when google play services is available. These new tests end up being rolled up in chrome_public_test_apk. BUG= 722931 Cq-Include-Trybots: master.tryserver.chromium.mac:mac_optional_gpu_tests_rel Change-Id: I0c685a7cc15e5b318c8eedeff93eeba93379e86b Reviewed-on: https://chromium-review.googlesource.com/554100 Reviewed-by: Ken Rockot <rockot@chromium.org> Reviewed-by: Miguel Casas <mcasas@chromium.org> Commit-Queue: Han Leon <leon.han@intel.com> Cr-Commit-Position: refs/heads/master@{#484466} [modify] https://crrev.com/afd27c28465fe877c97f3c6a0afb96eeff36fce8/services/BUILD.gn [modify] https://crrev.com/afd27c28465fe877c97f3c6a0afb96eeff36fce8/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImplGmsCore.java [modify] https://crrev.com/afd27c28465fe877c97f3c6a0afb96eeff36fce8/services/shape_detection/android/javatests/src/org/chromium/shape_detection/FaceDetectionImplTest.java
,
Jul 18 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6e506244559a983c5629a4733341d005dc4e216b commit 6e506244559a983c5629a4733341d005dc4e216b Author: junweifu <junwei.fu@intel.com> Date: Tue Jul 18 04:01:34 2017 ShapeDetection: Add instrumentation test for QR code detection Move common function to a utility class which provides support for reading files and converting Bitmaps to mojom.Bitmaps for testing. Add instrumentation test for QR code detection on Android Platform, the tested qr_code.png is QR code the value of it is https://chromium.org. These new test end up being rolled up in chrome_public_test_apk. BUG= 722931 Change-Id: I1961efdb8263a26f2075fd567904bc17713270b3 Reviewed-on: https://chromium-review.googlesource.com/566541 Reviewed-by: Ken Rockot <rockot@chromium.org> Reviewed-by: Yuzhu Shen <yzshen@chromium.org> Reviewed-by: Miguel Casas <mcasas@chromium.org> Commit-Queue: Han Leon <leon.han@intel.com> Cr-Commit-Position: refs/heads/master@{#487379} [modify] https://crrev.com/6e506244559a983c5629a4733341d005dc4e216b/services/BUILD.gn [add] https://crrev.com/6e506244559a983c5629a4733341d005dc4e216b/services/shape_detection/android/javatests/src/org/chromium/shape_detection/BarcodeDetectionImplTest.java [modify] https://crrev.com/6e506244559a983c5629a4733341d005dc4e216b/services/shape_detection/android/javatests/src/org/chromium/shape_detection/FaceDetectionImplTest.java [add] https://crrev.com/6e506244559a983c5629a4733341d005dc4e216b/services/shape_detection/android/javatests/src/org/chromium/shape_detection/TestUtils.java [add] https://crrev.com/6e506244559a983c5629a4733341d005dc4e216b/services/test/data/qr_code.png
,
Jul 18 2017
,
Aug 1 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2b88afe5564ad666295deaa439490dfc004930f6 commit 2b88afe5564ad666295deaa439490dfc004930f6 Author: junweifu <junwei.fu@intel.com> Date: Tue Aug 01 07:41:04 2017 ShapeDetection: Add instrumentation test for text detection Add a method to generate tested bitmap with drawing texts on new canvas for testing flexibility. Add instrumentation test for text detection on Android Platform, these new test end up being rolled up in chrome_public_test_apk. BUG= 722931 Cq-Include-Trybots: master.tryserver.chromium.mac:mac_optional_gpu_tests_rel Change-Id: I769c7fb09f5e7e40be9190bb6c13ea6a31a43645 Reviewed-on: https://chromium-review.googlesource.com/578585 Commit-Queue: Junwei Fu <junwei.fu@intel.com> Reviewed-by: Miguel Casas <mcasas@chromium.org> Reviewed-by: Yuzhu Shen <yzshen@chromium.org> Cr-Commit-Position: refs/heads/master@{#490903} [modify] https://crrev.com/2b88afe5564ad666295deaa439490dfc004930f6/services/BUILD.gn [modify] https://crrev.com/2b88afe5564ad666295deaa439490dfc004930f6/services/shape_detection/android/javatests/src/org/chromium/shape_detection/BarcodeDetectionImplTest.java [modify] https://crrev.com/2b88afe5564ad666295deaa439490dfc004930f6/services/shape_detection/android/javatests/src/org/chromium/shape_detection/FaceDetectionImplTest.java [modify] https://crrev.com/2b88afe5564ad666295deaa439490dfc004930f6/services/shape_detection/android/javatests/src/org/chromium/shape_detection/TestUtils.java [add] https://crrev.com/2b88afe5564ad666295deaa439490dfc004930f6/services/shape_detection/android/javatests/src/org/chromium/shape_detection/TextDetectionImplTest.java
,
Aug 21 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0c91f5ea705ed829e1ed324e71497a21b2876c32 commit 0c91f5ea705ed829e1ed324e71497a21b2876c32 Author: junweifu <junwei.fu@intel.com> Date: Mon Aug 21 01:38:36 2017 ShapeDetection: Adjust face bounding box at a range of different angles The bounding box based on eye distance can't cover face like screen shot [1] when the face rotates the axis Z of image, so rough estimate bounding box. The middle point isn't half of eyes distance like green line in screen shot [2] when the face rotates the vertical axis of the image, so get left bounding based on middle point x. Add tests for detecting mode on Android with different face angles. face_pose.png is generated with FaceGen [3] that is free to used the 2d rendered image. [1] https://drive.google.com/file/d/0ByE7KuCXbuahWHo2Q2N4RDJsZUE/view?usp=sharing [2] https://drive.google.com/file/d/0ByE7KuCXbuahN2g3YjkzRlpWNkE/view?usp=sharing [3] https://facegen.com/ BUG= 722931 Cq-Include-Trybots: master.tryserver.chromium.mac:mac_optional_gpu_tests_rel Change-Id: Iea58af29ff15ea71d0e1af6cc626d7cb7851722a Reviewed-on: https://chromium-review.googlesource.com/603076 Reviewed-by: Yuzhu Shen <yzshen@chromium.org> Reviewed-by: Reilly Grant <reillyg@chromium.org> Commit-Queue: Junwei Fu <junwei.fu@intel.com> Cr-Commit-Position: refs/heads/master@{#495859} [modify] https://crrev.com/0c91f5ea705ed829e1ed324e71497a21b2876c32/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImplGmsCore.java [modify] https://crrev.com/0c91f5ea705ed829e1ed324e71497a21b2876c32/services/shape_detection/android/javatests/src/org/chromium/shape_detection/FaceDetectionImplTest.java [add] https://crrev.com/0c91f5ea705ed829e1ed324e71497a21b2876c32/services/test/data/face_pose.png
,
Sep 5 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by bugdroid1@chromium.org
, May 18 2017