codeproject / CodeProject.AI-Server

CodeProject.AI Server is a self contained service that software developers can include in, and distribute with, their applications in order to augment their apps with the power of AI.
Other
565 stars 135 forks source link

Background Removal in 1.6.0.0... now in 1.6.2.0 #13

Closed alexbn71 closed 1 year ago

alexbn71 commented 1 year ago

When I click on "Remove Background" I get "Unable to complete API call: AbortError: The user aborted a request." after few seconds.

In the log I see only this "Trace CodeProject.QueueServices: Queued: 'removebackground' request, id 94edb021-e337-4e3f-a59e-419e262c6a82"

ChrisMaunder commented 1 year ago

Is this Windows native install, Docker, or dev environment?

It sounds like it's a warm-up issue. Background remover can take some time to warm up on some systems. If you try again do you get success?

alexbn71 commented 1 year ago

Docker.... I can try again in half an hour.

alexbn71 commented 1 year ago

Nothing changed...

image

image

alexbn71 commented 1 year ago

This is the log stopping and restarting bg remover:

07:41:33: CodeProject.BackendProcessRunner: BackgroundRemover has left the building 07:41:43: CodeProject.BackendProcessRunner: ================================================================== 07:41:43: CodeProject.BackendProcessRunner: Setting Environment variables for Background Remover 07:41:43: CodeProject.BackendProcessRunner: __________________________________________________________________ 07:41:43: CodeProject.BackendProcessRunner: CPAI_APPROOTPATH = /app 07:41:43: CodeProject.BackendProcessRunner: CPAI_ERRLOG_APIKEY = 07:41:43: CodeProject.BackendProcessRunner: CPAI_PORT = 32168 07:41:43: CodeProject.BackendProcessRunner: U2NET_HOME = /app/AnalysisLayer/BackgroundRemover/models 07:41:43: CodeProject.BackendProcessRunner: CPAI_MODULE_ID = BackgroundRemover 07:41:43: CodeProject.BackendProcessRunner: CPAI_MODULE_NAME = Background Remover 07:41:43: CodeProject.BackendProcessRunner: CPAI_MODULE_PARALLELISM = 1 07:41:43: CodeProject.BackendProcessRunner: CPAI_MODULE_SUPPORT_GPU = False 07:41:43: CodeProject.BackendProcessRunner: CPAI_MODULE_QUEUENAME = removebackground_queue 07:41:43: CodeProject.BackendProcessRunner: __________________________________________________________________ 07:41:43: CodeProject.BackendProcessRunner: Starting python3.9 "\app...\AnalysisLayer\rembg_adapter.py" 07:41:43: CodeProject.BackendProcessRunner: Started Background Remover backend 07:41:48: Background Remover: Background Remover started. 07:41:48: CodeProject.QueueServices: Dequeued 'removebackground' request, id 88094557-6cbb-4352-9d74-1e9a19245be2 07:41:48: CodeProject.QueueServices: Dequeued 'removebackground' request, id 3ccaab04-2039-44bb-8ad6-27a07538b7b3 07:41:48: CodeProject.QueueServices: Dequeued 'removebackground' request, id 94edb021-e337-4e3f-a59e-419e262c6a82 07:41:48: CodeProject.QueueServices: Dequeued 'removebackground' request, id cf34cfb6-4181-46ae-b34f-b1e0440c22ec 07:41:48: CodeProject.QueueServices: Dequeued 'removebackground' request, id acee0d45-e074-47ef-b809-70d66ef3067f 07:41:48: CodeProject.QueueServices: Dequeued 'removebackground' request, id 6002f08e-05ac-4fee-bb5b-fa2d529d62fb 07:41:48: CodeProject.QueueServices: Dequeued 'removebackground' request, id 2d813340-70aa-496e-807c-ba2051e033ff 07:41:48: CodeProject.QueueServices: Dequeued 'removebackground' request, id 17becf44-888d-4ad8-8c23-340f64f313d7

alexbn71 commented 1 year ago

after a restart it works now!

alexbn71 commented 1 year ago

Hi Chris, again the same issue on 1.6.2.... but this time a restart doesn't resolve the issue.

This is my starting log:

