title: Firebase ML Kit does not detect faces
body: <p>I am using Google Firebase's ML Kit to detect facial contours of images captured from the phone camera. However, it doesn't actually detect any faces. I've verified that the image was captured and saved properly from the camera by displaying the image in an ImageView. I also made sure to add </p>
  
  <pre><code> &lt;meta-data android:name="com.google.android.gms.vision.DEPENDENCIES" android:value="face"/&gt;
  </code></pre>
  
  <p>to AndroidManifest.xml and </p>
  
  <pre><code>implementation 'com.google.firebase:firebase-ml-vision:24.0.1'
  implementation 'com.google.firebase:firebase-ml-vision-face-model:19.0.0'
  </code></pre>
  
  <p>to the app's build.gradle.</p>
  
  <p>Here's the Firebase code:</p>
  
  <pre><code>        FirebaseApp.initializeApp(context);
          FirebaseVisionFaceDetectorOptions realTimeOpts =
                  new FirebaseVisionFaceDetectorOptions.Builder()
                          .setPerformanceMode(FirebaseVisionFaceDetectorOptions.ACCURATE)
                          .setContourMode(FirebaseVisionFaceDetectorOptions.ALL_CONTOURS)
                          .build();
  
          fbImage = FirebaseVisionImage.fromBitmap(portrait);
  
  
          FirebaseVisionFaceDetector detector = FirebaseVision.getInstance()
                  .getVisionFaceDetector(realTimeOpts);
  
          Task&lt;List&lt;FirebaseVisionFace&gt;&gt; result =
                  detector.detectInImage(fbImage)
                          .addOnSuccessListener(
                                  new OnSuccessListener&lt;List&lt;FirebaseVisionFace&gt;&gt;() {
                                      @Override
                                      public void onSuccess(List&lt;FirebaseVisionFace&gt; faces) {
  
                                          Log.d(TAG, "No. Faces Detected: " + faces.size());
  
  
                                      }
                                  })
                          .addOnFailureListener(
                                  new OnFailureListener() {
                                      @Override
                                      public void onFailure(@NonNull Exception e) {
                                          Log.d(TAG, e.getMessage());
                                      }
                                  });
  </code></pre>
  
  <p>Does anyone know why this might not be detecting anything?</p>