Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 Search Documentation | 2025.5

# Connect an image tagging model

Follow these instructions to connect and configure an image tagging model for P4 Search.

To learn more about setting configurations manually, see Configure P4 Search locally.

## Set up auto-tagging with Azure Tags

1. Set the auto-tagging model to AzureTagsModel:

com.perforce.p4search.auto-detect.model=AzureTagsModel

2. Specify the auto-tagging service hostname. For example:

com.perforce.p4search.auto-detect.host=https://my.cognitiveservices.azure.com

3. Specify the language you want 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

4. Enter the API key for your auto-tagging service. For example:

com.perforce.p4search.auto-detect.key=0123456789ABCDEF0123456789ABCDEF

5. 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

6. Specify the automatic best image detection results limit. Defaults to 10 results:

com.perforce.p4search.auto-detect.best=10

All the configurations together:

com.perforce.p4search.auto-detect.model=AzureTagsModel

com.perforce.p4search.auto-detect.host=https://my.cognitiveservices.azure.com

com.perforce.p4search.auto-detect.lang=en

com.perforce.p4search.auto-detect.key=0123456789ABCDEF0123456789ABCDEF

com.perforce.p4search.auto-detect.threshold=0.1

com.perforce.p4search.auto-detect.best=10

## Set up auto-tagging with Rekognition Labels

1. Set the auto-tagging model to RekognitionLabelsModel:

com.perforce.p4search.auto-detect.model=RekognitionLabelsModel

2. Specify the auto-tagging service region as host. For example:

com.perforce.p4search.auto-detect.host=us-east-2

3. Specify the language you want 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

4. 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

5. 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

6. Specify the automatic best image detection results limit. Defaults to 10 results:

com.perforce.p4search.auto-detect.best=10

All the configurations together:

com.perforce.p4search.auto-detect.model=RekognitionLabelsModel

com.perforce.p4search.auto-detect.host=us-east-2

com.perforce.p4search.auto-detect.lang=en

com.perforce.p4search.auto-detect.key=ABCDEFGHIJKL12345678:ab0cd1ef2gh3IJ4aaaBBBcccWWW111rfc1234YERTpp

com.perforce.p4search.auto-detect.threshold=0.1

com.perforce.p4search.auto-detect.best=10

## Set up auto-tagging with Google Labels

1. Set the auto-tagging model to GoogleLabelModel:

com.perforce.p4search.auto-detect.model=GoogleLabelModel

2. Specify the auto-tagging service hostname. For example:

com.perforce.p4search.auto-detect.host=https://vision.googleapis.com

3. Specify the language you want 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

4. Enter the API key for your auto-tagging service. For example:

com.perforce.p4search.auto-detect.key=AbcdEFG12345ZXvfe56210QWErtyui123456789

5. 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

6. Specify the automatic best image detection results limit. Defaults to 10 results:

com.perforce.p4search.auto-detect.best=10

All the configurations together:

com.perforce.p4search.auto-detect.model=GoogleLabelModel

com.perforce.p4search.auto-detect.host=https://vision.googleapis.com

com.perforce.p4search.auto-detect.lang=en

com.perforce.p4search.auto-detect.key=AbcdEFG12345ZXvfe56210QWErtyui123456789

com.perforce.p4search.auto-detect.threshold=0.1

com.perforce.p4search.auto-detect.best=10

## Set up auto-tagging with DeepDetect

1. Set the auto-tagging model to DeepDetectModel:

com.perforce.p4search.auto-detect.model=DeepDetectModel

2. Specify the auto-tagging service hostname. For example:

com.perforce.p4search.auto-detect.host=https://localhost:8888

3. Specify the language you want the image tags to be generated in. See your auto-tagging service documentation for supported languages.

   DeepDetect does not support multiple languages. Leave empty for DeepDetect:

com.perforce.p4search.auto-detect.lang=

4. Enter the API key for your auto-tagging service.

   DeepDetect does not support an API key. Default is empty:

com.perforce.p4search.auto-detect.key=

5. 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

6. Specify the automatic best image detection results limit. Defaults to 10 results:

com.perforce.p4search.auto-detect.best=10

7. Specify the classification service you want to use for image tags. For example, `classification_21k` if you are using the DeepDetect 21k pre-trained model:

com.perforce.p4search.auto-detect.service=classification_21k

All the configurations together:

com.perforce.p4search.auto-detect.model=DeepDetectModel

com.perforce.p4search.auto-detect.host=http://localhost:8888

com.perforce.p4search.auto-detect.lang=

com.perforce.p4search.auto-detect.key=

com.perforce.p4search.auto-detect.threshold=0.1

com.perforce.p4search.auto-detect.best=10

com.perforce.p4search.auto-detect.service=classification_21k

To learn more about using a pretrained model, see DeepDetect's Setup of an image classifier.

Example curl request to load the DeepDetect 21k pretrained model:

    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

Your search for returned results