Click here to Skip to main content
15,888,454 members
Articles / Artificial Intelligence

CodeProject.AI Server: AI the easy way.

Rate me:
Please Sign up or sign in to vote.
5.00/5 (91 votes)
29 Feb 202416 min read 3.2M   489.9K   270   6.7K
Version 2.6.2. Our fast, free, self-hosted Artificial Intelligence Server for any platform, any language
CodeProject.AI Server is a locally installed, self-hosted, fast, free and Open Source Artificial Intelligence server for any platform, any language. No off-device or out of network data transfer, no messing around with dependencies, and able to be used from any platform, any language. Runs as a Windows Service or a Docker container.

Image 1

Previous

Quick Links

CodeProject.AI Server: An Artificial Intelligence Server

For those who want to integrate AI functionality into their applications without writing the AI functionality or dealing with the insanely painful task of ensuring everything is setup correctly. CodeProject.AI Server manages your MLOps for you.

Think of CodeProject.AI Server like a database server: you install it, it runs in the background, and provides AI operations for any application via a simple API. The AI operations are handled by drop-in modules that can be easily created using any language, any stack, as long as that stack runs on the host machine. Python, .NET, node - whatever works for you.

CodeProject.AI server runs as a Windows service, under systemd in Linux, or on startup on macOS. Alternatively there are multiple Docker images for x64, arm64 and CUDA enabled systems. Any language that can make HTTP calls can access the service, and the server does not require an external internet connection. Your data stays in your network.

Image 2 Image 3 Image 4 Image 5 Image 6 Image 7 Image 8 Image 9 Image 10
Windows macOS macOS-arm64 Ubuntu Debian Raspberry Pi Orange Pi Jetson Nano Docker

What Does It Do?

Image 11

The CodeProject.AI Server's Dashboard

