Page MenuHomePhabricator

Face detection failing on featured article for Feb 11 "Josiah Willard Gibbs" on feed but works fine if saved and viewed from saved pages
Closed, DeclinedPublic

Description

Failing on feed:

Screen Shot 2016-02-12 at 2.28.27 PM.png (974×1,602 px, 600 KB)

But ok when saved:

Screen Shot 2016-02-12 at 2.28.31 PM.png (974×1,602 px, 874 KB)

Event Timeline

Mhurd raised the priority of this task from to Needs Triage.
Mhurd updated the task description. (Show Details)
Mhurd added a project: Wikipedia-iOS-App.
Mhurd moved this task to Needs Triage on the Wikipedia-iOS-App board.
Mhurd subscribed.
Mhurd renamed this task from Face detection failing on featured article for Feb 11 "Josiah Willard Gibbs" on feed but works fine if saved and viewed form saved pages to Face detection failing on featured article for Feb 11 "Josiah Willard Gibbs" on feed but works fine if saved and viewed from saved pages.Feb 12 2016, 10:30 PM
Mhurd set Security to None.
Mhurd added a subscriber: • BGerstle-WMF.
• JMinor subscribed.

Also worked properly when reading the article, just not on Explore.

MBinder_WMF subscribed.

@JMinor this is tagged with 5.0.1. Do we want it on the dev board, and if we do, why not v5?

Was going over this for about an hour on Friday…

So it looks like face detection is actually failing to detect the face on the explore screen sometimes. In the debugger you can clearly see that the CIDetector returns 0 faces for an image that has faces - this can happen sometimes. What is strange is that when the same image is attempted again when showing the article, a face IS detected. (By same image I mean literally the same size/quality - i.e. the same url)

I tried playing with the accuracy of the face detector but that didn't help.

Need to brainstorm on this a bit.

• JMinor lowered the priority of this task from Medium to Low.Mar 7 2016, 8:40 PM
• JMinor moved this task from Needs Triage to Bug Backlog on the Wikipedia-iOS-App board.

Another article where face detection is failing on iO [submitted via OTRS]:

Jordan Spieth
eg of face detection failure on iOS (360×640 px, 180 KB)

Occurred on:
App Version: 5.2.0 (938)
Device: iPhone 8,1
iOS Version: 10.0.1

@JoeWalsh

Make a bit of progress on this:

On the featured article for Sept 17 - "Horatio Bottomley", the face detection wasn't working on the feed card, but if I use "CIDetectorAccuracyHigh" it does start working, but only on device, not on the simulator. (Is the cpu face detection broken?)

Note: had to do clean installs between tests as we cache face detection coords iirc.

I think we should use "CIDetectorAccuracyHigh" - back when first implementing the face detection I recall repeated encounters with images where "Low" wasn't able to detect the face, as with Horatio.

Note switching to "High" didn't fix face detection on the article view - there appears to be a separate bug there - the article view may not be using face detection at all?

@Mhurd when I profiled this for https://github.com/wikimedia/wikipedia-ios/pull/772 , face detection was by far the most expensive thing the app was doing when set to CIDetectorAccuracyHigh. I'd say that the tradeoff for users is better with CIDetectorAccuracyLow given that it's almost as good as CIDetectorAccuracyHigh without the extra overhead.

This comment was removed by JoeWalsh.

@JoeWalsh

face detection was by far the most expensive thing the app was doing when set to CIDetectorAccuracyHigh

True, but I the bug I mentioned in the comment above still needs to be fixed - i.e. where it's working on the feed card but not the article view.

In regards to performance could we try:

  • using CIDetectorAccuracyHigh when it's a card type image and CIDetectorAccuracyLow if it's an icon?
  • using CIDetectorAccuracyHigh when it's newer hardware where performance really isn't an issue?

Maybe both?

It's just really looks bad when it happens :/

Side note: ideally face coords stored as unit vector so once we've calculated it we can use it for any size variant of the image w/o having to recalculate.

I think we've made enough good faith effort to make it better.