|
|
What would this be?
08:59:27:
08:59:27:Started Object Detection (YOLOv8) module
09:00:19:Object Detection (YOLOv8): [AttributeError] : Traceback (most recent call last):
File "/app/modules/ObjectDetectionYOLOv8/detect.py", line 147, in do_detection
results = detector.predict(img, imgsz=resolution, half=use_half_precision,
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/engine/model.py", line 266, in predict
self.predictor.setup_model(model=self.model, verbose=is_cli)
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/engine/predictor.py", line 341, in setup_model
self.model = AutoBackend(
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/nn/autobackend.py", line 141, in __init__
model = model.fuse(verbose=verbose) if fuse else model
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/nn/tasks.py", line 176, in fuse
delattr(m, "bn") # remove batchnorm
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1266, in __delattr__
object.__delattr__(self, name)
AttributeError: bn
09:00:19:Response rec'd from Object Detection (YOLOv8) command 'detect' (...8d4e22)
Everything installed successfully without error, but the YOLOv8 didn't automattically start, I had to start it.
Here is my SystemInfo:
Server version: 2.6.2
System: Docker (Linux 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022)
Operating System: Linux (Ubuntu 22.04)
CPUs: AMD Ryzen Threadripper 3960X 24-Core Processor (AMD)
1 CPU x 24 cores. 48 logical processors (x64)
GPU (Primary): NVIDIA GeForce RTX 3070 (8 GiB) (NVIDIA)
Driver: 551.23, CUDA: 12.4 (up to: 12.4), Compute: 8.6, cuDNN: 8.9.6
System RAM: 63 GiB
Platform: Linux
BuildConfig: Release
Execution Env: Docker
Runtime Env: Production
Runtimes installed:
.NET runtime: 7.0.17
.NET SDK: Not found
Default Python: 3.10.12
Go: Not found
NodeJS: Not found
Rust: Not found
Video adapter info:
System GPU info:
GPU 3D Usage 25%
GPU RAM Usage 7.5 GiB
Global Environment variables:
CPAI_APPROOTPATH = <root>
CPAI_PORT = 32168
modified 5-Apr-24 17:46pm.
|
|
|
|
|
Thanks very much for your message. The YOLOv8 module isn't set to start automatically. What should happen is, once you start the module once, it should auto-start next time.
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
OK, I get that it will restart on it's own.
However, what about these errors? This is a new install, uninstalled YOLOv8 and reinstalled it.
When it starts, I get the following (maybe I shouldn't be concerned about it...but maybe others are seeing it as well...or maybe you just need to know it)
Here is what I see - HINT: LOOK AT 9:45:19 timestamp :
09:44:20:Server: This is the latest version
09:44:21:
09:44:21:Module 'Object Detection (YOLOv8)' 1.4.2 (ID: ObjectDetectionYOLOv8)
09:44:21:Valid: True
09:44:21:Module Path: <root>/modules/ObjectDetectionYOLOv8
09:44:21:AutoStart: True
09:44:21:Queue: objectdetection_queue
09:44:21:Runtime: python3.8
09:44:21:Runtime Loc: Shared
09:44:21:FilePath: detect_adapter.py
09:44:21:Start pause: 1 sec
09:44:21:Parallelism: 0
09:44:21:LogVerbosity:
09:44:21:Platforms: all
09:44:21:GPU Libraries: installed if available
09:44:21:GPU Enabled: enabled
09:44:21:Accelerator:
09:44:21:Half Precis.: enable
09:44:21:Environment Variables
09:44:21:APPDIR = <root>/modules/ObjectDetectionYOLOv8
09:44:21:CUSTOM_MODELS_DIR = <root>/modules/ObjectDetectionYOLOv8/custom-models
09:44:21:MODELS_DIR = <root>/modules/ObjectDetectionYOLOv8/assets
09:44:21:MODEL_SIZE = Medium
09:44:21:USE_CUDA = True
09:44:21:YOLO_VERBOSE = false
09:44:21:
09:44:21:Started Object Detection (YOLOv8) module
09:44:23:face.py: GPU in use: NVIDIA GeForce RTX 3070
09:45:19:Object Detection (YOLOv8): [AttributeError] : Traceback (most recent call last):
File "/app/modules/ObjectDetectionYOLOv8/detect.py", line 147, in do_detection
results = detector.predict(img, imgsz=resolution, half=use_half_precision,
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/engine/model.py", line 266, in predict
self.predictor.setup_model(model=self.model, verbose=is_cli)
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/engine/predictor.py", line 341, in setup_model
self.model = AutoBackend(
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/nn/autobackend.py", line 141, in __init__
model = model.fuse(verbose=verbose) if fuse else model
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/nn/tasks.py", line 176, in fuse
delattr(m, "bn") # remove batchnorm
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1266, in __delattr__
object.__delattr__(self, name)
AttributeError: bn
09:45:20:Object Detection (YOLOv8): [AttributeError] : Traceback (most recent call last):
File "/app/modules/ObjectDetectionYOLOv8/detect.py", line 147, in do_detection
results = detector.predict(img, imgsz=resolution, half=use_half_precision,
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/engine/model.py", line 266, in predict
self.predictor.setup_model(model=self.model, verbose=is_cli)
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/engine/predictor.py", line 341, in setup_model
self.model = AutoBackend(
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/nn/autobackend.py", line 141, in __init__
model = model.fuse(verbose=verbose) if fuse else model
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/nn/tasks.py", line 176, in fuse
delattr(m, "bn") # remove batchnorm
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1266, in __delattr__
object.__delattr__(self, name)
AttributeError: bn
09:45:20:Object Detection (YOLOv8): [AttributeError] : Traceback (most recent call last):
File "/app/modules/ObjectDetectionYOLOv8/detect.py", line 147, in do_detection
results = detector.predict(img, imgsz=resolution, half=use_half_precision,
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/engine/model.py", line 266, in predict
self.predictor.setup_model(model=self.model, verbose=is_cli)
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/engine/predictor.py", line 341, in setup_model
self.model = AutoBackend(
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/nn/autobackend.py", line 141, in __init__
model = model.fuse(verbose=verbose) if fuse else model
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/nn/tasks.py", line 176, in fuse
delattr(m, "bn") # remove batchnorm
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1266, in __delattr__
object.__delattr__(self, name)
AttributeError: bn
09:45:20:Object Detection (YOLOv8): [AttributeError] : Traceback (most recent call last):
File "/app/modules/ObjectDetectionYOLOv8/detect.py", line 147, in do_detection
results = detector.predict(img, imgsz=resolution, half=use_half_precision,
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/engine/model.py", line 266, in predict
self.predictor.setup_model(model=self.model, verbose=is_cli)
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/engine/predictor.py", line 341, in setup_model
self.model = AutoBackend(
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/nn/autobackend.py", line 141, in __init__
model = model.fuse(verbose=verbose) if fuse else model
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/nn/tasks.py", line 176, in fuse
delattr(m, "bn") # remove batchnorm
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1266, in __delattr__
object.__delattr__(self, name)
AttributeError: bn
09:45:20:Response rec'd from Object Detection (YOLOv8) command 'detect' (...7832cb)
09:45:20:Response rec'd from Object Detection (YOLOv8) command 'detect' (...c4899c)
09:45:20:Response rec'd from Object Detection (YOLOv8) command 'detect' (...345625)
09:45:20:Object Detection (YOLOv8): [AttributeError] : Traceback (most recent call last):
File "/app/modules/ObjectDetectionYOLOv8/detect.py", line 147, in do_detection
results = detector.predict(img, imgsz=resolution, half=use_half_precision,
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/engine/model.py", line 266, in predict
self.predictor.setup_model(model=self.model, verbose=is_cli)
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/engine/predictor.py", line 341, in setup_model
self.model = AutoBackend(
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/nn/autobackend.py", line 141, in __init__
model = model.fuse(verbose=verbose) if fuse else model
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/nn/tasks.py", line 176, in fuse
delattr(m, "bn") # remove batchnorm
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1266, in __delattr__
object.__delattr__(self, name)
AttributeError: bn
09:45:20:Object Detection (YOLOv8): [AttributeError] : Traceback (most recent call last):
File "/app/modules/ObjectDetectionYOLOv8/detect.py", line 147, in do_detection
results = detector.predict(img, imgsz=resolution, half=use_half_precision,
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/engine/model.py", line 266, in predict
self.predictor.setup_model(model=self.model, verbose=is_cli)
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/engine/predictor.py", line 341, in setup_model
self.model = AutoBackend(
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/nn/autobackend.py", line 141, in __init__
model = model.fuse(verbose=verbose) if fuse else model
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/nn/tasks.py", line 176, in fuse
delattr(m, "bn") # remove batchnorm
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1266, in __delattr__
object.__delattr__(self, name)
AttributeError: bn
09:45:20:Object Detection (YOLOv8): [AttributeError] : Traceback (most recent call last):
File "/app/modules/ObjectDetectionYOLOv8/detect.py", line 147, in do_detection
results = detector.predict(img, imgsz=resolution, half=use_half_precision,
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/engine/model.py", line 266, in predict
self.predictor.setup_model(model=self.model, verbose=is_cli)
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/engine/predictor.py", line 341, in setup_model
self.model = AutoBackend(
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/nn/autobackend.py", line 141, in __init__
model = model.fuse(verbose=verbose) if fuse else model
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/nn/tasks.py", line 176, in fuse
delattr(m, "bn") # remove batchnorm
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1266, in __delattr__
object.__delattr__(self, name)
AttributeError: bn
09:45:20:Object Detection (YOLOv8): [AttributeError] : Traceback (most recent call last):
File "/app/modules/ObjectDetectionYOLOv8/detect.py", line 147, in do_detection
results = detector.predict(img, imgsz=resolution, half=use_half_precision,
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/engine/model.py", line 266, in predict
self.predictor.setup_model(model=self.model, verbose=is_cli)
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/engine/predictor.py", line 341, in setup_model
self.model = AutoBackend(
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/nn/autobackend.py", line 141, in __init__
model = model.fuse(verbose=verbose) if fuse else model
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/nn/tasks.py", line 176, in fuse
delattr(m, "bn") # remove batchnorm
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1266, in __delattr__
object.__delattr__(self, name)
AttributeError: bn
09:45:20:Object Detection (YOLOv8): [AttributeError] : Traceback (most recent call last):
File "/app/modules/ObjectDetectionYOLOv8/detect.py", line 147, in do_detection
results = detector.predict(img, imgsz=resolution, half=use_half_precision,
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/engine/model.py", line 266, in predict
self.predictor.setup_model(model=self.model, verbose=is_cli)
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/engine/predictor.py", line 341, in setup_model
self.model = AutoBackend(
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/nn/autobackend.py", line 141, in __init__
model = model.fuse(verbose=verbose) if fuse else model
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/nn/tasks.py", line 176, in fuse
delattr(m, "bn") # remove batchnorm
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1266, in __delattr__
object.__delattr__(self, name)
AttributeError: bn
09:45:20:Object Detection (YOLOv8): [AttributeError] : Traceback (most recent call last):
File "/app/modules/ObjectDetectionYOLOv8/detect.py", line 147, in do_detection
results = detector.predict(img, imgsz=resolution, half=use_half_precision,
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/engine/model.py", line 266, in predict
self.predictor.setup_model(model=self.model, verbose=is_cli)
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/engine/predictor.py", line 341, in setup_model
self.model = AutoBackend(
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/nn/autobackend.py", line 141, in __init__
model = model.fuse(verbose=verbose) if fuse else model
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/ultralytics/nn/tasks.py", line 176, in fuse
delattr(m, "bn") # remove batchnorm
File "/app/modules/ObjectDetectionYOLOv8/bin/linux/python38/venv/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1266, in __delattr__
object.__delattr__(self, name)
AttributeError: bn
09:45:36:Response rec'd from Object Detection (YOLOv8) command 'detect' (...226f6d) ['Found chair, chair, tv'] took 13376ms
|
|
|
|
|
Thank you kindly. We patched this issue once before, it looks like we have to patch it again.
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
This is a threading issue with PyTorch. I've added a lock around the interpreter (really only needs to be around the fuse code, so there's scope to optimise this) which should help.
Out of interest, how many requests per second are you sending to CodeProject.AI?
cheers
Chris Maunder
|
|
|
|
|
How do I get this information?
|
|
|
|
|
I experience the same issue, YOLOv8 + ALPR on 2.6.2, when request count becomes fairly high. I have attached a log from Blue Iris showing requests and errors, as well as Event Viewer output.
Event Viewer:
Faulting application name: python.exe, version: 3.9.6150.1013, time stamp: 0x60d9eb23
Faulting module name: nvcuda64.dll, version: 31.0.15.5212, time stamp: 0x660c7129
Exception code: 0xc0000005
Fault offset: 0x00000000000bcdc0
Faulting process id: 0x0x6FE4
Faulting application start time: 0x0x1DA8A57F069CC87
Faulting application path: C:\Program Files\CodeProject\AI\runtimes\bin\windows\python39\python.exe
Faulting module path: C:\Windows\system32\DriverStore\FileRepository\nv_dispi.inf_amd64_268e85175aa9e991\nvcuda64.dll
Report Id: 38480e22-c755-469d-a9d9-0229903fe94c
Faulting package full name:
Faulting package-relative application ID:
The real problem is... when it starts to behave like this (after "remove batchnorm" error), Cp.AI hardly recovers, there are crashes between 1-20 minutes, and in many cases YOLOv8 module stays down. I basically have to babysit CP.AI continuously in those cases.
Below, an excerpt from log with requests and timestamps (actually these were handled fine by CP.AI). All requests within a span of 3 seconds.
For what it's worth, the GPU is an RTX 3090.
11:39:15:Response rec'd from Object Detection (YOLOv8) command 'detect' (...18f7a0) ['Found potted plant, potted plant, potted plant...'] took 28ms
11:39:15:Object Detection (YOLOv8): Detecting using ipcam-general
11:39:15:Response rec'd from Object Detection (YOLOv8) command 'detect' (...da8d5a) ['Found person, boat, potted plant...'] took 53ms
11:39:15:Object Detection (YOLOv8): Detecting using ipcam-general
11:39:15:Response rec'd from Object Detection (YOLOv8) command 'custom' (...b4e42b) ['No objects found'] took 31ms
11:39:15:Object Detection (YOLOv8): Detecting using license-plate
11:39:15:Response rec'd from Object Detection (YOLOv8) command 'detect' (...967f3a) ['Found potted plant, potted plant, potted plant...'] took 86ms
11:39:15:Object Detection (YOLOv8): Detecting using ipcam-general
11:39:15:Response rec'd from Object Detection (YOLOv8) command 'custom' (...3543c2) ['Found person'] took 38ms
11:39:15:Response rec'd from Object Detection (YOLOv8) command 'custom' (...e079b9) ['No objects found'] took 35ms
11:39:15:Response rec'd from License Plate Reader command 'alpr' (...751f74) ['No plates found'] took 45ms
11:39:15:Object Detection (YOLOv8): Detecting using license-plate
11:39:15:Response rec'd from Object Detection (YOLOv8) command 'detect' (...f10bb7) ['Found boat, potted plant, potted plant...'] took 121ms
11:39:15:Object Detection (YOLOv8): Detecting using ipcam-general
11:39:15:Response rec'd from Object Detection (YOLOv8) command 'custom' (...cb0ff0) ['No objects found'] took 39ms
11:39:15:Object Detection (YOLOv8): Detecting using license-plate
11:39:15:Response rec'd from Object Detection (YOLOv8) command 'custom' (...9010b6) ['No objects found'] took 45ms
11:39:15:Response rec'd from License Plate Reader command 'alpr' (...7f1e6d) ['No plates found'] took 57ms
11:39:15:Response rec'd from Object Detection (YOLOv8) command 'detect' (...59eeec) ['Found potted plant, potted plant, boat...'] took 187ms
11:39:15:Object Detection (YOLOv8): Detecting using ipcam-general
11:39:15:Response rec'd from Object Detection (YOLOv8) command 'custom' (...31d4ae) ['Found person'] took 74ms
11:39:15:Response rec'd from Object Detection (YOLOv8) command 'custom' (...a78bee) ['No objects found'] took 76ms
11:39:15:Response rec'd from License Plate Reader command 'alpr' (...a8a7d3) ['No plates found'] took 85ms
11:39:15:Object Detection (YOLOv8): Detecting using license-plate
11:39:15:Response rec'd from Object Detection (YOLOv8) command 'detect' (...c0a06b) ['Found potted plant, potted plant, potted plant...'] took 244ms
11:39:15:Response rec'd from Object Detection (YOLOv8) command 'custom' (...f17d45) ['No objects found'] took 51ms
11:39:15:Object Detection (YOLOv8): Detecting using ipcam-general
11:39:15:Response rec'd from Object Detection (YOLOv8) command 'custom' (...56efa0) ['No objects found'] took 39ms
11:39:15:Response rec'd from License Plate Reader command 'alpr' (...3c1aaf) ['No plates found'] took 51ms
11:39:15:Object Detection (YOLOv8): Detecting using license-plate
11:39:15:Response rec'd from Object Detection (YOLOv8) command 'custom' (...85eb35) ['No objects found'] took 33ms
11:39:15:Response rec'd from Object Detection (YOLOv8) command 'custom' (...34894d) ['No objects found'] took 28ms
11:39:15:Response rec'd from License Plate Reader command 'alpr' (...8c583c) ['No plates found'] took 41ms
11:39:15:Object Detection (YOLOv8): Detecting using license-plate
11:39:15:Response rec'd from Object Detection (YOLOv8) command 'custom' (...25192a) ['No objects found'] took 16ms
11:39:15:Response rec'd from License Plate Reader command 'alpr' (...c6ea2f) ['No plates found'] took 27ms
11:39:15:Response rec'd from Object Detection (YOLOv8) command 'detect' (...d12720) ['Found boat, potted plant, potted plant...'] took 11ms
11:39:15:Object Detection (YOLOv8): Detecting using ipcam-general
11:39:15:Response rec'd from Object Detection (YOLOv8) command 'custom' (...24a0d6) ['Found person'] took 10ms
11:39:15:Object Detection (YOLOv8): Detecting using license-plate
11:39:15:Response rec'd from Object Detection (YOLOv8) command 'custom' (...a7ac68) ['No objects found'] took 10ms
11:39:15:Response rec'd from License Plate Reader command 'alpr' (...1d93f7) ['No plates found'] took 18ms
11:39:16:Response rec'd from Object Detection (YOLOv8) command 'detect' (...f738a4) ['Found person, potted plant, potted plant...'] took 17ms
11:39:16:Object Detection (YOLOv8): Detecting using ipcam-general
11:39:16:Response rec'd from Object Detection (YOLOv8) command 'custom' (...b850fe) ['Found person'] took 12ms
11:39:16:Object Detection (YOLOv8): Detecting using license-plate
11:39:16:Response rec'd from Object Detection (YOLOv8) command 'custom' (...0bc07e) ['No objects found'] took 9ms
11:39:16:Response rec'd from License Plate Reader command 'alpr' (...4b2cb2) ['No plates found'] took 17ms
11:39:17:Response rec'd from Object Detection (YOLOv8) command 'detect' (...05f9ec) ['Found potted plant, boat, person...'] took 18ms
11:39:17:Object Detection (YOLOv8): Detecting using ipcam-general
11:39:17:Response rec'd from Object Detection (YOLOv8) command 'custom' (...20adb8) ['Found person'] took 12ms
11:39:17:Object Detection (YOLOv8): Detecting using license-plate
11:39:17:Response rec'd from Object Detection (YOLOv8) command 'custom' (...5c0901) ['No objects found'] took 11ms
11:39:17:Response rec'd from License Plate Reader command 'alpr' (...023b91) ['No plates found'] took 19ms
11:39:18:Response rec'd from Object Detection (YOLOv8) command 'detect' (...f213b0) ['Found person, potted plant, potted plant...'] took 18ms
11:39:18:Object Detection (YOLOv8): Detecting using ipcam-general
11:39:18:Response rec'd from Object Detection (YOLOv8) command 'custom' (...c02e67) ['Found person'] took 15ms
11:39:18:Object Detection (YOLOv8): Detecting using license-plate
11:39:18:Response rec'd from Object Detection (YOLOv8) command 'custom' (...3e3aaf) ['No objects found'] took 13ms
11:39:18:Response rec'd from License Plate Reader command 'alpr' (...8d3f62) ['No plates found'] took 21ms
If you need more details or any information, please let me know.
|
|
|
|
|
Running 2.1.6 version of the Coral object detection which works fine using tiny or small object size, however when switching to medium or large the TPU is no longer found and it rolls back to CPU instead. Enclosed is the error output from the console. I have fully uninstalled / reinstalled both CP and the module with the same result.
08:38:21:Module 'Object Detection (Coral)' 2.1.6 (ID: ObjectDetectionCoral)
08:38:21:Valid: True
08:38:21:Module Path: <root>\modules\ObjectDetectionCoral
08:38:21:AutoStart: True
08:38:21:Queue: objectdetection_queue
08:38:21:Runtime: python3.9
08:38:21:Runtime Loc: Local
08:38:21:FilePath: objectdetection_coral_adapter.py
08:38:21:Pre installed: False
08:38:21:Start pause: 1 sec
08:38:21:Parallelism: 1
08:38:21:LogVerbosity:
08:38:21:Platforms: all
08:38:21:GPU Libraries: installed if available
08:38:21:GPU Enabled: enabled
08:38:21:Accelerator:
08:38:21:Half Precis.: enable
08:38:21:Environment Variables
08:38:21:CPAI_CORAL_MODEL_NAME = YOLOv8
08:38:21:CPAI_CORAL_MULTI_TPU = True
08:38:21:MODELS_DIR = <root>\modules\ObjectDetectionCoral\assets
08:38:21:MODEL_SIZE = medium
08:38:21:
08:38:21:Started Object Detection (Coral) module
08:38:24:objectdetection_coral_adapter.py: ERROR:root:TFLite file C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\assets\yolov5m-int8_edgetpu.tflite doesn't exist
08:38:24:objectdetection_coral_adapter.py: WARNING:root:Exception creating interpreter: [Errno 2] No such file or directory: 'C:\\Program Files\\CodeProject\\AI\\modules\\ObjectDetectionCoral\\assets\\yolov5m-int8_edgetpu.tflite'
08:38:24:objectdetection_coral_adapter.py: Exception ignored in:
08:38:24:objectdetection_coral_adapter.py: Traceback (most recent call last):
08:38:24:objectdetection_coral_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\tpu_runner.py", line 352, in __del__
08:38:24:objectdetection_coral_adapter.py: self.delete()
08:38:24:objectdetection_coral_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\tpu_runner.py", line 375, in delete
08:38:24:objectdetection_coral_adapter.py: self._halt_interpreters(q_idx)
08:38:24:objectdetection_coral_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\tpu_runner.py", line 357, in _halt_interpreters
08:38:24:objectdetection_coral_adapter.py: for i in self.interpreters[seg_idx]:
08:38:24:objectdetection_coral_adapter.py: IndexError: list index out of range
08:38:24:objectdetection_coral_adapter.py: WARNING:root:No Coral TPUs found or able to be initialized. Using CPU.
08:38:24:objectdetection_coral_adapter.py: ERROR:root:TFLite file C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\assets\yolov5m-int8.tflite doesn't exist
08:38:24:objectdetection_coral_adapter.py: WARNING:root:Unable to create interpreter for CPU using edgeTPU library: [Errno 2] No such file or directory: 'C:\\Program Files\\CodeProject\\AI\\modules\\ObjectDetectionCoral\\assets\\yolov5m-int8.tflite'
08:38:24:objectdetection_coral_adapter.py: Exception ignored in:
08:38:24:objectdetection_coral_adapter.py: Traceback (most recent call last):
08:38:24:objectdetection_coral_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\tpu_runner.py", line 352, in __del__
08:38:24:objectdetection_coral_adapter.py: self.delete()
08:38:24:objectdetection_coral_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\tpu_runner.py", line 375, in delete
08:38:24:objectdetection_coral_adapter.py: self._halt_interpreters(q_idx)
08:38:24:objectdetection_coral_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\tpu_runner.py", line 357, in _halt_interpreters
08:38:24:objectdetection_coral_adapter.py: for i in self.interpreters[seg_idx]:
08:38:24:objectdetection_coral_adapter.py: IndexError: list index out of range
08:38:29:objectdetection_coral_adapter.py: TPU detected
08:38:29:objectdetection_coral_adapter.py: Attempting multi-TPU initialisation
08:38:29:objectdetection_coral_adapter.py: Failed to init multi-TPU. Falling back to single TPU.
08:38:29:objectdetection_coral_adapter.py: Unable to find or initialise the Coral TPU. Falling back to CPU-only.
08:38:29:objectdetection_coral_adapter.py: Error creating interpreter: Could not open 'C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\assets\yolov5m-int8.tflite'.
08:38:29:objectdetection_coral_adapter.py: Using CPU
modified 5-Apr-24 17:46pm.
|
|
|
|
|
Which version of CodeProject.AI server?
cheers
Chris Maunder
|
|
|
|
|
There's a bug in the current version that the YOLOv8 medium asset file name is incorrect. You can see from the error log that somehow it is pointing to a yolov5m-int8 asset.
ERROR:root:TFLite file C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\assets\yolov5m-int8_edgetpu.tflite doesn't exist
You have to manually correct it in the option.py file. The correct asset name should be yolov8m_416_640px.tflite
modified 5-Apr-24 17:47pm.
|
|
|
|
|
This has been fixed in the latest.
cheers
Chris Maunder
modified 5-Apr-24 17:47pm.
|
|
|
|
|
Coral version 2.2.0 is pointing to yolov8m-int8.tflite, which is still causing error. It should be yolov8m__416_640px.tflite.
modified 5-Apr-24 17:47pm.
|
|
|
|
|
Thank you !
modified 5-Apr-24 17:47pm.
|
|
|
|
|
Hi Chris,
I have a question/suggestion. As I've been manually installing the dependencies myself, I encountered an issue when trying to install the "requirements.windows.cuda11_8.txt" for ALPR. I received the following error:
(venv) C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\Scripts>cd C:\Users\User\Desktop\CodeProjectAI Files
(venv) C:\Users\User\Desktop\CodeProjectAI Files>pip download -r requirements.windows.cuda11_8.txt
Looking in indexes: https:
Collecting paddlepaddle-gpu==2.6.0 (from -r requirements.windows.cuda11_8.txt (line 5))
Using cached https:
Collecting paddleocr==2.7.0.3 (from -r requirements.windows.cuda11_8.txt (line 8))
Downloading https:
---------------------------------------- 465.7/465.7 kB 728.7 kB/s eta 0:00:00
Collecting imutils (from -r requirements.windows.cuda11_8.txt (line 10))
Downloading https:
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Collecting Pillow<10.0.0 (from -r requirements.windows.cuda11_8.txt (line 11))
Using cached https:
Collecting opencv-python (from -r requirements.windows.cuda11_8.txt (line 12))
Downloading https:
---------------------------------------- 38.6/38.6 MB 5.8 MB/s eta 0:00:00
Collecting numpy (from -r requirements.windows.cuda11_8.txt (line 13))
Downloading https:
---------------------------------------- 15.8/15.8 MB 3.8 MB/s eta 0:00:00
Collecting httpx (from paddlepaddle-gpu==2.6.0->-r requirements.windows.cuda11_8.txt (line 5))
Downloading https:
---------------------------------------- 75.6/75.6 kB 1.4 MB/s eta 0:00:00
Collecting decorator (from paddlepaddle-gpu==2.6.0->-r requirements.windows.cuda11_8.txt (line 5))
Downloading https:
Collecting astor (from paddlepaddle-gpu==2.6.0->-r requirements.windows.cuda11_8.txt (line 5))
Downloading https:
Collecting opt-einsum==3.3.0 (from paddlepaddle-gpu==2.6.0->-r requirements.windows.cuda11_8.txt (line 5))
Downloading https:
---------------------------------------- 65.5/65.5 kB 1.8 MB/s eta 0:00:00
Collecting protobuf<=3.20.2,>=3.1.0 (from paddlepaddle-gpu==2.6.0->-r requirements.windows.cuda11_8.txt (line 5))
Downloading https:
---------------------------------------- 904.2/904.2 kB 6.3 MB/s eta 0:00:00
Collecting shapely (from paddleocr==2.7.0.3->-r requirements.windows.cuda11_8.txt (line 8))
Downloading https:
---------------------------------------- 1.4/1.4 MB 7.6 MB/s eta 0:00:00
Collecting scikit-image (from paddleocr==2.7.0.3->-r requirements.windows.cuda11_8.txt (line 8))
Downloading https:
---------------------------------------- 24.5/24.5 MB 3.5 MB/s eta 0:00:00
Collecting imgaug (from paddleocr==2.7.0.3->-r requirements.windows.cuda11_8.txt (line 8))
Downloading https:
---------------------------------------- 948.0/948.0 kB 2.2 MB/s eta 0:00:00
Collecting pyclipper (from paddleocr==2.7.0.3->-r requirements.windows.cuda11_8.txt (line 8))
Downloading https:
---------------------------------------- 108.6/108.6 kB 2.1 MB/s eta 0:00:00
Collecting lmdb (from paddleocr==2.7.0.3->-r requirements.windows.cuda11_8.txt (line 8))
Downloading https:
---------------------------------------- 105.9/105.9 kB 2.0 MB/s eta 0:00:00
Collecting tqdm (from paddleocr==2.7.0.3->-r requirements.windows.cuda11_8.txt (line 8))
Downloading https:
---------------------------------------- 78.3/78.3 kB 2.2 MB/s eta 0:00:00
Collecting visualdl (from paddleocr==2.7.0.3->-r requirements.windows.cuda11_8.txt (line 8))
Downloading https:
---------------------------------------- 6.3/6.3 MB 7.1 MB/s eta 0:00:00
Collecting rapidfuzz (from paddleocr==2.7.0.3->-r requirements.windows.cuda11_8.txt (line 8))
Downloading https:
---------------------------------------- 1.6/1.6 MB 7.0 MB/s eta 0:00:00
Collecting opencv-python (from -r requirements.windows.cuda11_8.txt (line 12))
Downloading https:
---------------------------------------- 35.6/35.6 MB 5.1 MB/s eta 0:00:00
Collecting opencv-contrib-python<=4.6.0.66 (from paddleocr==2.7.0.3->-r requirements.windows.cuda11_8.txt (line 8))
Downloading https:
---------------------------------------- 42.5/42.5 MB 4.0 MB/s eta 0:00:00
Collecting cython (from paddleocr==2.7.0.3->-r requirements.windows.cuda11_8.txt (line 8))
Downloading https:
---------------------------------------- 2.8/2.8 MB 6.8 MB/s eta 0:00:00
Collecting lxml (from paddleocr==2.7.0.3->-r requirements.windows.cuda11_8.txt (line 8))
Downloading https:
---------------------------------------- 3.8/3.8 MB 8.1 MB/s eta 0:00:00
Collecting premailer (from paddleocr==2.7.0.3->-r requirements.windows.cuda11_8.txt (line 8))
Downloading https:
Collecting openpyxl (from paddleocr==2.7.0.3->-r requirements.windows.cuda11_8.txt (line 8))
Downloading https:
---------------------------------------- 250.0/250.0 kB 614.7 kB/s eta 0:00:00
Collecting attrdict (from paddleocr==2.7.0.3->-r requirements.windows.cuda11_8.txt (line 8))
Downloading https:
Collecting PyMuPDF<1.21.0 (from paddleocr==2.7.0.3->-r requirements.windows.cuda11_8.txt (line 8))
Downloading https:
---------------------------------------- 6.6/6.6 MB 9.6 MB/s eta 0:00:00
INFO: pip is looking at multiple versions of paddleocr to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install -r requirements.windows.cuda11_8.txt (line 5), -r requirements.windows.cuda11_8.txt (line 8) and Pillow<10.0.0 because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested Pillow<10.0.0
paddlepaddle-gpu 2.6.0 depends on Pillow
paddleocr 2.7.0.3 depends on Pillow>=10.0.0
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
To resolve this, I changed the Pillow version from "Pillow<10.0.0" to "Pillow>10.0.0", and then it successfully downloaded and installed the dependencies without any problems. My question is: Is this "requirements.txt" file used when the module is being installed? If so, perhaps the Pillow version specified within it should be updated.
I'm not sure if this change affects anything else, but I thought I should bring it up to let you know.
|
|
|
|
|
Yes, the requirements files you see are the ones used, and the specific re.txt file depends on your platform and hardware. We run the install line by line, not 1 single step (it helps debugging, it helps pinpoint issues, it can help work around conflicts, but it also circumvents PIPs intelligent version juggling.
We need to add notes explaining why we pinned to <10.0. My vague memory was because of Paddle, but as paddle evolves so too do dependencies. I've simply removed then <10.0 and will retest across platforms and update the module
cheers
Chris Maunder
|
|
|
|
|
Thank you for the answer Chris. It does make sense as I believe it was set for a reason.
|
|
|
|
|
I have been testing the image super resolution module and have a question regarding the concept. I was expecting an improvement of the resolution of the input image, but I experience the opposite. The result of the image processing has less pixels than the input image, it is doing a sub sampling. Have I misunderstood? Is the idea to sub sample or to super sample and thereby add information?
modified 5-Apr-24 17:48pm.
|
|
|
|
|
We need a disclaimer on that module. It works on images 224x224, and all other sizes are resized to fit. So, a large image will be shrunk, then have its resolution increased. A bit of a backwards step.
The modules are all meant to demonstrate how to use AI, and how to take a project (in this case, Exporting a Model from PyTorch to ONNX and Running it using ONNX Runtime and have it be exposed for use by CodeProject.AI server. A simple fix here is to break up images into 224x224 tiles and run the model on each tile in turn.
We'll leave that as an exercise for the reader.
The next update does tiling - way better results!
cheers
Chris Maunder
modified 4-Apr-24 8:39am.
|
|
|
|
|
Trying to install the PortraitFilter, but get this error:
09:04:17:Unable to download module 'PortraitFilter' from https://www.codeproject.com/KB/articles/5348853/PortraitFilter-1.7.1.zip. Error: The request was canceled due to the configured HttpClient.Timeout of 30 seconds elapsing.
I then downloaded the zip file and unpacked it manually to folder C:\Program Files\CodeProject\AI\modules\PortraitFilter-1.7.1. I then opened a command window in admin mode and tried a manual install but get the error shown below.
My system info is shown below.
|
|
|
|
|
That's odd.
Can you try ..\..\setup.bat --verbosity loud and let us know what it says? 1.7.1 is compatible with server 2.5.x and windows, so not sure why it's baulking.
cheers
Chris Maunder
|
|
|
|
|
C:\Program Files\CodeProject\AI\modules\PortraitFilter-1.7.1>....\setup.bat --verbosity loud
Installing CodeProject.AI Analysis Module
======================================================================
CodeProject.AI Installer
======================================================================
13.5Gb of 243Gb available on
os, arch = windows x86_64
systemName, platform = Windows, windows
setupMode = InstallModule
executionEnvironment = Production
rootDirPath = C:\Program Files\CodeProject\AI
appRootDirPath = C:\Program Files\CodeProject\AI\
setupScriptDirPath = C:\Program Files\CodeProject\AI\
sdkScriptsDirPath = C:\Program Files\CodeProject\AI\SDK\Scripts
runtimesDirPath = C:\Program Files\CodeProject\AI\runtimes
modulesDirPath = C:\Program Files\CodeProject\AI\modules
downloadDirPath = C:\Program Files\CodeProject\AI\downloads
General CodeProject.AI setup
Creating Directories...Done
GPU support
CUDA Present...Yes (CUDA 12.2, No cuDNN found)
ROCm Present...No
Reading PortraitFilter-1.7.1 settings.......Done
Installing module PortraitFilter-1.7.1
This module cannot be installed on this system
Setup complete
Total setup time 00:00:02.76
C:\Program Files\CodeProject\AI\modules\PortraitFilter-1.7.1>
|
|
|
|
|
I'm using AgentDVR and CodeProjectAI. One thing I noticed is after the computer restarts, AgentDVR would receives the error message "AI Custom Model not found" (or something similar), essentially indicating that YOLOv8 could not find the specified custom model (license-plate).
To handle this, I have to go to the CodeProjectAI Explorer to manually run the custom model of "license-plate" to get it to work.
It seems like YOLOv8 'forgets' that it has the custom model of "license-plate", and I have to remind it that it has it.
Is there any other way to solve this? Because if someone else restarts the computer, they would not know they need to take this step. Normally, people would expect it to just work.
modified 3-Apr-24 13:42pm.
|
|
|
|
|
Which version of CodeProject.AI server (I assume 2.5.x?), and is AgentDVR setup to use the vision/custom/license-plate route?
cheers
Chris Maunder
|
|
|
|
|
I was using 2.5.4 with YOLOv8 1.3.1. The ALPR for AgentDVR did not require one to set up the route. I don't know the details, but it automatically knows the route.
I think what happened was that I have not restart the computer since I first set up YOLOv8 and tested to ensure it works. Now I restarted the computer and this small error pops up. Again, to debug that, I just need to go to the CPAI Explorer to run license-plate once myself.
Otherwise, prior to YOLOv8, I was using YOLOv5 6.2 and never have that problem.
modified 4-Apr-24 10:19am.
|
|
|
|
|