-
Notifications
You must be signed in to change notification settings - Fork 2
/
modulesettings.json
305 lines (292 loc) · 13.8 KB
/
modulesettings.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
{
"Modules": {
"ObjectDetectionYOLOv8": {
"Name": "Object Detection (YOLOv8)",
"Version": "1.6.2",
"PublishingInfo" : {
"Description" : "Provides Object Detection in Python>=3.8 using YOLOv8. Great for newer NVIDIA GPUs",
"Category" : "Computer Vision",
"Stack" : "Python, PyTorch, YOLO",
"License" : "AGPL-3.0",
"LicenseUrl" : "https://www.gnu.org/licenses/agpl-3.0.en.html",
"Author" : "Chris Maunder",
"Homepage" : "https://github.com/codeproject/CodeProject.AI-Server/",
"BasedOn" : "ultralytics",
"BasedOnUrl" : "https://github.com/ultralytics/ultralytics"
},
// Launch instructions
"LaunchSettings": {
"AutoStart" : false,
"FilePath" : "detect_adapter.py",
"Runtime" : "python3.8",
"RuntimeLocation" : "Local", // Local, not shared, because previous YOLO may be in shared
"PostStartPauseSecs" : 1, // Generally 1 if using GPU, 0 for CPU
"Queue" : "objectdetection_queue", // We make all Object detectors use the same queue.
"Parallelism" : 0 // 0 = Default (number of CPUs - 1)
},
"EnvironmentVariables": {
"YOLO_VERBOSE" : "false",
"MODEL_SIZE" : "Medium", // tiny, small, medium, large
"USE_CUDA" : "True",
"APPDIR" : "%CURRENT_MODULE_PATH%",
"MODELS_DIR" : "%CURRENT_MODULE_PATH%/assets",
"CUSTOM_MODELS_DIR" : "%CURRENT_MODULE_PATH%/custom-models"
},
"GpuOptions" : {
"InstallGPU" : true,
"EnableGPU" : true, // Will be coerced to false if InstallGPU = false
"AcceleratorDeviceName" : null, // = default
"HalfPrecision" : "enable" // 'Force', 'Enable', 'Disable': whether to force on, allow, or disable half-precision ops
},
"InstallOptions" : {
"Platforms": [ "all" ], // The platforms this module can and cannot be installed on
"ModuleReleases": [ // Which server version is compatible with each version of this module.
{ "ModuleVersion": "1.0.1", "ServerVersionRange": [ "2.4.2", "2.5.0" ], "ReleaseDate": "2023-12-09", "ReleaseNotes": "Installer updates", "Importance": "Minor" },
{ "ModuleVersion": "1.0.2", "ServerVersionRange": [ "2.4.2", "2.5.0" ], "ReleaseDate": "2023-12-10", "ReleaseNotes": "Bug fixes" },
{ "ModuleVersion": "1.1.0", "ServerVersionRange": [ "2.4.2", "2.5.0" ], "ReleaseDate": "2023-12-13", "ReleaseNotes": "Added custom model" },
{ "ModuleVersion": "1.1.1", "ServerVersionRange": [ "2.4.2", "2.5.0" ], "ReleaseDate": "2023-12-15", "ReleaseNotes": "Fixed YOLO threading issue" },
{ "ModuleVersion": "1.2.0", "ServerVersionRange": [ "2.5.0-RC1", "2.5.0-RC5" ], "ReleaseDate": "2024-01-06", "ReleaseNotes": "Additions for dynamic explorer UI" },
{ "ModuleVersion": "1.2.1", "ServerVersionRange": [ "2.5.0-RC1", "2.5.0-RC1" ], "ReleaseDate": "2024-01-13", "ReleaseNotes": "Changes to SDK" },
{ "ModuleVersion": "1.2.2", "ServerVersionRange": [ "2.5.0-RC6", "" ], "ReleaseDate": "2024-01-16", "ReleaseNotes": "Updated modulesettings schema" },
{ "ModuleVersion": "1.2.3", "ServerVersionRange": [ "2.5.0-RC6", "" ], "ReleaseDate": "2024-01-17", "ReleaseNotes": "Fix for 'import' error, addition of 'huge' model" },
{ "ModuleVersion": "1.2.4", "ServerVersionRange": [ "2.5.0-RC6", "" ], "ReleaseDate": "2024-01-18", "ReleaseNotes": "Updated explorer" },
{ "ModuleVersion": "1.3.0", "ServerVersionRange": [ "2.5.0-RC6", "" ], "ReleaseDate": "2024-01-21", "ReleaseNotes": "Module performance statistics added" },
{ "ModuleVersion": "1.3.1", "ServerVersionRange": [ "2.5.2", "2.6.0" ], "ReleaseDate": "2024-02-08", "ReleaseNotes": "Support for CodeProject.AI Server 2.5.2" },
{ "ModuleVersion": "1.4.1", "ServerVersionRange": [ "2.5.7", "2.6.0" ], "ReleaseDate": "2024-03-03", "ReleaseNotes": "Added object segmentation support" },
{ "ModuleVersion": "1.4.2", "ServerVersionRange": [ "2.6.0", "2.6.0" ], "ReleaseDate": "2024-04-01", "ReleaseNotes": "Updated for server 2.6" },
{ "ModuleVersion": "1.4.3", "ServerVersionRange": [ "2.6.0", "2.6.0" ], "ReleaseDate": "2024-04-07", "ReleaseNotes": "Added thread lock to address multi-threaded issue" },
{ "ModuleVersion": "1.5.0", "ServerVersionRange": [ "2.6.5", "2.7.0" ], "ReleaseDate": "2024-04-25", "ReleaseNotes": "Corrected NumPy 2.0 issue" },
{ "ModuleVersion": "1.6.0", "ServerVersionRange": [ "2.8.0", "2.9.3" ], "ReleaseDate": "2024-08-02", "ReleaseNotes": "Updated for server 2.8" },
{ "ModuleVersion": "1.6.1", "ServerVersionRange": [ "2.9.4", "" ], "ReleaseDate": "2024-11-26", "ReleaseNotes": "Support for dual Ubuntu/Debian install" },
{ "ModuleVersion": "1.6.2", "ServerVersionRange": [ "2.9.4", "" ], "ReleaseDate": "2024-12-03", "ReleaseNotes": "Corrections for Linux, non-GPU install" }
],
"DownloadableModels":[
{ "Name": "YOLOv8 Object Detection all sizes", "Filename": "objectdetection-coco-yolov8-pt-nsmlx.zip", "Folder": "assets", "Description": "YOLOv8 object detection using the COCO dataset. Sizes N(ano), S, M, L, XL", "FileSizeKb": 275800, "PreInstall": true },
{ "Name": "YOLOv8 Object Segmentation all sizes", "Filename": "objectsegmentation-coco-yolov8-pt-nsmlx.zip", "Folder": "assets", "Description": "YOLOv8 object segmentation the COCO dataset. Sizes N(ano), S, M, L, XL", "FileSizeKb": 291400, "PreInstall": true },
{ "Name": "YOLOv8 Object Custom models", "Filename": "objectdetection-custom-yolov8-pt-m.zip", "Folder": "custom-models", "Description": "YOLOv8 custom object detection: General IPCam, License plate", "FileSizeKb": 40300, "PreInstall": true }
]
},
"ModelRequirements" : [{
"Task": "Object Detection",
"Architecture": "YOLOv8",
"Format": "PyTorch"
},{
"Task": "Object Segmentation",
"Architecture": "YOLOv8",
"Format": "PyTorch"
}],
"UIElements" : {
"Menus": [{
"Label": "Half Precision",
"Options": [
{ "Label": "Force on", "Setting": "CPAI_HALF_PRECISION", "Value": "force" },
{ "Label": "Use Default", "Setting": "CPAI_HALF_PRECISION", "Value": "enable" },
{ "Label": "Disable", "Setting": "CPAI_HALF_PRECISION", "Value": "disable" }
]
},
{
"Label": "Model Size",
"Options": [
{ "Label": "Tiny", "Setting": "MODEL_SIZE", "Value": "tiny" },
{ "Label": "Small", "Setting": "MODEL_SIZE", "Value": "small" },
{ "Label": "Medium", "Setting": "MODEL_SIZE", "Value": "medium" },
{ "Label": "Large", "Setting": "MODEL_SIZE", "Value": "large" },
{ "Label": "Huge", "Setting": "MODEL_SIZE", "Value": "huge" }
]
}]
},
"RouteMaps": [
{
"Name": "Object Detector (YOLOv8)",
"Route": "vision/detection",
"Method": "POST",
"Command": "detect",
"Description": "Detects multiple objects, of 80 different possible types, in an image.",
"Inputs": [
{
"Name": "image",
"Type": "File",
"Description": "The HTTP file object (image) to be analyzed."
},
{
"Name": "min_confidence",
"Type": "Float",
"Description": "The minimum confidence level for an object will be detected. In the range 0.0 to 1.0. Default 0.4.",
"DefaultValue": 0.4,
"MinValue": 0.0,
"MaxValue": 1.0
}
],
"Outputs": [
{
"Name": "success",
"Type": "Boolean",
"Description": "True if successful."
},
{
"Name": "message",
"Type": "String",
"Description": "A summary of the inference operation."
},
{
"Name": "error",
"Type": "String",
"Description": "(Optional) An description of the error if success was false."
},
{
"Name": "predictions",
"Type": "Object[]",
"Description": "An array of objects with the x_max, x_min, max, y_min, label and confidence."
},
{
"Name": "count",
"Type": "Integer",
"Description": "The number of objects found."
},
{
"Name": "inferenceMs",
"Type": "Integer",
"Description": "The time (ms) to perform the AI inference."
},
{
"Name": "processMs",
"Type": "Integer",
"Description": "The time (ms) to process the image (includes inference and image manipulation operations)."
}
]
},
{
"Name": "Custom Object Detector (YOLOv8)",
"Route": "vision/custom",
"Method": "POST",
"Command": "custom",
"MeshEnabled": false,
"Description": "Detects objects based on YOLO PyTorch models. Models are stored as .pt files in the /ObjectDetectionYOLOv8/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 .pt file",
"Inputs": [
{
"Name": "image",
"Type": "File",
"Description": "The HTTP file object (image) to be analyzed."
},
{
"Name": "min_confidence",
"Type": "Float",
"Description": "The minimum confidence level for an object will be detected. In the range 0.0 to 1.0. Default 0.4."
}
],
"Outputs": [
{
"Name": "success",
"Type": "Boolean",
"Description": "True if successful."
},
{
"Name": "message",
"Type": "String",
"Description": "A summary of the inference operation."
},
{
"Name": "error",
"Type": "String",
"Description": "(Optional) An description of the error if success was false."
},
{
"Name": "predictions",
"Type": "Object[]",
"Description": "An array of objects with the x_max, x_min, max, y_min, mask, label and confidence."
},
{
"Name": "inferenceMs",
"Type": "Integer",
"Description": "The time (ms) to perform the AI inference."
},
{
"Name": "processMs",
"Type": "Integer",
"Description": "The time (ms) to process the image (includes inference and image manipulation operations)."
}
]
},
{
"Name": "Object Segmentation (YOLOv8)",
"Route": "vision/segmentation",
"Method": "POST",
"Command": "segment",
"Description": "Segment multiple objects in an image.",
"Inputs": [
{
"Name": "image",
"Type": "File",
"Description": "The HTTP file object (image) to be analyzed."
},
{
"Name": "min_confidence",
"Type": "Float",
"Description": "The minimum confidence level for an object will be detected. In the range 0.0 to 1.0. Default 0.4.",
"DefaultValue": 0.4,
"MinValue": 0.0,
"MaxValue": 1.0
}
],
"Outputs": [
{
"Name": "success",
"Type": "Boolean",
"Description": "True if successful."
},
{
"Name": "message",
"Type": "String",
"Description": "A summary of the inference operation."
},
{
"Name": "error",
"Type": "String",
"Description": "(Optional) An description of the error if success was false."
},
{
"Name": "predictions",
"Type": "Object[]",
"Description": "An array of objects with the x_max, x_min, max, y_min, label and confidence."
},
{
"Name": "count",
"Type": "Integer",
"Description": "The number of objects found."
},
{
"Name": "inferenceMs",
"Type": "Integer",
"Description": "The time (ms) to perform the AI inference."
},
{
"Name": "processMs",
"Type": "Integer",
"Description": "The time (ms) to process the image (includes inference and image manipulation operations)."
}
]
},
{
"Name": "Object Detector List Custom Models (YOLOv8)",
"Route": "vision/custom/list",
"Method": "POST",
"Command": "list-custom",
"Description": "Returns a list of models available.",
"Inputs": [],
"Outputs": [
{
"Name": "success",
"Type": "Boolean",
"Description": "True if successful."
},
{
"Name": "models",
"Type": "String",
"Description": "An array of strings containing the names of the models installed."
}
]
}
]
}
}
}