Currently CodeProject.AI Server contains AI modules that provide:

  • Object Detection (Python and .NET versions that use YOLO, plus a Tensorflow-Lite module that's ultra-lightweight and great for Raspberry Pi and Coral USB sticks
  • Face Detection and recognition
  • Text processing such as sentiment analysis and summarization
  • Image processing such as background removal, background blur, cartoon-isation and resolution enhancement
  • Model training, including dataset acquisition, for YOLO object detection

How Do I Use It?

Install the server and start making calls to the API. It's that easy.

Guides, Help, FAQs

CodeProject.AI Server Home Assistant Blue Iris

Image 12

The CodeProject.AI Server's Explorer in action

Why We Built CodeProject.AI Server

  • AI programming is something every single developer should be aware of

    We wanted a fun project we could use to help teach developers and get them involved in AI. We'll be using CodeProject.AI Server as a focus for articles and exploration to make it fun and painless to learn AI programming.

    We want your contributions!

  • AI coding examples have too many moving parts

    You need to install packages and languages and extensions to tools, and then updates and libraries (but version X, not version Y) and then you have to configure paths and...Oh, you want to run on Windows not Linux? In that case, you need to... It's all too hard. There was much yelling at CodeProject.

    CodeProject.AI Server includes everything you need in a single installer. CodeProject.AI Server also provides an installation script that will setup your dev environment and get you debugging within a couple of clicks.

  • AI solutions often require the use of cloud services

    If you trust the cloud provider, or understand the billing structure, or can be assured you aren't sending sensitive data or won't go over the free tier, this is fine. If you have a webcam inside your house, or can't work out how much AWS will charge, it's not so OK.

    CodeProject.AI Server can be installed locally. Your machine, your network, no data needs to leave your device.

1: Running and Playing With the Features

  1. Install and Run
    1. For a Windows Service, download the latest version, install, and launch the shortcut to the server's dashboard on your desktop or open a browser to http://localhost:32168.

      If you wish to take advantage of a CUDA enabled NVIDIA GPU, please ensure you have the CUDA drivers installed before you install CodeProject.AI. We recommend CUDA 11.8 if running Windows

    2. For a Docker Container for 64 Bit Linux, run:
      docker run -p 32168:32168 --name CodeProject.AI -d codeproject/ai-server

      For Docker GPU (supports NVIDIA CUDA), please use:

      docker run --gpus all -p 32168:32168 --name CodeProject.AI -d codeproject/ai-server:cuda11_7
  2. On the dashboard, at the top, is a link to the demo playground. Open that and play!

2: Running and Debugging the Code

  1. Clone the CodeProject CodeProject.AI Server repository.
  2. Make sure you have Visual Studio Code or Visual Studio 2019+ installed.
  3. Run the setup script in /src
  4. Debug the front-end server application (see notes below, but it's easy).

3. Using CodeProject.AI Server in My Application

Here's an example of using the API for scene detection using a simple JavaScript call:

HTML
<html>
<body>
Detect the scene in this file: <input id="image" type="file" />
<input type="button" value="Detect Scene" onclick="detectScene(image)" />

<script>
function detectScene(fileChooser) {
    var formData = new FormData();
    formData.append('image', fileChooser.files[0]);

    fetch('http://localhost:5000/v1/vision/detect/scene', {
        method: "POST",
        body: formData
    })
    .then(response => {
        if (response.ok) response.json().then(data => {
            console.log(`Scene is ${data.label}, ${data.confidence} confidence`)
        });
    });
}
</script>
</body>
</html>

You can include the CodeProject.AI Server installer (or just a link to the latest version of the installer) in your own apps and installers and voila, you have an AI enabled app.

See the API documentation for a complete rundown of functionality.

Notes on the installers

The native installers (Windows, Ubuntu and macOS) all install the server as a service. On Windows it's a Windows service, on Ubuntu it uses systemd, and on macOS it's simply a login item so will start each time you login.

For all platforms, open http://localhost:32168 to view the dashboard.

To uninstall, please take note of the instructions when you install. For reference:

  • Windows uses the standard Windows installer, so use the Control Panel / Apps and Features applet to manage the installation.
     
  • Ubuntu uses dpkg, so to uninstall simply call
    Bash
    sudo dpkg -r codeproject.ai-server
  • macOS uninstall is via the command line
    Shell
    sudo bash "/Library/CodeProject.AI Server/<version>/uninstall.sh"

Notes on CUDA and Nvidia Support

If you have a CUDA enabled Nvidia card, please then ensure you

  1. install the CUDA Drivers (We recommend CUDA 11.7 or CUDA 11.8 if running Windows)
  2. Install CUDA Toolkit 11.8.
  3. Download and run our cuDNN install script to install cuDNN 8.9.4.

Nvidia downloads and drivers are challenging! Please ensure you download a driver that is compatible with CUDA 11.7+, which generally means the CUDA driver version 516.94 or below. Version 522.x or above may not work. You may need to refer to the release notes for each driver to confirm.

Our Docker images are based on CUDA 11.7 (for legacy reasons) and 12.2. As long as you have a driver installed that can handle 11.7 or 12.2 then the docker image will interface with your drivers and work fine.

CUDA 12.2 brings a few challenges with code that uses PyTorch due to the move to Torch 2.0, so we tend to favour 11.7. Some older cards will not be compatible with CUDA 12, or even CUDA 11.7. If you are struggling with older cards that don't support CUDA 11.7 then post a comment and we'll try and help.

Since we are using CUDA 11.7+ (which has support for compute capability 3.7 and above), we can only support Nvidia CUDA cards that are equal to or better than a GK210 or Tesla K80 card. Please refer to this table of supported cards to determine if your card has compute capability 3.7 or above.

Newer cards such as the GTX 10xx, 20xx and 30xx series, RTX, MX series are fully supported.

AI is a memory intensive operation. Some cards with 2GB RAM or less may struggle in some situations. Using the dashboard, you can either disable modules you don't need, or disable GPU support entirely for one or more modules. This will free up memory and help get you back on track.

What Does It Include?

CodeProject.AI Server includes:

  • A HTTP REST API Server. The server listens for requests from other apps, passes them to the backend analysis services for processing, and then passes the results back to the caller. It runs as a simple self-contained web service on your device.
  • Backend Analysis services. The brains of the operation is in the analysis services sitting behind the front end API. All processing of data is done on the current machine. No calls to the cloud and no data leaving the device.
  • The source code, naturally.

CodeProject.AI Server can currently

  • Detect objects in images
  • Detect faces in images
  • Detect the type of scene represented in an image
  • Recognise faces that have been registered with the service
  • Perform detection on custom models

The development environment also provides modules that can

  • Remove a background from an image
  • Blur a background from an image
  • Enhance the resolution of an image
  • Pull out the most important sentences in text to generate a text summary
  • Prove sentiment analysis on text

We will be constantly expanding the feature list.

Our Goals

  • To promote AI development and inspire the AI developer community to dive in and have a go. Artificial Intelligence is a huge paradigm change in the industry and all developers owe it to themselves to experiment in and familiarize themselves with the technology. CodeProject.AI Server was built as a learning tool, a demonstration, and a library and service that can be used out of the box.
  • To make AI development easy. It's not that AI development is that hard. It's that there are so, so many options. Our architecture is designed to allow any AI implementation to find a home in our system, and for our service to be callable from any language.
  • To focus on core use-cases. We're deliberately not a solution for everyone. Instead, we're a solution for common day-to-day needs. We will be adding dozens of modules and scores of AI capabilities to our system, but our goal is always clarity and simplicity over a 100% solution.
  • To tap the expertise of the Developer Community. We're not experts but we know a developer or two out there who are. The true power of CodeProject.AI Server comes from the contributions and improvements from our AI community.

License

CodeProject.AI Server is licensed under the Server-Side Public License.

Release Notes

What's New - 2.6

  • You can now select, at install time, which modules you wish to have initially installed
  • Some modules (Coral, Yolov8) now allow you to download individual models at runtime via the dashboard.
  • A new generative AI module (Llama LLM Chatbot)
  • A standardised way to handle (in code) modules that run long processes such as generative AI
  • Debian support has been improved
  • Small UI improvements to the dashboard
  • Some simplification of the modulesettings files
  • The inclusion, in the source code, of template .NET and Python modules (both simple and long process demos)
  • Improvements to the Coral and ALPR modules (thanks to Seth and Mike)
  • Docker CUDA 12.2 image now includes cuDNN
  • Install script fixes
  • Added Object Segmentation to the YOLOv8 module

Previous Versions

Release 2.5

  • Dynamic Explorer UI: Each module now supplies its own UI for the explorer
  • Improved dashboard and explorer
    • The module listing now shows module version history if you click the version number
    • Explorer benchmark has been updated to use the custom models of the currently active object detection module
    • The Info button on the dashboard now includes a status data dump from the module. For things like object detectors, it will include a dictionary of labels / counts so you can see what's being detected. For longer running modules such as training it will include the training status. This is here to enable better UI features in the future
  • Updated module settings schema that includes module author and original project acknowledgement
  • Installer fixes
  • Improved Jetson support
  • Lots of bug fixes, but specifically there was a script issue affecting module installs, and a modulesettings.json issue affecting the YOLOv5 6.2 module, as well as the SuperResolution module.
  • Updated ALPR, OCR (PP-OCR4 support thanks to Mike Lud) and Coral Object Detection (multi-TPU support thanks to Seth Price) modules
  • Pre-installed modules in Docker can now be uninstalled / reinstalled
  • A new Sound Classifier module has been included
  • 2.5.4: A separate status update from each module that decouples the stats for a module. This just cleans things up a little on the backend
  • 2.5.4: Minor modulesettings.json schema update, which introduces the concept of model requirements.
  • 2.5.5: Support for long running processes with accompanying stable difussion module.

Release 2.4

  • Mesh support Automatically offload inference work to other servers on your network based on inference speed. Zero config, and dashboard support to enable/disable.
  • CUDA detection fixed
  • Module self-test performed on installation
  • YOLOv8 module added
  • YOLOv5 .NET module fixes for GPU, and YOLOv5 3.1 GPU support fixed
  • Python package and .NET installation issues fixed
  • Better prompts for admin-only installs
  • More logging output to help diagnose issues
  • VC Redist hash error fixed
  • General bug fixes.
  • Breaking: modulesettings.json schema changed

Release 2.3

  • A focus on improving the installation of modules at runtime. More error checks, faster re-install, better reporting, and manual fallbacks in situations where admin rights are needed
  • A revamped SDK that removes much (or all, in some cases) of the boilerplate code needed in install scripts
  • Fine grained support for different CUDA versions as well as systems such as Raspberry Pi, Orange Pi and Jetson
  • Support for CUDA 12.2
  • GPU support for PaddlePaddle (OCR and license plate readers benefit)
  • CUDA 12.2 Docker image
  • Lots of bug fixes in install scripts
  • UI tweaks
  • 2.3.4 ALPR now using GPU in Windows
  • 2.3.4 Corrections to Linux/macOS installers

Release 2.2.0

This release is still in testing and is focussed mainly on the installation process

  • An entirely new Windows installer offering more installation options and a smoother upgrade experience from here on.
  • New macOS and Ubuntu native installers, for x64 and arm64 (including Raspberry Pi)
  • A new installation SDK for making module installers far easier
  • Improved installation feedback and self-checks
  • Coral.AI support for Linux, macOS (version 11 and 12 only) and Windows
  • Updates:
    • 2.2.1 - 2.2.3 various installer fixes
    • 2.2.4 - Fix to remove chunking in order to allow HTTP1.1 access to the API (Blue Iris fix)

Release 2.1.x Beta

  • Improved Raspberry Pi support. A new, fast object detection module with support for the Coral.AI TPU, all within an Arm64 Docker image
  • All modules can now be installed / uninstalled (rather than having some modules fixed and uninstallable).
  • Installer is streamlined: Only the server is installed at installation time, and on first run, we install Object Detection (Python and .NET) and Face Processing (which can be uninstalled).
  • Reworking of the Python module SDK. Modules are new child classes, not aggregators of our module runner.
  • Reworking of the modulesettings file to make it simpler and have less replication
  • Improved logging: quantity, quality, filtering and better information
  • Addition of two modules: ObjectDetectionTFLite for Object Detection on Raspberry Pi using Coral, and Cartoonise for some fun
  • Improvements to half-precision support checks on CUDA cards
  • Modules are now versioned and our module registry will now only show modules that fit your current server version.
  • Various bug fixes
  • Shared Python runtimes now in /runtimes.
  • All modules moved from the /AnalysisLayer folder to the /modules folder
  • Tested on CUDA 12
     
  • Patch 2.1.11: YOLO training modulke now allows you to use your own dataset. YOLO 6.2 / Face Processing reverted back to Torch 1.13.
  • Patch 2.1.10: Added YOLOv5 training module and support. Improved system info. Orange Pi and NVIDIA Jetson support. Added Triggers. Renamed VersionCompatibililty to ModuleReleases. Becoz speling.
  • Patch 2.1.9: Increased and adjustable module install timeout and improved install logs. Fixes around resource contention in PyTorch, Fixes to resource usage reporting, improved Native Linux/WSL CUDA setup. Async fixes. Improvements to half-precision support.
  • Patch 2.1.8: Reduced, drastically, the load on the system while getting CPU/GPU usage updates.
  • Patch 2.1.7: Fixed a memory / resource leak that may have been causing server shutdowns
  • Patch 2.1.6 and below: Installer fixes

Please see our CUDA Notes for information on setting up, and restrictions around, Nvidia cards and CUDA support.

If you are upgrading: when the dashboard launches, it might be necessary to force-reload (Ctrl+R on Windows) the dashboard to ensure you are viewing the latest version.

Release 2.0.x Beta

  • 2.0.8: Improved analysis process management. Stamp out those errant memory hogging Python processes!
  • 2.0.7: Improved logging, both file based and in the dashboard, module installer/uninstaller bug fixes
  • 2.0.6: Corrected issues with downloadable modules installer
  • Our new Module Registry: download and install modules at runtime via the dashboard
  • Improved performance for the Object Detection modules
  • Optional YOLO 3.1 Object Detection module for older GPUs
  • Optimised RAM use
  • Support for Raspberry Pi 4+. Code and run natively directly on the Raspberry Pi using VSCode natively
  • Revamped dashboard
  • New timing reporting for each API call
  • New, simplified setup and install scripts

Release 1.6.x Beta

  • Optimised RAM use
  • Ability to enable / disable modules and GPU support via the dashboard
  • REST settings API for updating settings on the fly
  • Apple M1/M2 GPU support
  • Workarounds for some Nvidia cards
  • Async processes and logging for a performance boost
  • Breaking: The CustomObjectDetection is now part of ObjectDetectionYolo
  • Performance fix for CPU + video demo
  • Patch 1.6.7: potential memory leak addressed
  • Patch 1.6.8: image handling improvements on Linux, multi-thread ONNX on .NET

Release 1.5.6.2 Beta

  • Docker nVidia GPU support
  • Further performance improvements
  • cuDNN install script to help with nVidia driver and toolkit installation
  • Bug fixes

Release 1.5.6 Beta

  • nVidia GPU support for Windows
  • Perf improvements to Python modules
  • Work on the Python SDK to make creating modules easier
  • Dev installers now drastically simplified for those creating new modules
  • Added SuperResolution as a demo module

Release 1.5 Beta

  • Support for custom models

Release 1.3.x Beta

  • Refactored and improved setup and module addition system
  • Introduction of modulesettings.json files
  • New analysis modules

Release 1.2.x Beta

  • Support for Apple Silicon for development mode
  • Native Windows installer
  • Runs as Windows Service
  • Run in a Docker Container
  • Installs and builds using VSCode in Linux (Ubuntu), macOS and Windows, as well as Visual Studio on Windows
  • General optimisation of the download payload sizes

Previous

  • We started with a proof of concept on Windows 10+ only. Installs we via a simple BAT script, and the code is full of exciting sharp edges. A simple dashboard and playground are included. Analysis is currently Python code only.
  • Version checks are enabled to alert users to new versions.
  • A new .NET implementation scene detection using the YOLO model to ensure the codebase is platform and tech stack agnostic
  • Blue Iris integration completed.

Written By
Software Developer CodeProject Solutions
Canada Canada
The CodeProject team have been writing software, building communities, and hosting CodeProject.com for over 20 years. We are passionate about helping developers share knowledge, learn new skills, and connect. We believe everyone can code, and every contribution, no matter how small, helps.

The CodeProject team is currently focussing on CodeProject.AI Server, a stand-alone, self-hosted server that provides AI inferencing services on any platform for any language. Learn AI by jumping in the deep end with us: codeproject.com/AI.
This is a Organisation

4 members

Comments and Discussions

 
GeneralRe: Ubuntu Install - Continuously Restarts Pin
Member 1624433115-Apr-24 23:20
Member 1624433115-Apr-24 23:20 
GeneralRe: Ubuntu Install - Continuously Restarts Pin
Lorenzo-G16-Apr-24 2:12
Lorenzo-G16-Apr-24 2:12 
AnswerRe: Ubuntu Install - Continuously Restarts Pin
Chris Maunder16-Apr-24 14:51
cofounderChris Maunder16-Apr-24 14:51 
GeneralRe: Ubuntu Install - Continuously Restarts Pin
Lorenzo-G16-Apr-24 17:43
Lorenzo-G16-Apr-24 17:43 
GeneralRe: Ubuntu Install - Continuously Restarts Pin
Member 1624433120-Apr-24 3:52
Member 1624433120-Apr-24 3:52 
QuestionUnable to find or initialise the Coral TPU. Falling back to CPU-only. -- Resolved Pin
Medved7714-Apr-24 7:39
Medved7714-Apr-24 7:39 
AnswerRe: Unable to find or initialise the Coral TPU. Falling back to CPU-only. Pin
Sean Ewington15-Apr-24 6:30
staffSean Ewington15-Apr-24 6:30 
GeneralRe: Unable to find or initialise the Coral TPU. Falling back to CPU-only. Pin
Medved7715-Apr-24 7:09
Medved7715-Apr-24 7:09 
Thanks for the response, Sean.

After posting for help yesterday, I made the realisation that the TPU cannot be shared between multiple services. Frigate is already using my TPU successfully, so I suspect that's the issue.

In case this is the wrong assumption, I've pasted the info you requested below, thanks for the help!
Server version:   2.6.2
System:           Docker (e1635ace6cb8)
Operating System: Linux (Ubuntu 22.04)
CPUs:             Intel(R) Core(TM) i5-6500T CPU @ 2.50GHz (Intel)
                  1 CPU x 4 cores. 4 logical processors (x64)
System RAM:       31 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       0%
  GPU RAM Usage      0
Global Environment variables:
  CPAI_APPROOTPATH = <root>
  CPAI_PORT        = 32168


Installation logs:

<pre>18:06:28:Preparing to install module 'ObjectDetectionCoral'
18:06:28:Downloading module 'ObjectDetectionCoral'
18:06:29:Installing module 'ObjectDetectionCoral'
18:06:29:Installer script at '/app/setup.sh'
18:06:29:ObjectDetectionCoral: Setting verbosity to info
18:06:29:ObjectDetectionCoral: Hi Docker! We will disable shared python installs for downloaded modules
18:06:29:ObjectDetectionCoral: No schemas installed
18:06:29:ObjectDetectionCoral: (No schemas means: we can't detect if you're in light or dark mode)
18:06:29:ObjectDetectionCoral:              Installing CodeProject.AI Analysis Module                
18:06:29:ObjectDetectionCoral: ======================================================================
18:06:29:ObjectDetectionCoral:                    CodeProject.AI Installer                           
18:06:29:ObjectDetectionCoral: ======================================================================
18:06:29:ObjectDetectionCoral: 40.01 GiB of 50.00 GiB available on Docker
18:06:29:ObjectDetectionCoral: os, arch             = linux x86_64
18:06:29:ObjectDetectionCoral: systemName, platform = Docker, linux
18:06:29:ObjectDetectionCoral: edgeDevice           = 
18:06:29:ObjectDetectionCoral: SSH                  = false
18:06:29:ObjectDetectionCoral: setupMode            = SetupModule
18:06:29:ObjectDetectionCoral: executionEnvironment = Production
18:06:29:ObjectDetectionCoral: rootDirPath          = /app
18:06:29:ObjectDetectionCoral: appRootDirPath       = /app
18:06:29:ObjectDetectionCoral: setupScriptDirPath   = /app
18:06:29:ObjectDetectionCoral: sdkScriptsDirPath    = /app/SDK/Scripts
18:06:29:ObjectDetectionCoral: runtimesDirPath      = /app/runtimes
18:06:29:ObjectDetectionCoral: modulesDirPath       = /app/modules
18:06:29:ObjectDetectionCoral: downloadDirPath      = /app/downloads
18:06:29:ObjectDetectionCoral: Installing xz-utils...
18:06:29:ObjectDetectionCoral: WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
18:06:29:ObjectDetectionCoral: WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
18:06:30:ObjectDetectionCoral: stty: 'standard input': Inappropriate ioctl for device
18:06:30:ObjectDetectionCoral: General CodeProject.AI setup                                          
18:06:30:ObjectDetectionCoral: Setting permissions on downloads folder...done
18:06:30:ObjectDetectionCoral: Setting permissions on modules download folder...done
18:06:30:ObjectDetectionCoral: Setting permissions on models download folder...done
18:06:30:ObjectDetectionCoral: Setting permissions on runtimes folder...done
18:06:30:ObjectDetectionCoral: Setting permissions on persisted data folder...done
18:06:30:ObjectDetectionCoral: GPU support                                                           
18:06:31:ObjectDetectionCoral: CUDA (NVIDIA) Present: No
18:06:31:ObjectDetectionCoral: ROCm (AMD) Present:    No
18:06:31:ObjectDetectionCoral: MPS (Apple) Present:   No
18:06:31:ObjectDetectionCoral: Reading module settings.......done
18:06:31:ObjectDetectionCoral: Processing module ObjectDetectionCoral 2.2.0                          
18:06:31:ObjectDetectionCoral: moduleName        = Object Detection (Coral)
18:06:31:ObjectDetectionCoral: moduleVersion     = 2.2.0
18:06:31:ObjectDetectionCoral: runtime           = python3.9
18:06:31:ObjectDetectionCoral: runtimeLocation   = Local
18:06:31:ObjectDetectionCoral: installGPU        = true
18:06:31:ObjectDetectionCoral: pythonVersion     = 3.9
18:06:31:ObjectDetectionCoral: virtualEnvDirPath = /app/modules/ObjectDetectionCoral/bin/linux/python39/venv
18:06:31:ObjectDetectionCoral: venvPythonCmdPath = /app/modules/ObjectDetectionCoral/bin/linux/python39/venv/bin/python3.9
18:06:31:ObjectDetectionCoral: packagesDirPath   = /app/modules/ObjectDetectionCoral/bin/linux/python39/venv/lib/python3.9/site-packages/
18:06:31:ObjectDetectionCoral: Installing Python 3.9
18:06:31:ObjectDetectionCoral: Python 3.9 is already installed
18:06:32:ObjectDetectionCoral: W: https://packages.cloud.google.com/apt/dists/coral-edgetpu-stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
18:06:32:ObjectDetectionCoral: Ensuring PIP in base python install...Reading package lists...
18:06:32:ObjectDetectionCoral: Building dependency tree...
18:06:32:ObjectDetectionCoral: Reading state information...
18:06:33:ObjectDetectionCoral: 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 24 not upgraded.
18:06:33:ObjectDetectionCoral: Need to get 193 kB of archives.
18:06:33:ObjectDetectionCoral: After this operation, 0 B of additional disk space will be used.
18:06:33:ObjectDetectionCoral: Get:1 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy/main amd64 python3.9-distutils all 3.9.19-1+jammy1 [193 kB]
18:06:33:ObjectDetectionCoral: debconf: delaying package configuration, since apt-utils is not installed
18:06:33:ObjectDetectionCoral: Fetched 193 kB in 0s (850 kB/s)
18:06:33:ObjectDetectionCoral: (Reading database ... 
18:06:33:ObjectDetectionCoral: (Reading database ... 5%
18:06:33:ObjectDetectionCoral: (Reading database ... 10%
18:06:33:ObjectDetectionCoral: (Reading database ... 15%
18:06:33:ObjectDetectionCoral: (Reading database ... 20%
18:06:33:ObjectDetectionCoral: (Reading database ... 25%
18:06:33:ObjectDetectionCoral: (Reading database ... 30%
18:06:33:ObjectDetectionCoral: (Reading database ... 35%
18:06:33:ObjectDetectionCoral: (Reading database ... 40%
18:06:33:ObjectDetectionCoral: (Reading database ... 45%
18:06:33:ObjectDetectionCoral: (Reading database ... 50%
18:06:33:ObjectDetectionCoral: (Reading database ... 55%
18:06:33:ObjectDetectionCoral: (Reading database ... 60%
18:06:33:ObjectDetectionCoral: (Reading database ... 65%
18:06:33:ObjectDetectionCoral: (Reading database ... 70%
18:06:33:ObjectDetectionCoral: (Reading database ... 75%
18:06:33:ObjectDetectionCoral: (Reading database ... 80%
18:06:33:ObjectDetectionCoral: (Reading database ... 85%
18:06:33:ObjectDetectionCoral: (Reading database ... 90%
18:06:33:ObjectDetectionCoral: (Reading database ... 95%
18:06:33:ObjectDetectionCoral: (Reading database ... 100%
18:06:33:ObjectDetectionCoral: (Reading database ... 20873 files and directories currently installed.)
18:06:33:ObjectDetectionCoral: Preparing to unpack .../python3.9-distutils_3.9.19-1+jammy1_all.deb ...
18:06:33:ObjectDetectionCoral: Unpacking python3.9-distutils (3.9.19-1+jammy1) over (3.9.19-1+jammy1) ...
18:06:33:ObjectDetectionCoral: Setting up python3.9-distutils (3.9.19-1+jammy1) ...
18:06:35:ObjectDetectionCoral: Looking in links: /tmp/tmp5jb9pszo
18:06:35:ObjectDetectionCoral: Requirement already satisfied: setuptools in /usr/local/lib/python3.9/dist-packages (69.2.0)
18:06:35:ObjectDetectionCoral: Requirement already satisfied: pip in /usr/local/lib/python3.9/dist-packages (24.0)
18:06:35:ObjectDetectionCoral: WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
18:06:35:ObjectDetectionCoral: done
18:06:36:ObjectDetectionCoral: Upgrading PIP in base python install...Requirement already satisfied: pip in /usr/local/lib/python3.9/dist-packages (24.0)
18:06:36:ObjectDetectionCoral: WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
18:06:36:ObjectDetectionCoral: done
18:06:36:ObjectDetectionCoral: Installing Virtual Environment tools for Linux...
18:06:36:ObjectDetectionCoral: Searching for installed dependencies:
18:06:40:ObjectDetectionCoral:  -> python3-pip python3-setuptools python3.9-venv done
18:06:40:ObjectDetectionCoral: All dependencies already installed.
18:06:40:ObjectDetectionCoral: stty: 'standard input': Inappropriate ioctl for device
18:06:43:ObjectDetectionCoral: Creating Virtual Environment (Local)...done
18:06:43:ObjectDetectionCoral: Checking for Python 3.9...(Found Python 3.9.19) All good
18:06:46:ObjectDetectionCoral: Upgrading PIP in virtual environment... done
18:06:48:ObjectDetectionCoral: Installing updated setuptools in venv... done
18:06:48:ObjectDetectionCoral: Searching for installed dependencies:
18:06:49:ObjectDetectionCoral:  -> gnupg done
18:06:49:ObjectDetectionCoral: All dependencies already installed.
18:06:49:ObjectDetectionCoral: stty: 'standard input': Inappropriate ioctl for device
18:06:50:ObjectDetectionCoral: Edge TPU library found.
18:06:50:ObjectDetectionCoral: Installing Python packages for Object Detection (Coral)
18:06:50:ObjectDetectionCoral: Installing GPU-enabled libraries: If available
18:06:50:ObjectDetectionCoral: Ensuring PIP is installed and up to date...
18:06:50:ObjectDetectionCoral: Searching for installed dependencies:
18:06:51:ObjectDetectionCoral:  -> python3-pip done
18:06:51:ObjectDetectionCoral: All dependencies already installed.
18:06:51:ObjectDetectionCoral: stty: 'standard input': Inappropriate ioctl for device
18:06:51:ObjectDetectionCoral: Ensuring PIP compatibility ...
18:06:53:ObjectDetectionCoral: Looking in links: /tmp/tmp1itjtiri
18:06:53:ObjectDetectionCoral: Requirement already satisfied: setuptools in ./bin/linux/python39/venv/lib/python3.9/site-packages (69.5.1)
18:06:53:ObjectDetectionCoral: Requirement already satisfied: pip in ./bin/linux/python39/venv/lib/python3.9/site-packages (24.0)
18:06:53:ObjectDetectionCoral: Python packages will be specified by requirements.txt
18:06:57:Response timeout. Try increasing the timeout value
18:06:58:ObjectDetectionCoral:   - Installing Tensorflow Lite...Installing https://github.com/google-coral/pycoral/releases/download/v2.0.0/tflite_runtime-2.5.0.post1-cp39-cp39-linux_x86_64.whl... (not checked) done
18:07:04:ObjectDetectionCoral:   - Installing PyCoral...Checking ...Check done...Installing pycoral~=2.0... (❌ failed check) done
18:07:05:ObjectDetectionCoral:   - Installing NumPy, the fundamental package for array computing with Python...Checking ...Check done...Already installed
18:07:05:ObjectDetectionCoral:   - Installing Pillow, a Python Image Library...Checking ...Check done...Already installed
18:07:05:ObjectDetectionCoral: Installing Python packages for the CodeProject.AI Server SDK
18:07:05:ObjectDetectionCoral: Ensuring PIP is installed and up to date...
18:07:05:ObjectDetectionCoral: Searching for installed dependencies:
18:07:07:ObjectDetectionCoral:  -> python3-pip done
18:07:07:ObjectDetectionCoral: All dependencies already installed.
18:07:07:ObjectDetectionCoral: stty: 'standard input': Inappropriate ioctl for device
18:07:07:ObjectDetectionCoral: Ensuring PIP compatibility ...
18:07:08:ObjectDetectionCoral: Looking in links: /tmp/tmpf7l3fem8
18:07:08:ObjectDetectionCoral: Requirement already satisfied: setuptools in ./bin/linux/python39/venv/lib/python3.9/site-packages (69.5.1)
18:07:08:ObjectDetectionCoral: Requirement already satisfied: pip in ./bin/linux/python39/venv/lib/python3.9/site-packages (24.0)
18:07:08:ObjectDetectionCoral: Python packages will be specified by requirements.txt
18:07:09:ObjectDetectionCoral:   - Installing Pillow, a Python Image Library...Checking ...Check done...Already installed
18:07:11:ObjectDetectionCoral:   - Installing Charset normalizer...Checking ...Check done...Installing charset-normalizer... (✅ checked) done
18:07:14:ObjectDetectionCoral:   - Installing aiohttp, the Async IO HTTP library...Checking ...Check done...Installing aiohttp... (✅ checked) done
18:07:16:ObjectDetectionCoral:   - Installing aiofiles, the Async IO Files library...Checking ...Check done...Installing aiofiles... (✅ checked) done
18:07:18:ObjectDetectionCoral:   - Installing py-cpuinfo to allow us to query CPU info...Checking ...Check done...Installing py-cpuinfo... (✅ checked) done
18:07:21:ObjectDetectionCoral:   - Installing Requests, the HTTP library...Checking ...Check done...Installing requests... (✅ checked) done
18:07:21:ObjectDetectionCoral: Scanning modulesettings for downloadable models...Processing model list
18:07:21:ObjectDetectionCoral: Downloading objectdetection-mobilenet-large-edgetpu.zip to /app/downloads/modules/ObjectDetectionCoral
18:07:21:ObjectDetectionCoral: Extracting to assets in this folder
18:07:22:ObjectDetectionCoral: Downloading MobileNet Large... already exists...Expanding...done.
18:07:22:ObjectDetectionCoral: Moving contents of objectdetection-mobilenet-large-edgetpu.zip to assets...done.
18:07:22:ObjectDetectionCoral: Downloading objectdetection-mobilenet-medium-edgetpu.zip to /app/downloads/modules/ObjectDetectionCoral
18:07:22:ObjectDetectionCoral: Extracting to assets in this folder
18:07:22:ObjectDetectionCoral: Downloading MobileNet Medium... already exists...Expanding...done.
18:07:22:ObjectDetectionCoral: Moving contents of objectdetection-mobilenet-medium-edgetpu.zip to assets...done.
18:07:23:ObjectDetectionCoral: Downloading objectdetection-mobilenet-small-edgetpu.zip to /app/downloads/modules/ObjectDetectionCoral
18:07:23:ObjectDetectionCoral: Extracting to assets in this folder
18:07:23:ObjectDetectionCoral: Downloading MobileNet Small... already exists...Expanding...done.
18:07:23:ObjectDetectionCoral: Moving contents of objectdetection-mobilenet-small-edgetpu.zip to assets...done.
18:07:23:ObjectDetectionCoral: Downloading objectdetection-mobilenet-tiny-edgetpu.zip to /app/downloads/modules/ObjectDetectionCoral
18:07:23:ObjectDetectionCoral: Extracting to assets in this folder
18:07:23:ObjectDetectionCoral: Downloading MobileNet Tiny... already exists...Expanding...done.
18:07:23:ObjectDetectionCoral: Moving contents of objectdetection-mobilenet-tiny-edgetpu.zip to assets...done.
18:07:24:ObjectDetectionCoral: SELF TEST START ======================================================
18:07:51:ObjectDetectionCoral: WARNING:root:Unable to load delegate for TPU usb:0: Failed to load delegate from libedgetpu.so.1
18:07:51:ObjectDetectionCoral: WARNING:root:TPU Exception creating interpreter: usb:0
18:07:51:ObjectDetectionCoral: WARNING:root:No Coral TPUs found or able to be initialized. Using CPU.
18:07:51:ObjectDetectionCoral: WARNING:root:Unable to load delegate for TPU cpu: Failed to load delegate from libedgetpu.so.1
18:07:51:ObjectDetectionCoral: WARNING:root:Unable to create interpreter for CPU using edgeTPU library: cpu
18:08:16:ObjectDetectionCoral: Debug: MODULE_PATH:           /app/modules/ObjectDetectionCoral
18:08:16:ObjectDetectionCoral: Debug: MODELS_DIR:            /app/modules/ObjectDetectionCoral/assets
18:08:16:ObjectDetectionCoral: Debug: CPAI_CORAL_MODEL_NAME: mobilenet ssd
18:08:16:ObjectDetectionCoral: Debug: MODEL_SIZE:            small
18:08:16:ObjectDetectionCoral: Debug: CPU_MODEL_NAME:        tf2_ssd_mobilenet_v2_coco17_ptq.tflite
18:08:16:ObjectDetectionCoral: Debug: TPU_MODEL_NAME:        tf2_ssd_mobilenet_v2_coco17_ptq_edgetpu.tflite
18:08:16:ObjectDetectionCoral: Info: TPU detected
18:08:16:ObjectDetectionCoral: Info: Attempting multi-TPU initialisation
18:08:16:ObjectDetectionCoral: Info: Failed to init multi-TPU. Falling back to single TPU.
18:08:16:ObjectDetectionCoral: Info: Unable to find or initialise the Coral TPU. Falling back to CPU-only.
18:08:16:ObjectDetectionCoral: Debug: Input details: {'name': 'serving_default_input:0', 'index': 0, 'shape': array([  1, 300, 300,   3], dtype=int32), 'shape_signature': array([  1, 300, 300,   3], dtype=int32), 'dtype': , 'quantization': (0.007843137718737125, 127), 'quantization_parameters': {'scales': array([0.00784314], dtype=float32), 'zero_points': array([127], dtype=int32), 'quantized_dimension': 0}, 'sparsity_parameters': {}}
18:08:16:ObjectDetectionCoral: Debug: Output details: {'name': 'StatefulPartitionedCall:3;StatefulPartitionedCall:2;StatefulPartitionedCall:1;StatefulPartitionedCall:02', 'index': 252, 'shape': array([ 1, 20], dtype=int32), 'shape_signature': array([ 1, 20], dtype=int32), 'dtype': , 'quantization': (0.0, 0), 'quantization_parameters': {'scales': array([], dtype=float32), 'zero_points': array([], dtype=int32), 'quantized_dimension': 0}, 'sparsity_parameters': {}}
18:08:16:ObjectDetectionCoral: Info: Using CPU
18:08:16:ObjectDetectionCoral: Info: Self-test for ObjectDetectionCoral. Success: True

GeneralRe: Unable to find or initialise the Coral TPU. Falling back to CPU-only. Pin
mailseth215-Apr-24 9:48
mailseth215-Apr-24 9:48 
QuestionUbuntu 2.6.2 install on linux Pin
Steve Winn14-Apr-24 2:26
Steve Winn14-Apr-24 2:26 
AnswerRe: Ubuntu 2.6.2 install on linux Pin
Steve Winn14-Apr-24 5:35
Steve Winn14-Apr-24 5:35 
AnswerRe: Ubuntu 2.6.2 install on linux Pin
Chris Maunder15-Apr-24 6:24
cofounderChris Maunder15-Apr-24 6:24 
GeneralRe: Ubuntu 2.6.2 install on linux Pin
Steve Winn15-Apr-24 9:33
Steve Winn15-Apr-24 9:33 
GeneralRe: Ubuntu 2.6.2 install on linux Pin
Chris Maunder16-Apr-24 10:37
cofounderChris Maunder16-Apr-24 10:37 
GeneralRe: Ubuntu 2.6.2 install on linux Pin
Steve Winn15-Apr-24 9:35
Steve Winn15-Apr-24 9:35 
GeneralRe: Ubuntu 2.6.2 install on linux Pin
Chris Maunder16-Apr-24 10:38
cofounderChris Maunder16-Apr-24 10:38 
GeneralRe: Ubuntu 2.6.2 install on linux Pin
Steve Winn15-Apr-24 9:56
Steve Winn15-Apr-24 9:56 
AnswerRe: Ubuntu 2.6.2 install on linux Pin
Steve Winn16-Apr-24 3:02
Steve Winn16-Apr-24 3:02 
GeneralRe: Ubuntu 2.6.2 install on linux Pin
Chris Maunder16-Apr-24 10:38
cofounderChris Maunder16-Apr-24 10:38 
GeneralRe: Ubuntu 2.6.2 install on linux Pin
Steve Winn16-Apr-24 3:05
Steve Winn16-Apr-24 3:05 
GeneralRe: Ubuntu 2.6.2 install on linux Pin
Steve Winn16-Apr-24 3:36
Steve Winn16-Apr-24 3:36 
GeneralRe: Ubuntu 2.6.2 install on linux Pin
Chris Maunder16-Apr-24 10:43
cofounderChris Maunder16-Apr-24 10:43 
GeneralRe: Ubuntu 2.6.2 install on linux Pin
Steve Winn16-Apr-24 12:28
Steve Winn16-Apr-24 12:28 
GeneralRe: Ubuntu 2.6.2 install on linux Pin
Chris Maunder16-Apr-24 14:54
cofounderChris Maunder16-Apr-24 14:54 
GeneralRe: Ubuntu 2.6.2 install on linux Pin
Steve Winn16-Apr-24 3:51
Steve Winn16-Apr-24 3:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Flags: SolvedAnswered

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.