Customization

Different levels of customization can be done with the provided reference application:

  • Model level: Fine-tune or replace the object detection and embedding models.

  • Application level: Leverage the provided microservices and APIs to build your own microservices adding to this application or create new applications.

  • Microservice level: Modify the provided microservices from the source code with provided functionalities.


Model

You can fine-tune the 2 provided models or replace with your own in the perception microservice using the following steps:

  • Package the required PGIE/SGIE components into NGC resources.

    $ ls retail_detector/
    retailDetector_binary.etlt
    $ ngc registry resource create <org>/<team>/my_new_fsl_detector --application OTHER --framework OTHER --format SavedModel --precision ALL --short-desc "My new FSL detector"
    $ ngc registry resource upload-version --source ./retail_detector <org>/<team>/my_new_fsl_detector:1
    
  • Update sample override values file which can be found at fsl-app-values.yaml in the “application-helm-configs” tar file to point to new NGC resource and model file names.

# Under metropolis-perception edit the initContainers (prepare-data) env variables list
initContainers:
    ...
    env:
    - name: DETECTOR_URL
      value: <org>/<team>/my_new_fsl_detector:1
    - name: DETECTOR_NAME
      value: retailDetector_binary.etlt
    - name: EMBEDDER_URL
      value: <org>/<team>/my_new_fsl_embedder:1
    - name: EMBEDDER_NAME
      value: myNewEmbedder.etlt
    ...
# Under fsl-embeddinggeneration-deployment edit the initContainers (prepare-data) env variable list to point to the new embedder if embedder was updated
initContainers:
    # prepare-data in em
    ...
    env:
    ...
    - name: EMBEDDER_URL
      value: <org>/<team>/my_new_fsl_embedder:1
    - name: EMBEDDER_NAME
      value: myNewEmbedder.etlt
    ...
  • Update DeepStream config file for the corresponding model changes under PGIE/SGIE sections.

Refer to Perception (DeepStream) for more details.


Application

If you are to change the entire flow and functionality of the system, you need more than configuring the parameters. The full application is modularized. You can build you own microservices and integrate with the rest.

Try out web APIs in notebooks

We have provided a Jupyter Notebook for you to understand and test out the provided APIs with ease. Refer to the API Tutorial Notebook for the details.