Guest User

modulesettings.json

a guest
Sep 16th, 2025
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 18.21 KB | None | 0 0
  1. {
  2.   "Modules": {
  3.  
  4.     "ObjectDetectionCoral": {
  5.       "Name": "Object Detection (Coral)",
  6.       "Version": "2.4.0",
  7.      
  8.       "PublishingInfo" : {
  9.         "Description": "The object detection module uses the Coral TPU to locate and classify the objects the models have been trained on.",
  10.         "IconURL": null,
  11.         "Category": "Computer Vision",
  12.         "Stack": "Python, TensorFlow-Lite",
  13.         "License": "Apache-2.0",
  14.         "LicenseUrl": "https://opensource.org/licenses/Apache-2.0",
  15.         "Author": "Chris Maunder, Seth Price",
  16.         "Homepage": "https://github.com/codeproject/CodeProject.AI-Server/",
  17.         "BasedOn": "Coral.ai examples",
  18.         "BasedOnUrl": "https://github.com/google-coral/pycoral/blob/master/examples/detect_image.py"
  19.       },
  20.  
  21.       "LaunchSettings": {
  22.         "AutoStart": true,
  23.         "FilePath": "objectdetection_coral_adapter.py",
  24.         "Runtime": "python3.9",
  25.         "RuntimeLocation": "Local",       // Can be Local, Shared or System
  26.         "PostStartPauseSecs": 1,          // Generally 1 if using GPU, 0 for CPU
  27.         "Queue": "objectdetection_queue", // We make all Object detectors use the same queue.
  28.         "Parallelism": 16                 // Should probably be TPU count * 2; I don't see harm in overprovisioning threads
  29.      },
  30.  
  31.      "ModelRequirements" : [{
  32.          "Task": "Object Detection",
  33.          "Architecture": "YOLOv5,YOLOv8,EfficientDet,MobileNet",
  34.          "Format": "TensorFlow-Lite"
  35.      }],
  36.  
  37.      "EnvironmentVariables": {
  38.        "CPAI_CORAL_MULTI_TPU":  "true",
  39.        "CPAI_CORAL_MODEL_NAME": "MobileNet SSD", // "MobileNet SSD", "EfficientDet-Lite", "YOLOv5", "YOLOv8"
  40.  
  41.        "MODELS_DIR": "%CURRENT_MODULE_PATH%/assets",
  42.        "MODEL_SIZE": "Small",
  43.        "CUSTOM_MODELS_DIR": "%CURRENT_MODULE_PATH%/custom-models"
  44.      },
  45.      
  46.      "GpuOptions" : {
  47.        "InstallGPU": true,
  48.        "EnableGPU": true,                // Will be coerced to false if InstallGPU = false
  49.        "AcceleratorDeviceName": null,    // = default
  50.        "HalfPrecision": "enable"         // 'Force', 'Enable', 'Disable': whether to force on, allow, or disable half-precision ops
  51.      },
  52.  
  53.      "InstallOptions" : {
  54.        "Platforms":      [ "all" ],      // The platforms this module can and cannot be installed on
  55.        "ModuleReleases": [               // Which server version is compatible with each version of this module.
  56.          { "ModuleVersion": "1.0",   "ServerVersionRange": [ "2.1",   "2.1.12" ], "ReleaseDate": "2023-07-11" },
  57.          { "ModuleVersion": "1.1",   "ServerVersionRange": [ "2.1",   "2.1.12" ], "ReleaseDate": "2023-07-12" },
  58.          { "ModuleVersion": "1.2",   "ServerVersionRange": [ "2.1",   "2.1.12" ], "ReleaseDate": "2023-07-12" },
  59.          { "ModuleVersion": "1.3",   "ServerVersionRange": [ "2.1",   "2.1.12" ], "ReleaseDate": "2023-08-11", "ReleaseNotes": "installer corrections, macOS/Ubuntu support improved" },
  60.          { "ModuleVersion": "1.4",   "ServerVersionRange": [ "2.2",   "2.2.4"  ], "ReleaseDate": "2023-09-09", "ReleaseNotes": "Updated installer, updated TF-lite runtime" },
  61.          { "ModuleVersion": "1.5",   "ServerVersionRange": [ "2.2",   "2.2.4"  ], "ReleaseDate": "2023-09-16", "ReleaseNotes": "Updates to help Blue Iris users" },
  62.          { "ModuleVersion": "1.5.1", "ServerVersionRange": [ "2.2",   "2.2.4"  ], "ReleaseDate": "2023-09-17", "ReleaseNotes": "Better checks for admin rights when installing" },
  63.          { "ModuleVersion": "1.6",   "ServerVersionRange": [ "2.3.0", "2.3.0"  ], "ReleaseDate": "2023-10-01", "ReleaseNotes": "Updated to match new installer SDK." },
  64.          { "ModuleVersion": "1.6.1", "ServerVersionRange": [ "2.3.1", "2.3.5"  ], "ReleaseDate": "2023-10-10", "ReleaseNotes": "Updated to match new installer SDK." },
  65.          { "ModuleVersion": "1.6.2", "ServerVersionRange": [ "2.3.1", "2.3.5"  ], "ReleaseDate": "2023-10-28", "ReleaseNotes": "Improvements for situations where installer does not have admin rights." },
  66.          { "ModuleVersion": "1.6.3", "ServerVersionRange": [ "2.3.1", "2.3.5"  ], "ReleaseDate": "2023-10-28", "ReleaseNotes": "Corrections to requirements.txt for Raspberry Pi / Orange Pi." },
  67.          { "ModuleVersion": "1.7",   "ServerVersionRange": [ "2.3.5", "2.3.5"  ], "ReleaseDate": "2023-11-10", "ReleaseNotes": "Improvements on the Raspberry Pi installer." },
  68.          { "ModuleVersion": "1.7.1", "ServerVersionRange": [ "2.4.0", "2.4.0"  ], "ReleaseDate": "2023-12-03", "ReleaseNotes": "Installer updates, Mesh support.", "Importance": "Minor" },
  69.          { "ModuleVersion": "1.7.2", "ServerVersionRange": [ "2.4.1", "2.4.1"  ], "ReleaseDate": "2023-12-06", "ReleaseNotes": "Updated modulesettings schema", "Importance": "Minor" },
  70.          { "ModuleVersion": "1.7.3", "ServerVersionRange": [ "2.4.2", "2.4.7"  ], "ReleaseDate": "2023-12-09", "ReleaseNotes": "Installer updates", "Importance": "Minor" },
  71.          { "ModuleVersion": "1.7.4", "ServerVersionRange": [ "2.4.2", "2.4.7"  ], "ReleaseDate": "2023-12-21", "ReleaseNotes": "Installer updates" },
  72.          { "ModuleVersion": "1.7.5", "ServerVersionRange": [ "2.4.2", "2.4.7"  ], "ReleaseDate": "2023-12-23", "ReleaseNotes": "Installer updates for Docker" },
  73.          { "ModuleVersion": "1.8.0", "ServerVersionRange": [ "2.5.0-RC1", "2.5.0-RC5" ], "ReleaseDate": "2024-01-06", "ReleaseNotes": "Additions for dynamic explorer UI" },
  74.          { "ModuleVersion": "2.0.0", "ServerVersionRange": [ "2.5.0-RC1", "2.5.0-RC5" ], "ReleaseDate": "2024-01-11", "ReleaseNotes": "Multi-TPU support" },
  75.          { "ModuleVersion": "2.0.1", "ServerVersionRange": [ "2.5.0-RC1", "2.5.0-RC5" ], "ReleaseDate": "2024-01-13", "ReleaseNotes": "Changes to SDK" },
  76.          { "ModuleVersion": "2.0.2", "ServerVersionRange": [ "2.5.0-RC6", ""   ], "ReleaseDate": "2024-01-16", "ReleaseNotes": "Updated modulesettings schema" },
  77.          { "ModuleVersion": "2.0.3", "ServerVersionRange": [ "2.5.0-RC6", ""   ], "ReleaseDate": "2024-01-18", "ReleaseNotes": "Updated explorer" },
  78.          { "ModuleVersion": "2.1.0", "ServerVersionRange": [ "2.5.0-RC6", ""   ], "ReleaseDate": "2024-01-21", "ReleaseNotes": "Module performance statistics added" },
  79.          { "ModuleVersion": "2.1.1", "ServerVersionRange": [ "2.5.0-RC6", ""   ], "ReleaseDate": "2024-01-21", "ReleaseNotes": "Typo in the Linux installer corrected that was blocking installs" },
  80.          { "ModuleVersion": "2.1.2", "ServerVersionRange": [ "2.5.0-RC6", ""   ], "ReleaseDate": "2024-01-29", "ReleaseNotes": "Multi-TPU now falls back to CPU on edge library load failure" },
  81.          { "ModuleVersion": "2.1.3", "ServerVersionRange": [ "2.5.2",     ""   ], "ReleaseDate": "2024-02-08", "ReleaseNotes": "Support for CodeProject.AI Server 2.5.2" },
  82.          { "ModuleVersion": "2.1.4", "ServerVersionRange": [ "2.5.2",     ""   ], "ReleaseDate": "2024-02-18", "ReleaseNotes": "Added dashboard menu to allow model selection" },
  83.          { "ModuleVersion": "2.1.5", "ServerVersionRange": [ "2.5.2",     ""   ], "ReleaseDate": "2024-03-12", "ReleaseNotes": "Bug fix for Multi-TPU." },
  84.          { "ModuleVersion": "2.1.6", "ServerVersionRange": [ "2.5.2", "2.6.0"  ], "ReleaseDate": "2024-03-12", "ReleaseNotes": "Improvements to Multi-TPU error handling, added YOLOv5 models." },
  85.          { "ModuleVersion": "2.2.0", "ServerVersionRange": [ "2.6.1", "2.7.0"   ], "ReleaseDate": "2024-04-01", "ReleaseNotes": "Improvements to pipelining and error handling" },
  86.          { "ModuleVersion": "2.2.1", "ServerVersionRange": [ "2.6.1", "2.7.0"   ], "ReleaseDate": "2024-04-01", "ReleaseNotes": "Improvements" },
  87.          { "ModuleVersion": "2.2.2", "ServerVersionRange": [ "2.6.1", "2.7.0"   ], "ReleaseDate": "2024-04-15", "ReleaseNotes": "Corrections to macOS 11/12 install, plus custom model list command added" },
  88.          { "ModuleVersion": "2.3.0", "ServerVersionRange": [ "2.6.5", "2.7.0"   ], "ReleaseDate": "2024-04-25", "ReleaseNotes": "Switched to CodeProject.AI 2.6.5 / CodeProject SDK" },
  89.          { "ModuleVersion": "2.3.1", "ServerVersionRange": [ "2.6.5", "2.7.0"   ], "ReleaseDate": "2024-06-21", "ReleaseNotes": "Corrected NumPy 2.0 issue" },
  90.          { "ModuleVersion": "2.3.2", "ServerVersionRange": [ "2.6.5", "2.7.0"   ], "ReleaseDate": "2024-06-26", "ReleaseNotes": "Corrections to compatibility settings" },
  91.          { "ModuleVersion": "2.3.3", "ServerVersionRange": [ "2.6.5", "2.7.0"   ], "ReleaseDate": "2024-06-26", "ReleaseNotes": "Further work on the NumPy issue" },
  92.          { "ModuleVersion": "2.3.4", "ServerVersionRange": [ "2.6.5", "2.7.0"  ], "ReleaseDate": "2024-06-26", "ReleaseNotes": "More work on the NumPy issue in RPi" },
  93.          { "ModuleVersion": "2.4.0", "ServerVersionRange": [ "2.8.0", ""       ], "ReleaseDate": "2024-08-02", "ReleaseNotes": "Updated for server 2.8" }
  94.        ],
  95.        "DownloadableModels":[
  96.  
  97.          { "Name": "MobileNet Large",  "Filename": "objectdetection-mobilenet-large-edgetpu.zip",  "Folder": "assets", "Description": "MobileNet object detection, Large",  "FileSizeKb": 275800, "PreInstall": true },
  98.          { "Name": "MobileNet Medium", "Filename": "objectdetection-mobilenet-medium-edgetpu.zip", "Folder": "assets", "Description": "MobileNet object detection, Medium", "FileSizeKb": 275800, "PreInstall": true },
  99.          { "Name": "MobileNet Small",  "Filename": "objectdetection-mobilenet-small-edgetpu.zip",  "Folder": "assets", "Description": "MobileNet object detection, Small",  "FileSizeKb": 275800, "PreInstall": true },
  100.          { "Name": "MobileNet Tiny",   "Filename": "objectdetection-mobilenet-tiny-edgetpu.zip",   "Folder": "assets", "Description": "MobileNet object detection, Tiny",   "FileSizeKb": 275800, "PreInstall": true },
  101.  
  102.          { "Name": "EfficientDet Large",  "Filename": "objectdetection-efficientdet-large-edgetpu.zip",  "Folder": "assets", "Description": "EfficientDet object detection, Large",  "FileSizeKb": 275800, "PreInstall": false },
  103.          { "Name": "EfficientDet Medium", "Filename": "objectdetection-efficientdet-medium-edgetpu.zip", "Folder": "assets", "Description": "EfficientDet object detection, Medium", "FileSizeKb": 275800, "PreInstall": false },
  104.          { "Name": "EfficientDet Small",  "Filename": "objectdetection-efficientdet-small-edgetpu.zip",  "Folder": "assets", "Description": "EfficientDet object detection, Small",  "FileSizeKb": 275800, "PreInstall": false },
  105.          { "Name": "EfficientDet Tiny",   "Filename": "objectdetection-efficientdet-tiny-edgetpu.zip",   "Folder": "assets", "Description": "EfficientDet object detection, Tiny",   "FileSizeKb": 275800, "PreInstall": false },
  106.  
  107.          { "Name": "YOLOv5 Large",  "Filename": "objectdetection-yolov5-large-edgetpu.zip",  "Folder": "assets", "Description": "YOLOv5 object detection, Large",  "FileSizeKb": 275800, "PreInstall": false },
  108.          { "Name": "YOLOv5 Medium", "Filename": "objectdetection-yolov5-medium-edgetpu.zip", "Folder": "assets", "Description": "YOLOv5 object detection, Medium", "FileSizeKb": 275800, "PreInstall": false },
  109.          { "Name": "YOLOv5 Small",  "Filename": "objectdetection-yolov5-small-edgetpu.zip",  "Folder": "assets", "Description": "YOLOv5 object detection, Small",  "FileSizeKb": 275800, "PreInstall": false },
  110.          { "Name": "YOLOv5 Tiny",   "Filename": "objectdetection-yolov5-tiny-edgetpu.zip",   "Folder": "assets", "Description": "YOLOv5 object detection, Tiny",   "FileSizeKb": 275800, "PreInstall": false },
  111.  
  112.          { "Name": "YOLOv8 Large",  "Filename": "objectdetection-yolov8-large-edgetpu.zip",  "Folder": "assets", "Description": "YOLOv8 object detection, Large",  "FileSizeKb": 275800, "PreInstall": false },
  113.          { "Name": "YOLOv8 Medium", "Filename": "objectdetection-yolov8-medium-edgetpu.zip", "Folder": "assets", "Description": "YOLOv8 object detection, Medium", "FileSizeKb": 275800, "PreInstall": false },
  114.          { "Name": "YOLOv8 Small",  "Filename": "objectdetection-yolov8-small-edgetpu.zip",  "Folder": "assets", "Description": "YOLOv8 object detection, Small",  "FileSizeKb": 275800, "PreInstall": false },
  115.          { "Name": "YOLOv8 Tiny",   "Filename": "objectdetection-yolov8-tiny-edgetpu.zip",   "Folder": "assets", "Description": "YOLOv8 object detection, Tiny",   "FileSizeKb": 275800, "PreInstall": false }
  116.        ]
  117.      },
  118.  
  119.      "UIElements" : {
  120.        "Menus": [{
  121.          "Label": "Model",
  122.          "Options": [
  123.              { "Label": "MobileNet SSD",     "Setting": "CPAI_CORAL_MODEL_NAME", "Value": "MobileNet SSD"     },
  124.              { "Label": "EfficientDet Lite", "Setting": "CPAI_CORAL_MODEL_NAME", "Value": "EfficientDet-Lite" },
  125.              { "Label": "YOLOv5",            "Setting": "CPAI_CORAL_MODEL_NAME", "Value": "YOLOv5"            },
  126.              { "Label": "YOLOv8",            "Setting": "CPAI_CORAL_MODEL_NAME", "Value": "YOLOv8"            }
  127.          ]
  128.        },
  129.        {
  130.          "Label": "Model Size",
  131.          "Options": [
  132.              { "Label": "Tiny",   "Setting": "MODEL_SIZE", "Value": "tiny"   },
  133.              { "Label": "Small",  "Setting": "MODEL_SIZE", "Value": "small"  },
  134.              { "Label": "Medium", "Setting": "MODEL_SIZE", "Value": "medium" },
  135.              { "Label": "Large",  "Setting": "MODEL_SIZE", "Value": "large"  }
  136.          ]
  137.        },
  138.        {
  139.          "Label": "Multi-TPU support",
  140.          "Options": [
  141.              { "Label": "Enable",  "Setting": "CPAI_CORAL_MULTI_TPU", "Value": "True"  },
  142.              { "Label": "Disable", "Setting": "CPAI_CORAL_MULTI_TPU", "Value": "False" }
  143.          ]
  144.        }]
  145.      },
  146.  
  147.      "RouteMaps": [
  148.        {
  149.          "Name": "Object Detector (Coral.AI)",
  150.          "Route": "vision/detection",
  151.          "Method": "POST",
  152.          "Command": "detect",
  153.          "Description": "Detects multiple objects in an image.",
  154.          "Inputs": [
  155.            {
  156.              "Name": "image",
  157.              "Type": "File",
  158.              "Description": "The HTTP file object (image) to be analyzed."
  159.            },
  160.            {
  161.              "Name": "min_confidence",
  162.              "Type": "Float",
  163.              "Description": "The minimum confidence level for an object will be detected. In the range 0.0 to 1.0. Default 0.4.",
  164.              "DefaultValue": 0.4,
  165.              "MinValue": 0.0,
  166.              "MaxValue": 1.0
  167.            }
  168.          ],
  169.          "Outputs": [
  170.            {
  171.              "Name": "success",
  172.              "Type": "Boolean",
  173.              "Description": "True if successful."
  174.            },
  175.            {
  176.              "Name": "message",
  177.              "Type": "String",
  178.              "Description": "A summary of the inference operation."
  179.            },
  180.            {
  181.              "Name": "error",
  182.              "Type": "String",
  183.              "Description": "(Optional) An description of the error if success was false."
  184.            },
  185.            {
  186.              "Name": "predictions",
  187.              "Type": "Object",
  188.              "Description": "An array of objects with the x_max, x_min, max, y_min, label and confidence."
  189.            },
  190.            {
  191.              "Name": "count",
  192.              "Type": "Integer",
  193.              "Description": "The number of objects found."
  194.            },
  195.            {
  196.              "Name": "inferenceMs",
  197.              "Type": "Integer",
  198.              "Description": "The time (ms) to perform the AI inference."
  199.            },
  200.            {
  201.              "Name": "processMs",
  202.              "Type": "Integer",
  203.              "Description": "The time (ms) to process the image (includes inference and image manipulation operations)."
  204.            }
  205.          ]
  206.        },
  207.  
  208.        {
  209.          "Name": "Custom Object Detector (Coral.AI)",
  210.          "Route": "vision/custom",
  211.          "Method": "POST",
  212.          "Command": "custom",
  213.          "Description": "Detects objects based on YOLO PyTorch models. Models are stored in the /ObjectDetectionCoral/assets directory, and to make a call to a specific model use /vision/custom/model-name, where 'model-name' is the name of the model's file",
  214.          "Inputs": [
  215.            {
  216.              "Name": "image",
  217.              "Type": "File",
  218.              "Description": "The HTTP file object (image) to be analyzed."
  219.            },
  220.            {
  221.              "Name": "min_confidence",
  222.              "Type": "Float",
  223.              "Description": "The minimum confidence level for an object will be detected. In the range 0.0 to 1.0. Default 0.4."
  224.            }
  225.          ],
  226.          "Outputs": [
  227.            {
  228.              "Name": "success",
  229.              "Type": "Boolean",
  230.              "Description": "True if successful."
  231.            },
  232.            {
  233.              "Name": "message",
  234.              "Type": "String",
  235.              "Description": "A summary of the inference operation."
  236.            },
  237.            {
  238.              "Name": "error",
  239.              "Type": "String",
  240.              "Description": "(Optional) An description of the error if success was false."
  241.            },
  242.            {
  243.              "Name": "predictions",
  244.              "Type": "Object[]",
  245.              "Description": "An array of objects with the x_max, x_min, max, y_min, label and confidence."
  246.            },
  247.            {
  248.              "Name": "inferenceMs",
  249.              "Type": "Integer",
  250.              "Description": "The time (ms) to perform the AI inference."
  251.            },
  252.            {
  253.              "Name": "processMs",
  254.              "Type": "Integer",
  255.              "Description": "The time (ms) to process the image (includes inference and image manipulation operations)."
  256.            }
  257.          ]
  258.        },
  259.  
  260.        {
  261.          "Name": "Object Detector List Custom Models (Coral.AI)",
  262.          "Route": "vision/custom/list",
  263.          "Method": "POST",
  264.          "Command": "list-custom",
  265.          "Description": "Returns a list of models available.",
  266.          "Inputs": [],
  267.          "Outputs": [
  268.            {
  269.              "Name": "success",
  270.              "Type": "Boolean",
  271.              "Description": "True if successful."
  272.            },
  273.            {
  274.              "Name": "models",
  275.              "Type": "String",
  276.              "Description": "An array of strings containing the names of the models installed."
  277.            }
  278.          ]
  279.        }
  280.      ]    
  281.    }
  282.  }
  283. }
  284.  
Add Comment
Please, Sign In to add comment