Questions tagged [clarifai]

Image & Video Recognition API

The Clarifai API offers image and video recognition as a service. Whether you have one image or billions, you are only steps away from using artificial intelligence to recognize your visual content.

The API is built around a simple idea. You send inputs (an image or video) to the service and it returns predictions.

The type of prediction is based on what model you run the input through. For example, if you run your input through the 'food' model, the predictions it returns will contain concepts that the 'food' model knows about. If you run your input through the 'color' model, it will return predictions about the dominant colors in your image.

inputs outputs

Before you get started, if you haven't created an account and received your free API key, please do so before proceeding with this guide. You can begin making API calls for free, a credit card is not required.

Please note that your account will be limited to 100 API calls until you verify your email address. After verification, you will receive the full amount of API calls under your plan.

All API access is over HTTPS, and accessed via the https://api.clarifai.com domain. The relative path prefix /v2/ indicates that we are currently using version 2 of the API.

In the below examples, we use single brackets {variable} to indicate that this is a variable you should replace with a real value.

141 questions
38
votes
3 answers

Python, installing clarifai --> VS14.0 link.exe failed with exit status 1158

I've got a fresh installation of Python 3.6 + Selenium and now want to install Clarifai 2.0.21. The following command is failing: python -m pip install clarifai==2.0.21 At first it requested VC++ 14.0 but I had 14.1 (with VS2017), so I installed…
Sundancer
  • 536
  • 1
  • 4
  • 12
4
votes
3 answers

I need to send an image file to Clarifai server for image classification, but I keep getting "skipped frames, application doing too much work"

I'm using a new thread to send the file, and a bit of code snippet to convert the bitmap to a file. The converting from bitmap to file is REALLY slow, and it seems like the sending of information to clarifai doesn't do anything... //Convert bitmap…
McFiddlyWiddly
  • 547
  • 10
  • 29
3
votes
2 answers

React & Clarifai: Uncaught ReferenceError: process is not defined

I am build a React app using the face detect model from the Clarifai API. When I import Clarifai from "clarifai", I'm prompted with this warning by VS Code: Could not find a declaration file for module 'clarifai'.…
3
votes
1 answer

How to write a POST request using Alamofire and swift 4 for the Clarifai API?

I am relatively new to networking in Swift, and especially POST requests. I have read the documentation for the Clarifai API and for Alamofire, but haven't quite figured out how to write a working request using Alamofire. So far I have found the…
Thijs van der Heijden
  • 1,147
  • 1
  • 10
  • 25
2
votes
1 answer

ImportError: cannot import name 'Workflow' from 'clarifai.rest'

I'm running a .py file and this error shows up: ImportError: cannot import name 'Workflow' from 'clarifai.rest' (/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/clarifai-2.0.18-py3.10.egg/clarifai/rest/__init__.py)
2
votes
1 answer

Clarifai api referenceerror : process is not defined

I get such an error on npm start on clarifai api [1]: https://i.stack.imgur.com/pHRNz.png Open bootstrap:27: // Execute the module function try { var execOptions = { id: moduleId, module: module, factory:…
zanthez
  • 45
  • 6
2
votes
2 answers

gRPC failed to connect to all addresses - Python

I am trying to connect to Clarifai's 'general' image classification model to label images using the following Python script: #python program to analyze an image and label…
Eshaan Gupta
  • 614
  • 8
  • 25
2
votes
2 answers

Clarifai returns handshake error when using GRPC Python Client

I tried using the clarify-python-grpc client and it worked great. Here I just wanted to try the demographics model for testing. It worked 2 weeks ago but I think there was an update to grpc which leads to this bug. from…
Bernardo
  • 86
  • 7
2
votes
1 answer

How to detect Faces for Local Image using Clarifai

I'm trying to detect Faces from Images Which I am taking from Local Folder using Clarifai API. But I am unable to do so and getting an object as response. Then Network tab shows as pending and gives empty object {} I have used the sdk script in…
jarivak
  • 828
  • 13
  • 28
2
votes
2 answers

Clarifai: "Malformed or invalid request"

I have the following Python code that makes a POST request to Clarifai's demographics endpoint: import requests import pprint headers = { "Authorization": "Key MY_KEY", "Content-Type": "application/json" } data = {"inputs": [{"data":…
ElsaInSpirit
  • 341
  • 6
  • 16
2
votes
1 answer

How to generate JSON string in Swift 3?

I am trying to send a request to an API that requires this format: { "inputs": [ { "data": { "image": { "base64": "iVBORw0KGgoAAAIVnFT/DPAAAAAElFTkSuQmCC..." } …
jtrenton
  • 23
  • 1
  • 4
2
votes
1 answer

On Clarifai API, does the general models have static concept IDs?

When getting the list of concepts of "general-v1.3" model using the API using the following request curl -X GET \ https://api.clarifai.com/v2/models/aaa03c23b3724a16a56b629203edc62c/output_info \ -H 'authorization: Key xxx-api-key-xxx' I'm getting…
kbogtob
  • 21
  • 1
2
votes
1 answer

Checking for at least one instance of keyword in list

I'm using Clarifai's API in Python to get concept names from a photo and would like to determine if any of them match a local variable. The following command invokes a list: In [1]: p1_response = model.predict_by_filename(filename='PATH_TO_FILE') …
solo
  • 743
  • 2
  • 6
  • 17
2
votes
1 answer

How to display json stringify array data in node.js "html page"?

I have a JSON data array which is the response of the predict(...) call from Clarifai recognition and I am trying to display the array of data in my HTML. I use ng-repeat to display the array but it doesn't work. How can I display the array in the…
Ekoo Chaan
  • 23
  • 6
2
votes
1 answer

Can't instantiate abstract class clarifai2.dto.ClarifaiStatus

Using Clarifai for Android getting error while invoking Clarifai W/System.err: java.lang.RuntimeException: Failed to invoke clarifai2.dto.ClarifaiStatus() with no args W/System.err: at…
Asmita09
  • 51
  • 7
1
2 3
9 10