vision-api

Google Cloud Vision Api only return “name”

跟風遠走 提交于 2019-12-13 03:40:08
问题 I am trying to use Google Cloud Vision API. I am using the REST API in this link. POST https://vision.googleapis.com/v1/files:asyncBatchAnnotate My request is { "requests": [ { "inputConfig": { "gcsSource": { "uri": "gs://redaction-vision/pdf_page1_employment_request.pdf" }, "mimeType": "application/pdf" }, "features": [ { "type": "DOCUMENT_TEXT_DETECTION" } ], "outputConfig": { "gcsDestination": { "uri": "gs://redaction-vision" } } } ] } But the response is always only "name" like below: {

Google Vision API authentication on heroku

≯℡__Kan透↙ 提交于 2019-12-07 16:02:17
问题 What is a best, simple way to authenticate Vision API on heroku? In development I just use: @vision = Google::Cloud::Vision.new( project: "instacult", keyfile: "path/to/keyfile.json" ) Where keyfile is a json produced by google after creating service account (https://cloud.google.com/vision/docs/common/auth). But obviously I can't just upload the keyfile to github. I tried saving whole json to Heroku's config vars and running: Rails.env.production? ? ENV["GOOGLE_CREDENTIALS"] : path But I got

Take picture with drawable/paint on face using vision api

﹥>﹥吖頭↗ 提交于 2019-12-03 11:38:14
问题 What I am trying? I am trying to take picture with drawable/paint on face but, i am not able to get both on same picture. What I have tried? I have tried using CameraSource.takePicture but i am just getting face without any drawable/paint on it. mCameraSource.takePicture(shutterCallback, new CameraSource.PictureCallback() { @Override public void onPictureTaken(byte[] bytes) { try { String mainpath = getExternalStorageDirectory() + separator + "TestXyz" + separator + "images" + separator; File

Take picture with drawable/paint on face using vision api

风格不统一 提交于 2019-12-03 02:02:27
What I am trying? I am trying to take picture with drawable/paint on face but, i am not able to get both on same picture. What I have tried? I have tried using CameraSource.takePicture but i am just getting face without any drawable/paint on it. mCameraSource.takePicture(shutterCallback, new CameraSource.PictureCallback() { @Override public void onPictureTaken(byte[] bytes) { try { String mainpath = getExternalStorageDirectory() + separator + "TestXyz" + separator + "images" + separator; File basePath = new File(mainpath); if (!basePath.exists()) Log.d("CAPTURE_BASE_PATH", basePath.mkdirs() ?

mobile vision API takes too long to detect face

丶灬走出姿态 提交于 2019-12-02 10:16:09
问题 I am using mobile vision API to detect face in android app. I have used SparseArray of Face to store the references to faces, but the detector.detect(frame) method takes too long (15 seconds) to detect face. Note: I am passing the bitmap of the image taken by camera to detectFaces method. My code is below void detectFaces(Context context, Bitmap picture){ com.google.android.gms.vision.face.FaceDetector detector = new com.google.android.gms.vision.face.FaceDetector.Builder(context)

mobile vision API takes too long to detect face

别说谁变了你拦得住时间么 提交于 2019-12-02 07:20:47
I am using mobile vision API to detect face in android app. I have used SparseArray of Face to store the references to faces, but the detector.detect(frame) method takes too long (15 seconds) to detect face. Note: I am passing the bitmap of the image taken by camera to detectFaces method. My code is below void detectFaces(Context context, Bitmap picture){ com.google.android.gms.vision.face.FaceDetector detector = new com.google.android.gms.vision.face.FaceDetector.Builder(context) .setTrackingEnabled(false) .setClassificationType(com.google.android.gms.vision.face.FaceDetector.ALL