15:00:18: CodeProject.Program: Operating System: Linux 5.19.7-Unraid #1 SMP PREEMPT_DYNAMIC Fri Sep 9 09:52:54 PDT 2022 15:00:18: CodeProject.Program: Architecture: X64 15:00:18: CodeProject.Program: App assembly: CodeProject.AI.Server.dll 15:00:18: CodeProject.Program: App DataDir: /usr/share/CodeProject/AI 15:00:18: CodeProject.Program: .Net Core Env: 15:00:18: CodeProject.Program: Platform: docker 15:00:18: CodeProject.Program: In Docker: True 15:00:18: CodeProject.Program: 15:00:18: CodeProject.BackendProcessRunner: ------------------------------------------------------------------ 15:00:18: CodeProject.BackendProcessRunner: Expanded ROOT_PATH = /app 15:00:18: CodeProject.BackendProcessRunner: Expanded MODULES_PATH = /app/AnalysisLayer 15:00:18: CodeProject.BackendProcessRunner: Expanded PYTHON_BASEPATH = /app/AnalysisLayer/bin/%PYTHON_RUNTIME%/venv 15:00:18: CodeProject.BackendProcessRunner: Expanded PYTHON_PATH = %PYTHON_RUNTIME% 15:00:18: CodeProject.BackendProcessRunner: ------------------------------------------------------------------ 15:00:18: CodeProject.BackendProcessRunner: BackendProcessRunner Start 15:00:18: CodeProject.BackendProcessRunner: Starting Background AI Modules 15:00:21: CodeProject.BackendProcessRunner: Root Path: /app 15:00:21: CodeProject.BackendProcessRunner: Module Path: /app/AnalysisLayer 15:00:21: CodeProject.BackendProcessRunner: Python Path: %PYTHON_RUNTIME% 15:00:21: CodeProject.BackendProcessRunner: Temp Dir: /tmp/ 15:00:21: CodeProject.BackendProcessRunner: Data Dir: /usr/share/CodeProject/AI 15:00:21: CodeProject.BackendProcessRunner: App directory /app 15:00:21: CodeProject.BackendProcessRunner: Analysis modules in /app/AnalysisLayer 15:00:21: CodeProject.BackendProcessRunner: Attempting to start Portrait Filter 15:00:21: CodeProject.BackendProcessRunner: Runtime: execute, FilePath: PortraitFilter/PortraitFilter 15:00:21: CodeProject.BackendProcessRunner: ================================================================== 15:00:21: CodeProject.BackendProcessRunner: Setting Environment variables for Portrait Filter 15:00:21: CodeProject.BackendProcessRunner: __ 15:00:21: CodeProject.BackendProcessRunner: CPAI_APPROOTPATH = /app 15:00:21: CodeProject.BackendProcessRunner: CPAI_ERRLOG_APIKEY = 15:00:21: CodeProject.BackendProcessRunner: CPAI_PORT = 32168 15:00:21: CodeProject.BackendProcessRunner: CPAI_MODULE_ID = PortraitFilter 15:00:21: CodeProject.BackendProcessRunner: CPAI_MODULE_NAME = Portrait Filter 15:00:21: CodeProject.BackendProcessRunner: CPAI_MODULE_PARALLELISM = 0 15:00:21: CodeProject.BackendProcessRunner: CPAI_CUDA_DEVICE_NUM = 15:00:21: CodeProject.BackendProcessRunner: CPAI_MODULE_SUPPORT_GPU = True 15:00:21: CodeProject.BackendProcessRunner: CPAI_MODULE_QUEUENAME = portraitfilter_queue 15:00:21: CodeProject.BackendProcessRunner: __ 15:00:21: CodeProject.BackendProcessRunner: Starting /app/AnalysisLayer/PortraitFilter/PortraitFilter 15:00:21: CodeProject.BackendProcessRunner: Started Portrait Filter backend 15:00:21: CodeProject.BackendProcessRunner: PortraitFilter: Application started. Press Ctrl+C to shut down. 15:00:21: CodeProject.BackendProcessRunner: PortraitFilter: Hosting environment: Production 15:00:21: CodeProject.BackendProcessRunner: PortraitFilter: Content root path: /app/AnalysisLayer/PortraitFilter 15:00:22: CodeProject.BackendProcessRunner: Attempting to start Face Processing 15:00:22: CodeProject.BackendProcessRunner: Runtime: python38, FilePath: Vision\intelligencelayer\face.py 15:00:22: CodeProject.BackendProcessRunner: ================================================================== 15:00:22: CodeProject.BackendProcessRunner: Setting Environment variables for Face Processing 15:00:22: CodeProject.BackendProcessRunner: __ 15:00:22: CodeProject.BackendProcessRunner: CPAI_APPROOTPATH = /app 15:00:22: CodeProject.BackendProcessRunner: CPAI_ERRLOG_APIKEY = 15:00:22: CodeProject.BackendProcessRunner: CPAI_PORT = 32168 15:00:22: CodeProject.BackendProcessRunner: APPDIR = /app/AnalysisLayer/Vision/intelligencelayer 15:00:22: CodeProject.BackendProcessRunner: DATA_DIR = /usr/share/CodeProject/AI 15:00:22: CodeProject.BackendProcessRunner: MODE = MEDIUM 15:00:22: CodeProject.BackendProcessRunner: MODELS_DIR = /app/AnalysisLayer/Vision/assets 15:00:22: CodeProject.BackendProcessRunner: PROFILE = desktop_gpu 15:00:22: CodeProject.BackendProcessRunner: TEMP_PATH = /app/AnalysisLayer/Vision/tempstore 15:00:22: CodeProject.BackendProcessRunner: USE_CUDA = false 15:00:22: CodeProject.BackendProcessRunner: VISION-FACE = True 15:00:22: CodeProject.BackendProcessRunner: YOLOv5_VERBOSE = false 15:00:22: CodeProject.BackendProcessRunner: CPAI_MODULE_ID = FaceProcessing 15:00:22: CodeProject.BackendProcessRunner: CPAI_MODULE_NAME = Face Processing 15:00:22: CodeProject.BackendProcessRunner: CPAI_MODULE_PARALLELISM = 0 15:00:22: CodeProject.BackendProcessRunner: CPAI_CUDA_DEVICE_NUM = 0 15:00:22: CodeProject.BackendProcessRunner: CPAI_MODULE_SUPPORT_GPU = True 15:00:22: CodeProject.BackendProcessRunner: CPAI_MODULE_QUEUENAME = face_queue 15:00:22: CodeProject.BackendProcessRunner: __ 15:00:22: CodeProject.BackendProcessRunner: Starting python3.8 "\app...\AnalysisLayer\Vision\face.py" 15:00:22: CodeProject.BackendProcessRunner: Started Face Processing backend 15:00:22: Portrait Filter: Portrait Filter module started. 15:00:23: CodeProject.BackendProcessRunner: Attempting to start Scene Classification 15:00:23: CodeProject.BackendProcessRunner: Runtime: python38, FilePath: Vision\intelligencelayer\scene.py 15:00:23: CodeProject.BackendProcessRunner: ================================================================== 15:00:23: CodeProject.BackendProcessRunner: Setting Environment variables for Scene Classification 15:00:23: CodeProject.BackendProcessRunner: __ 15:00:23: CodeProject.BackendProcessRunner: CPAI_APPROOTPATH = /app 15:00:23: CodeProject.BackendProcessRunner: CPAI_ERRLOG_APIKEY = 15:00:23: CodeProject.BackendProcessRunner: CPAI_PORT = 32168 15:00:23: CodeProject.BackendProcessRunner: APPDIR = /app/AnalysisLayer/Vision/intelligencelayer 15:00:23: CodeProject.BackendProcessRunner: DATA_DIR = /usr/share/CodeProject/AI 15:00:23: CodeProject.BackendProcessRunner: MODE = MEDIUM 15:00:23: CodeProject.BackendProcessRunner: MODELS_DIR = /app/AnalysisLayer/Vision/assets 15:00:23: CodeProject.BackendProcessRunner: PROFILE = desktop_gpu 15:00:23: CodeProject.BackendProcessRunner: TEMP_PATH = /app/AnalysisLayer/Vision/tempstore 15:00:23: CodeProject.BackendProcessRunner: USE_CUDA = True 15:00:23: CodeProject.BackendProcessRunner: VISION-SCENE = True 15:00:23: CodeProject.BackendProcessRunner: YOLOv5_VERBOSE = false 15:00:23: CodeProject.BackendProcessRunner: CPAI_MODULE_ID = SceneClassification 15:00:23: CodeProject.BackendProcessRunner: CPAI_MODULE_NAME = Scene Classification 15:00:23: CodeProject.BackendProcessRunner: CPAI_MODULE_PARALLELISM = 1 15:00:23: CodeProject.BackendProcessRunner: CPAI_CUDA_DEVICE_NUM = 15:00:23: CodeProject.BackendProcessRunner: CPAI_MODULE_SUPPORT_GPU = True 15:00:23: CodeProject.BackendProcessRunner: CPAI_MODULE_QUEUENAME = scene_queue 15:00:23: CodeProject.BackendProcessRunner: __ 15:00:23: CodeProject.BackendProcessRunner: Starting python3.8 "\app...\AnalysisLayer\Vision\scene.py" 15:00:23: CodeProject.BackendProcessRunner: Started Scene Classification backend 15:00:24: CodeProject.BackendProcessRunner: Attempting to start Object Detection (YOLO) 15:00:24: CodeProject.BackendProcessRunner: Runtime: python38, FilePath: ObjectDetectionYolo\detect_adapter.py 15:00:24: CodeProject.BackendProcessRunner: ================================================================== 15:00:24: CodeProject.BackendProcessRunner: Setting Environment variables for Object Detection (YOLO) 15:00:24: CodeProject.BackendProcessRunner: __ 15:00:24: CodeProject.BackendProcessRunner: CPAI_APPROOTPATH = /app 15:00:24: CodeProject.BackendProcessRunner: CPAI_ERRLOG_APIKEY = 15:00:24: CodeProject.BackendProcessRunner: CPAI_PORT = 32168 15:00:24: CodeProject.BackendProcessRunner: APPDIR = /app/AnalysisLayer/ObjectDetectionYolo 15:00:24: CodeProject.BackendProcessRunner: CUSTOM_MODELS_DIR = /app/AnalysisLayer/ObjectDetectionYolo/custom-models 15:00:24: CodeProject.BackendProcessRunner: MODELS_DIR = /app/AnalysisLayer/ObjectDetectionYolo/assets 15:00:24: CodeProject.BackendProcessRunner: MODEL_SIZE = Medium 15:00:24: CodeProject.BackendProcessRunner: RESOLUTION = Medium 15:00:24: CodeProject.BackendProcessRunner: USE_CUDA = True 15:00:24: CodeProject.BackendProcessRunner: YOLOv5_VERBOSE = false 15:00:24: CodeProject.BackendProcessRunner: CPAI_MODULE_ID = ObjectDetectionYolo 15:00:24: CodeProject.BackendProcessRunner: CPAI_MODULE_NAME = Object Detection (YOLO) 15:00:24: CodeProject.BackendProcessRunner: CPAI_MODULE_PARALLELISM = 0 15:00:24: CodeProject.BackendProcessRunner: CPAI_CUDA_DEVICE_NUM = 15:00:24: CodeProject.BackendProcessRunner: CPAI_MODULE_SUPPORT_GPU = True 15:00:24: CodeProject.BackendProcessRunner: CPAI_MODULE_QUEUENAME = detection_queue 15:00:24: CodeProject.BackendProcessRunner: __ 15:00:24: CodeProject.BackendProcessRunner: Starting python3.8 "\app...\AnalysisLayer\detect_adapter.py" 15:00:24: CodeProject.BackendProcessRunner: Started Object Detection (YOLO) backend 15:00:24: CodeProject.VersionService: Latest version available is 1.6.2-Beta 15:00:24: CodeProject.VersionProcessRunner: Current Version is 1.6.2-Beta 15:00:24: CodeProject.VersionProcessRunner: Server: This is the latest version 15:00:25: CodeProject.BackendProcessRunner: Attempting to start Background Remover 15:00:25: CodeProject.BackendProcessRunner: Runtime: python39, FilePath: BackgroundRemover\rembg_adapter.py 15:00:25: CodeProject.BackendProcessRunner: ================================================================== 15:00:25: CodeProject.BackendProcessRunner: Setting Environment variables for Background Remover 15:00:25: CodeProject.BackendProcessRunner: __ 15:00:25: CodeProject.BackendProcessRunner: CPAI_APPROOTPATH = /app 15:00:25: CodeProject.BackendProcessRunner: CPAI_ERRLOG_APIKEY = 15:00:25: CodeProject.BackendProcessRunner: CPAI_PORT = 32168 15:00:25: CodeProject.BackendProcessRunner: U2NET_HOME = /app/AnalysisLayer/BackgroundRemover/models 15:00:25: CodeProject.BackendProcessRunner: CPAI_MODULE_ID = BackgroundRemover 15:00:25: CodeProject.BackendProcessRunner: CPAI_MODULE_NAME = Background Remover 15:00:25: CodeProject.BackendProcessRunner: CPAI_MODULE_PARALLELISM = 1 15:00:25: CodeProject.BackendProcessRunner: CPAI_CUDA_DEVICE_NUM = 15:00:25: CodeProject.BackendProcessRunner: CPAI_MODULE_SUPPORT_GPU = False 15:00:25: CodeProject.BackendProcessRunner: CPAI_MODULE_QUEUENAME = removebackground_queue 15:00:25: CodeProject.BackendProcessRunner: __ 15:00:25: CodeProject.BackendProcessRunner: Starting python3.9 "\app...\AnalysisLayer\rembg_adapter.py" 15:00:25: CodeProject.BackendProcessRunner: Started Background Remover backend 15:00:27: Scene Classification: Scene Classification started. 15:00:27: Face Processing: Face Processing started. 15:00:29: Background Remover: Background Remover started. 15:00:30: Object Detection (YOLO): Running init for Object Detection (YOLO) 15:00:30: Object Detection (YOLO): Object Detection (YOLO) started. 15:03:00: CodeProject.VersionService: Latest version available is 1.6.2-Beta

