Connect an image tagging model
You can connect an image tagging model to P4 Search and configure it. You can only connect one image-tagging model at a time.
To learn more about setting configurables manually, see Configure P4 Search locally.
On this page:
Set up auto-tagging with Azure Tags
-
Set the auto-tagging model to AzureTagsModel:
com.perforce.p4search.auto-detect.model=AzureTagsModel
-
Specify the auto-tagging service hostname. For example:
com.perforce.p4search.auto-detect.host=https://my.cognitiveservices.azure.com
-
Enter the API key for your auto-tagging service. For example:
com.perforce.p4search.auto-detect.key=0123456789ABCDEF0123456789ABCDEF
-
Specify the language for the image tags to be generated in. See your auto-tagging service documentation for supported languages. For example:
com.perforce.p4search.auto-detect.lang=en
-
Specify the automatic image detection threshold for your auto-tagging service as a floating point percentage. For example, 0.1=10%:
com.perforce.p4search.auto-detect.threshold=0.1
-
Specify the automatic best image detection results limit. Defaults to 10 results:
com.perforce.p4search.auto-detect.best=10
com.perforce.p4search.auto-detect.model=AzureTagsModel
com.perforce.p4search.auto-detect.host=https://my.cognitiveservices.azure.com
com.perforce.p4search.auto-detect.key=0123456789ABCDEF0123456789ABCDEF
com.perforce.p4search.auto-detect.lang=en
com.perforce.p4search.auto-detect.threshold=0.1
com.perforce.p4search.auto-detect.best=10
Set up auto-tagging with Rekognition Labels
-
Set the auto-tagging model to RekognitionLabelsModel:
com.perforce.p4search.auto-detect.model=RekognitionLabelsModel
-
Specify the auto-tagging service hostname. For example:
com.perforce.p4search.auto-detect.host=us-east-2
-
Enter the API key for your auto-tagging service. The API key for the AWS Rekognition is a combination of <aws_access_key_id> and <aws_secret_access_key>. For example:
com.perforce.p4search.auto-detect.key=<aws_access_key_id>:<aws_secret_access_key>
where
ws_access_key_id=ABCDEFGHIJKL12345678
ws_secret_access_key=ab0cd1ef2gh3IJ4aaaBBBcccWWW111rfc1234YERTpp
gives
com.perforce.p4search.auto-detect.key=ABCDEFGHIJKL12345678:ab0cd1ef2gh3IJ4aaaBBBcccWWW111rfc1234YERTpp
-
Specify the language for the image tags to be generated in. See your auto-tagging service documentation for supported languages. For example:
com.perforce.p4search.auto-detect.lang=en
-
Specify the automatic image detection threshold for your auto-tagging service as a floating point percentage. For example, 0.1=10%:
com.perforce.p4search.auto-detect.threshold=0.1
-
Specify the automatic best image detection results limit. Defaults to 10 results:
com.perforce.p4search.auto-detect.best=10
com.perforce.p4search.auto-detect.model=RekognitionLabelsModel
com.perforce.p4search.auto-detect.host=us-east-2
com.perforce.p4search.auto-detect.key=ABCDEFGHIJKL12345678:ab0cd1ef2gh3IJ4aaaBBBcccWWW111rfc1234YERTpp
com.perforce.p4search.auto-detect.lang=en
com.perforce.p4search.auto-detect.threshold=0.1
com.perforce.p4search.auto-detect.best=10
Set up auto-tagging with Google Labels
-
Set the auto-tagging model to GoogleLabelModel:
com.perforce.p4search.auto-detect.model=GoogleLabelModel
-
Specify the auto-tagging service hostname. For example:
com.perforce.p4search.auto-detect.host=https://vision.googleapis.com
-
Enter the API key for your auto-tagging service. For example:
com.perforce.p4search.auto-detect.key=AbcdEFG12345ZXvfe56210QWErtyui123456789
-
Specify the language for the image tags to be generated in. See your auto-tagging service documentation for supported languages. For example:
com.perforce.p4search.auto-detect.lang=en
-
Specify the automatic image detection threshold for your auto-tagging service as a floating point percentage. For example, 0.1=10%:
com.perforce.p4search.auto-detect.threshold=0.1
-
Specify the automatic best image detection results limit. Defaults to 10 results:
com.perforce.p4search.auto-detect.best=10
com.perforce.p4search.auto-detect.model=GoogleLabelModel
com.perforce.p4search.auto-detect.host=https://vision.googleapis.com
com.perforce.p4search.auto-detect.key=AbcdEFG12345ZXvfe56210QWErtyui123456789
com.perforce.p4search.auto-detect.lang=en
com.perforce.p4search.auto-detect.threshold=0.1
com.perforce.p4search.auto-detect.best=10
Set up auto-tagging with OpenAI
-
Set the auto-tagging model to OpenAiDetectModel:
com.perforce.p4search.auto-detect.model=OpenAiDetectModel
-
Specify the auto-tagging service hostname. For example:
com.perforce.p4search.auto-detect.host=https://api.openai.com
-
Enter the API key for your auto-tagging service. For example:
com.perforce.p4search.auto-detect.key=proj-5X5ZtGcP8FRGCYOW9j5FAaA2anqLxBP9cYIS-GKllRZJEbjgL61VkiJ3A7Aug5MZPk0y7_izVtT5BlbkFJ7h4RMyvmUvf38ePc6zCQZYGry9imQyStWc02eC2yqorQVvqORwDblqwdabyJWnHIrm80JXAAAA
-
Specify the classification service to use for image tags. For example,
gpt-5-nanoif you are using the GPT 5 Nano model:com.perforce.p4search.auto-detect.service=gpt-5-nano
-
Specify the language for the image tags to be generated in. See your auto-tagging service documentation for supported languages. For example:
com.perforce.p4search.auto-detect.lang=korean,chinese
-
Specify the automatic image detection threshold for your auto-tagging service as a floating point percentage. For example, 0.6=60%:
com.perforce.p4search.auto-detect.threshold=0.6
-
Specify the automatic best image detection results limit. Defaults to 10 results:
com.perforce.p4search.auto-detect.best=10
-
Specify the query to use when tagging images. For example:
com.perforce.p4search.auto-detect.query="Identify objects in the image"
com.perforce.p4search.auto-detect.model=OpenAiDetectModel
com.perforce.p4search.auto-detect.host=https://api.openai.com
com.perforce.p4search.auto-detect.lang=korean,chinese
com.perforce.p4search.auto-detect.key=AbcdEFG12345ZXvfe56210QWErtyui123456789
com.perforce.p4search.auto-detect.service=gpt-5-nano
com.perforce.p4search.auto-detect.threshold=0.1
com.perforce.p4search.auto-detect.best=10
com.perforce.p4search.auto-detect.query="Identify the objects in the image"
Set up auto-tagging with P4 Detect
Before you can connect to P4 Detect, you must install and configure it. See Install P4 Detect with Docker and Configure P4 Detect.
-
Set the auto-tagging model to ClipModel:
com.perforce.p4search.auto-detect.model=ClipModel
-
Specify the auto-tagging service hostname. For example:
com.perforce.p4search.auto-detect.host=https://localhost:1608
-
Enter the X-Auth-Token for your auto-tagging service. For example:
com.perforce.p4search.auto-detect.key=00000000-0000-0000-0000-000000000000
-
Specify the classification service to use for image tags. For example, clip_model if you are using OpenAI's CLIP model:
com.perforce.p4search.auto-detect.service=clip_model
-
Specify the automatic image detection threshold for your auto-tagging service as a floating point percentage. For example, 0.1=10%:
com.perforce.p4search.auto-detect.threshold=0.6
-
Specify the automatic best image detection results limit. Defaults to 10 results:
com.perforce.p4search.auto-detect.best=10
com.perforce.p4search.auto-detect.model=ClipModel
com.perforce.p4search.auto-detect.host=https://localhost:1608
com.perforce.p4search.auto-detect.key=00000000-0000-0000-0000-000000000000
com.perforce.p4search.auto-detect.service=clip_model
com.perforce.p4search.auto-detect.threshold=0.1
com.perforce.p4search.auto-detect.best=10
Set up auto-tagging with DeepDetect
-
Set the auto-tagging model to DeepDetectModel:
com.perforce.p4search.auto-detect.model=DeepDetectModel
-
Specify the auto-tagging service hostname. For example:
com.perforce.p4search.auto-detect.host=https://localhost:8888
-
DeepDetect does not support an API key. Leave empty (the default):
com.perforce.p4search.auto-detect.key=
-
Specify the classification service to use for image tags. For example, classification_21k if you are using the DeepDetect 21k model:
com.perforce.p4search.auto-detect.service=classification_21k
-
Specify the language for the image tags to be generated in. DeepDetect does not support multiple languages. In this case, leave it empty:
com.perforce.p4search.auto-detect.lang=
-
Specify the automatic image detection threshold for your auto-tagging service as a floating point percentage. For example, 0.1=10%:
com.perforce.p4search.auto-detect.threshold=0.1
-
Specify the automatic best image detection results limit. Defaults to 10 results:
com.perforce.p4search.auto-detect.best=10
com.perforce.p4search.auto-detect.model=DeepDetectModel
com.perforce.p4search.auto-detect.host=http://localhost:8888
com.perforce.p4search.auto-detect.key=
com.perforce.p4search.auto-detect.service=classification_21k
com.perforce.p4search.auto-detect.lang=
com.perforce.p4search.auto-detect.threshold=0.1
com.perforce.p4search.auto-detect.best=10
To learn more about using a pretrained model, see DeepDetect's Setup of an image classifier.
curl -H "Content-Type: application/x-www-form-urlencoded" -X PUT
-d '{
"description": "generic image classification service",
"model": {
"repository": "/opt/models/classification_21k",
"init":"https://deepdetect.com/models/init/desktop/images/classification/classification_21k.tar.gz",
"create_repository": true
},
"mllib": "caffe",
"type": "supervised",
"parameters": {
"input": {
"connector": "image"
}
}
}' http://localhost:8888/services/classification_21k