title: android mobile vision api custom detector not detecting face
body: <p>I am exploring android vision api and following the github samples provided in android developers documentation.The sample application is detecting the faces.</p>
  
  <p><strong>I want to crop each of the detected faces.</strong>
  I have a <strong>rect obj</strong> having left,top,right,bottom coordinates.</p>
  
  <p><strong>But I lack the source Bitmap to crop the face.</strong></p>
  
  <p><strong>Things I have done</strong>:</p>
  
  <p>1.Tried using the custom detector given in this <a href="https://stackoverflow.com/questions/32299947/mobile-vision-api-concatenate-new-detector-object-to-continue-frame-processing/32314136">SOF post</a></p>
  
  <p>Here myFaceDetector's <strong>SparseArray detect(Frame frame) method is getting called repeatedly and it is not detecting the face.The Processor set is not getting called.</strong>
  I used the below code</p>
  
  <pre><code>    FaceDetector detector = new FaceDetector.Builder(context)
              .setClassificationType(FaceDetector.ALL_CLASSIFICATIONS)
              .build();
  
      MyFaceDetector myFaceDetector = new MyFaceDetector(detector);
  
      myFaceDetector.setProcessor(new MultiProcessor.Builder&lt;&gt;(new GraphicFaceTrackerFactory())
      .build());
  
      mCameraSource = new CameraSource.Builder(context, myFaceDetector)
              .setRequestedPreviewSize(640, 480)
              .setFacing(CameraSource.CAMERA_FACING_FRONT)
              .setRequestedFps(2.0f)
              .build();
  </code></pre>
  
  <p>The GraphicFaceTrackerFactory() is not getting called after the camera preview started.</p>
  
  <p>2.Tried to take the camera picture as source bitmap but struck in taking pictures continuously.</p>
  
  <p>Any help will be very useful.thanks in advance. </p>