and these are lines when I submit a background remove:

15:06:11: CodeProject.QueueServices: Queued: 'removebackground' request, id 92c27c06-b590-4989-9aad-85949cdb3221 15:06:11: CodeProject.QueueServices: Dequeued 'removebackground' request, id 92c27c06-b590-4989-9aad-85949cdb3221 15:06:11: Background Remover: Retrieved removebackground_queue command 15:06:41: Background Remover: Module 'Background Remover' (command: removebackground) took 30468ms 15:06:41: Background Remover: Sending response for request from removebackground_queue took 70ms

With the message in UI: Unable to complete API call: AbortError: The user aborted a request.

ChrisMaunder commented 1 year ago

AbortError: The user aborted a request

This is a timeout issue. Your system is too slow to process the inference. However, the first inference is often the slowest, so trying a couple of times could allow the system to load up what's needed and then be more performant.

The timeout in this case is in the vision.html file under app/CodeProject/AI/Server/wwwroot/

Change serviceTimeoutSec to something larger and see if that allows it enough time to process.

<script type="text/javascript">

const useSVG            = true;
const pingFrequency     = 1000; // milliseconds
const apiServiceUrl     = "http://" + (window.location.hostname || "localhost")
                                + ":" + (window.location.port || 32168);
const serviceTimeoutSec = 20;
let serverOnline        = false;
alexbn71 commented 1 year ago

