Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Issue 2868883003: Shape Detection: use Google Play services Face detection where available (Closed)

Created:
3 years, 7 months ago by mcasas
Modified:
3 years, 7 months ago
CC:
chromium-reviews, agrieve+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Shape Detection: use Google Play services Face detection where available This CL adds support for Face Detection using Google Play Services in FaceDetectionImplGmsCore. FaceDetectionProviderImpl will create a GMSCore detector if and when GMS Core is available, falling back to android.media.FaceDetector otherwise. Also the common code dealing with transforming a SharedBufferHandle into a Frame is moved to SharedBufferUtils.java, convertToFrame(), and the calls sites refactored. BUG=718693, 720019 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.mac:mac_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2868883003 Cr-Commit-Position: refs/heads/master@{#470585} Committed: https://chromium.googlesource.com/chromium/src/+/7f4fc07c75a0a3908059deb0dae280eafa0bb1da

Patch Set 1 #

Patch Set 2 : Added landmark retrieval #

Patch Set 3 : Extracted SharedMemory-->Frame conversion #

Total comments: 4

Patch Set 4 : reillyg@s comments #

Total comments: 2

Patch Set 5 : reillyg@ nit and filling faceArray[i].landmarks in FaceDetectionImpl.java #

Total comments: 3

Messages

Total messages: 38 (20 generated)
mcasas
reillyg@ PTAL
3 years, 7 months ago (2017-05-09 04:19:09 UTC) #4
Reilly Grant (use Gerrit)
https://codereview.chromium.org/2868883003/diff/40001/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImplGmsCore.java File services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImplGmsCore.java (right): https://codereview.chromium.org/2868883003/diff/40001/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImplGmsCore.java#newcode62 services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImplGmsCore.java:62: if (!mFaceDetector.isOperational()) { Is the download triggered by the ...
3 years, 7 months ago (2017-05-09 16:10:08 UTC) #5
mcasas
ptal https://codereview.chromium.org/2868883003/diff/40001/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImplGmsCore.java File services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImplGmsCore.java (right): https://codereview.chromium.org/2868883003/diff/40001/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImplGmsCore.java#newcode62 services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImplGmsCore.java:62: if (!mFaceDetector.isOperational()) { On 2017/05/09 16:10:07, Reilly Grant ...
3 years, 7 months ago (2017-05-09 18:22:36 UTC) #6
Reilly Grant (use Gerrit)
lgtm with a nit https://codereview.chromium.org/2868883003/diff/60001/services/shape_detection/android/java/src/org/chromium/shape_detection/SharedBufferUtils.java File services/shape_detection/android/java/src/org/chromium/shape_detection/SharedBufferUtils.java (right): https://codereview.chromium.org/2868883003/diff/60001/services/shape_detection/android/java/src/org/chromium/shape_detection/SharedBufferUtils.java#newcode42 services/shape_detection/android/java/src/org/chromium/shape_detection/SharedBufferUtils.java:42: frame = new Frame.Builder().setBitmap(bitmap).build(); return ...
3 years, 7 months ago (2017-05-09 18:43:13 UTC) #7
mcasas
https://codereview.chromium.org/2868883003/diff/60001/services/shape_detection/android/java/src/org/chromium/shape_detection/SharedBufferUtils.java File services/shape_detection/android/java/src/org/chromium/shape_detection/SharedBufferUtils.java (right): https://codereview.chromium.org/2868883003/diff/60001/services/shape_detection/android/java/src/org/chromium/shape_detection/SharedBufferUtils.java#newcode42 services/shape_detection/android/java/src/org/chromium/shape_detection/SharedBufferUtils.java:42: frame = new Frame.Builder().setBitmap(bitmap).build(); On 2017/05/09 18:43:13, Reilly Grant ...
3 years, 7 months ago (2017-05-09 19:08:14 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2868883003/80001
3 years, 7 months ago (2017-05-09 20:59:55 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/264207)
3 years, 7 months ago (2017-05-09 21:23:39 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2868883003/80001
3 years, 7 months ago (2017-05-09 22:50:22 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_TIMED_OUT, build has not started yet; ...
3 years, 7 months ago (2017-05-10 00:53:09 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2868883003/80001
3 years, 7 months ago (2017-05-10 00:59:27 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, build has not started yet; ...
3 years, 7 months ago (2017-05-10 03:04:52 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2868883003/80001
3 years, 7 months ago (2017-05-10 03:33:58 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/449545)
3 years, 7 months ago (2017-05-10 07:27:00 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2868883003/80001
3 years, 7 months ago (2017-05-10 14:52:03 UTC) #32
commit-bot: I haz the power
Committed patchset #5 (id:80001) as https://chromium.googlesource.com/chromium/src/+/7f4fc07c75a0a3908059deb0dae280eafa0bb1da
3 years, 7 months ago (2017-05-10 15:49:21 UTC) #35
Reilly Grant (use Gerrit)
https://codereview.chromium.org/2868883003/diff/80001/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImpl.java File services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImpl.java (right): https://codereview.chromium.org/2868883003/diff/80001/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImpl.java#newcode109 services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImpl.java:109: faceArray[i].landmarks = new Landmark[0]; Why did this become necessary?
3 years, 7 months ago (2017-05-11 18:45:22 UTC) #36
mcasas
https://codereview.chromium.org/2868883003/diff/80001/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImpl.java File services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImpl.java (right): https://codereview.chromium.org/2868883003/diff/80001/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImpl.java#newcode109 services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImpl.java:109: faceArray[i].landmarks = new Landmark[0]; On 2017/05/11 18:45:22, Reilly Grant ...
3 years, 7 months ago (2017-05-11 18:51:23 UTC) #37
mcasas
3 years, 7 months ago (2017-05-11 19:00:58 UTC) #38
Message was sent while issue was closed.
https://codereview.chromium.org/2868883003/diff/80001/services/shape_detectio...
File
services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImpl.java
(right):

https://codereview.chromium.org/2868883003/diff/80001/services/shape_detectio...
services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImpl.java:109:
faceArray[i].landmarks = new Landmark[0];
On 2017/05/11 18:51:22, mcasas wrote:
> On 2017/05/11 18:45:22, Reilly Grant wrote:
> > Why did this become necessary?
> 
> I believe leaving it empty caused a problem when
> deserializing: |landmarks| is an array of mojo Structs.

Correction: it fails in the serialization:
> Magic Signature: [Android Java Exception]
org.chromium.mojo.bindings.SerializationException at
org.chromium.mojo.bindings.Encoder.encodeNullPointer(Encoder.java)

Powered by Google App Engine
This is Rietveld 408576698