百度智能云

All Product Document

          Intelligent Edge

          Baetyl-video-infer Configuration

          By default, the module reads configuration file service.yml from the etc/baetyl working directory, and the configuration file format is interpreted as follows:

          hub: 
            clientid: Client ID of Client connection Hub. It should not be empty when cleansession is false. 
            address: [Must] Address of Client connection Hub. 
            username: [Must] User name of Client connection Hub. 
            password: If you use account password, you must fill out the password of Client connection Hub, outherwise you do not need to fill out it. 
            ca: If certificate two-way authentication is adopted, the CA certificate path of Client connection Hub should be filled out. 
            key: If certificate two-way authentication is adopted, the client private key path of Client connection Hub should be filled out. 
            cert: If certificate two-way authentication is adopted, the client public key path of Client connection Hub should be filled out. 
            timeout: Default value: 30s, Time-out period of Client connection Hub 
            interval: Default value: 1m, Maximum interval time for reconnection of Client connection Hub, increasing to the maximum value from 500 microseconds by doubling. 
            keepalive: Default value: 10m, Holding time of Client connection Hub 
            cleansession: Default value: false, Session persistence of Client connection Hub o not. 
            validatesubs: Default value: false, Client checks Hub subscription result or not; exit after reporting of error in case of subscription failure discovered. 
            buffersize: Default value: 10, Size of memory queue for Client to send messages to Hub ; message loss can be caused by abnormal exit, and the messages with QoS = 1 will depend  on Hub to resend. 
          video: 
            uri: [Must] Camera address or video file path; IP camera and USB camera are supported. 
              #General configuration mode of IP camera is: `rtsp://<username>:<password>@<ip>:<port>/Streaming/channels/<stream_number>/` 
                #‘<username>’ and ‘<password>’ represent the camera login and authentication password. 
                #‘<ip>’ represents the IP address of IP camera 
                #‘<port>’ represents the port of RTSP protocol, which is 554 by default 
                #‘<stream_number>’ represents the code stream path number. If it is 1, it indicates the main code stream captured; if it is 2, it indicates the minor code stream captured. 
              #For USB camera, its configuration content is mounted USB number. If “0” represents the device ‘/dev/video0’, the device ‘/dev/video0’ shall be mapped into the container. 
              #For a video file, its configuration content is the video file path, and the video file shall be mounted in video infer service in the form of (customized) storage volume. 
            limit: 
              fps: [Must] Indicating the maximum number of frames per second that can be processed. If the camera frame rate is N, the number of frames per second that can be processed is M at maximum, and Ceil (N/M) – 1 frame can be skipped. 
          infer: 
            model: [Must] Model file path. For more information, please see: https://docs.opencv.org/4.1.1/d6/d0f/group__dnn.html#ga3b34fe7a29494a6a4295c169a7d32422. 
            config: [Must] Configuration file path for the model file. For more information, please see: https://docs.opencv.org/4.1.1/d6/d0f/group__dnn.html#ga3b34fe7a29494a6a4295c169a7d32422. 
            backend: [Optional] Model inference post-processing acceleration configuration item, and the configuration item supported is: halide,openvino,opencv,vulkan,default. For more information, please see: https://docs.opencv.org/4.1.1/d6/d0f/group__dnn.html#ga186f7d9bfacac8b0ff2e26e2eab02625. 
            device: [Optional] Indicating the type of hardware for model inference. The optional configuration item is cpu (default), fp32, fp16, vpu, vulkan and fpga. For more information, please see: https://docs.opencv.org/4.1.1/d6/d0f/group__dnn.html#ga709af7692ba29788182cf573531b0ff5. 
          process: 
            before: Create four-dimensional blob from image. (Optional) Adjust the size and cut the image from center, subtract the mean value, scale by scaling factor, and exchange blue and red channels. For more information, please see: https://docs.opencv.org/4.1.1/d6/d0f/group__dnn.html#ga29f34df9376379a603acd8df581ac8d7. 
              scale: multiplier for image values. 
              swaprb:Flag bit, used for the channels 1 and 3 of image conversion, i.e., the common RGB sequence is adjusted to BGR. 
              width: Width of output image 
              hight: Height of output image 
              mean: Subtract the scalar value of mean from the channel. If the image is wit BGR ranking, and swaprb is true, then the value ranking sequence shall be (mean R, mean G and mean B). 
                v1: Representing the blue component in RGB, and it is often used as for pixel value transfer together with the v2, v3 and v4 below. 
                v2: Representing the green component in RGB 
                v3: Representing the red component in RGB 
                v4: Representing Alpha transparent component 
              crop: Flag bit, indicating whether the image can be cut after resizing. 
            after: 
              function: 
                name: [Must] Function name of processing model inference result. 
          functions: 
            - name: [Must] Function name, unique in the list. 
              address: Function manager service address, with the general. configuration mode <host>:<port>, for example, ‘function-manager:50051’ 
              message: 
                length: 
                  max: Default value: 4m, Maximum message length allowed to receive/send by function instance. 
              backoff: 
                max: Default value: 1m, Maximum reconnection interval of Client connection function instance. 
              timeout: Default value: 30s, Time-out period of client connection function instance. 
          logger: Log configuration item 
            path: It is empty by default, i.e., no file is printed; if a file is appointed, it will be output to file. 
            level: Default value: Info, log level, supporting debug, info, warn and error.
            format: Default value: Text, log print format, supporting text and json
            age: 
              max: Default value: 15, Maximum number of days a log file is retained. 
            size: 
              max: Default value: 50, Log file size limit, unit MB. 
            backup: 
              max: Default value: 15, Maximum number of log files retained. 
          Previous
          Baetyl-activation Configuration
          Next
          Baetyl-timer Configuration