Yes it works know. Thank you.

alexbn71 commented 1 year ago

Uhmm on a Windows machine i7 10th with 32GB RAM (no Docker and no Linux) an image of 1900x2500 it gives the same result now as in Linux: "Unable to complete API call: AbortError: The user aborted a request." The performance of this feature are decreased a lot from previous versions, 1.5.9/1.6.0

ChrisMaunder commented 1 year ago

Hey Mike - are you seeing the drop in performance within Blue Iris, or when you run a benchmark from the CodeProject.AI explorer? Could you post your C:\ProgramData\CodeProject\AI\modulesettings.json file?

I'm trying to work out if what your seeing is due to changes the Blue Iris has made. I'm not seeing any major changes in perf on my end, and the only change we made that would affect performance was to exclude some cards (not the 3060 both you and I have) from running half-precision

Answered wrong person. That'll teach me to try and work on a phone.

MikeLud commented 1 year ago

I am not see any drop in performance. I do notice that the calculating for detection time on the dashboard do not match what the benchmark is showing 1/64.2=16ms not the ~80ms

image image

`{ "Modules": {

"ObjectDetectionYolo": {
  "Name": "Object Detection (YOLO)",

  "Activate": true,
  "Parallelism": 0,        // Defaults to (#CPUs - 1)
  "SupportGPU": true,
  "PostStartPauseSecs": 1, // 1 if using GPU, 0 for CPU

  "Description": "The object detection module uses YOLO (You Only Look Once) to locate and classify the objects that the custom models have been trained on.",
  "FilePath": "ObjectDetectionYolo\\detect_adapter.py",
  "Runtime": "python38",
  "Platforms": [ "all" ],

  "EnvironmentVariables": {
    "YOLOv5_VERBOSE": "false",

    "MODEL_SIZE": "Medium", // small, medium, large, x-large
    "RESOLUTION": "High", // low, medium, high
    "USE_CUDA": "True",

    "APPDIR": "%MODULES_PATH%\\ObjectDetectionYolo",
    "MODELS_DIR": "%MODULES_PATH%\\ObjectDetectionYolo\\assets",
    "CUSTOM_MODELS_DIR": "%MODULES_PATH%\\ObjectDetectionYolo\\custom-models"
  },

  "RouteMaps": [
    {
      "Name": "Object Detector (YOLO)",
      "Path": "vision/detection",
      "Method": "POST",
      "Queue": "detection_queue",
      "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": "predictions",
          "Type": "Object",
          "Description": "An array of objects with the x_max, x_min, max, y_min, label and confidence."
        }
      ]
    },

    {
      "Name": "Custom Object Detector (YOLO)",
      "Path": "vision/custom",
      "Method": "POST",
      "Queue": "detection_queue",
      "Command": "custom",
      "Description": "Detects objects based on YOLO PyTorch models. Models are stored as .pt files in the /ObjectDetectionYolo/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": "predictions",
          "Type": "Object",
          "Description": "An array of objects with the x_max, x_min, max, y_min, label and confidence."
        }
      ]
    },

    {
      "Name": "Object Detector List Custom Models",
      "Path": "vision/custom/list",
      "Method": "POST",
      "Queue": "detection_queue",
      "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."
        }
      ]
    }
  ]
}

} }`

MikeLud commented 1 year ago

Chris I tried adding my 3090 to the half list to see if there is any performance drop and there was none.

ChrisMaunder commented 1 year ago

Uhmm on a Windows machine i7 10th with 32GB RAM (no Docker and no Linux) an image of 1900x2500 it gives the same result now as in Linux: "Unable to complete API call: AbortError: The user aborted a request." The performance of this feature are decreased a lot from previous versions, 1.5.9/1.6.0

@alexbn71 What graphics card are you using?

ChrisMaunder commented 1 year ago

Chris I tried adding my 3090 to the half list to see if there is any performance drop and there was none.

That's interesting because I would have expected at least a little drop in perf, but my understanding is that this optimisation (half precision) really shines in the training side of things.

ChrisMaunder commented 1 year ago

@MikeLud If that's a dump of your modulesettings file in ProgramData\CodeProject\AI then I would simply delete that file. You have a version left over from the internal beta you did for us, meaning it's way more bloated than required. The Production version (granted we're still beta) provides a massive optimisation for this file, and means that file won't block changes you make to the modulesettings files within the module files themselves.

https://www.codeproject.com/ai/docs/api/module_settings.html lists the order or precedence of the settings files (and other settings)

matthewDDennis commented 1 year ago

@MikeLud

I am not see any drop in performance. I do notice that the calculating for detection time on the dashboard do not match what the benchmark is showing 1/64.2=16ms not the ~80ms

Mike, The benchmark takes advantage of the fact that CodeProject AI can process multiple requests in parallel. This is limited to the number of connections that the browser can make to one domain, usually 6. Since one is already used, this leaves 5 requests running in parallel so 80 ms/5 = 16 ms.

So 64 FPS, but each request takes 80 ms, but they are overlapping.

MikeLud commented 1 year ago

@ChrisMaunder I posted the wrong json, it was from one of the modules, does this look better.

{ "Modules": { "SceneClassification": { "Activate": false }, "FaceProcessing": { "Activate": false }, "PortraitFilter": { "Activate": false }, "BackgroundRemover": { "Activate": false } } }

MikeLud commented 1 year ago

@matthewDDennis thanks for the clarification.

ChrisMaunder commented 1 year ago

Hey Mike

If there was an issue with half float on the card my expectation is it simply wouldn’t work if it was turned on, and would be slower than if it did actually work if turned off

The 3090 should be solid on half precision.

This is an odd one. I’ll dig in more in the morning

On Sep 28, 2022, at 6:41 PM, MikeLud @.***> wrote:



Chris I tried adding my 3090 to the half list to see if there is any performance drop and there was none.

— Reply to this email directly, view it on GitHubhttps://github.com/codeproject/CodeProject.AI-Server/issues/13#issuecomment-1261536565, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABDWW2IPIDCKNPCHSE7SAQLWATCSPANCNFSM6AAAAAAQTMKHDY. You are receiving this because you commented.Message ID: @.***>

MikeLud commented 1 year ago

@ChrisMaunder

I was seeing if the GPU did not support half float and CodeProject.AI had full float enabled it did not work at all.

ChrisMaunder commented 1 year ago

@MikeLud So with half float it works, but full float it doesn't? Is it a timeout error?

ChrisMaunder commented 1 year ago

The latest version allows you to modify the timeout property. Since I've not had any more updates on this I'm closing this issue