CodeProject.AI-Server

codeproject长期未更新

自包含的本地 AI 服务,开发者可将其嵌入并随应用分发,为软件快速添加目标检测、生成式 AI 等能力,无需自建模型部署流程。

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.

v2.9.5发布于 2024-12-11 14:31 UTC985star235fork同步于 2026-11-07 07:30 UTC

怎么上手

由 README 提炼,执行前请确认
下载最新版安装包并启动桌面快捷方式打开 Dashboard:https://codeproject.github.io/codeproject.ai/latest.html
源码调试:克隆仓库后运行 /devops/install 下的 setup 脚本
硬件要求按 README 说明

支持 CPU 运行;Windows 上支持 DirectML,Windows 和 Linux 支持 CUDA,另支持 Apple Silicon GPU、RockChip NPU 和 Coral.AI TPU,具体取决于模块。README 未给出显存要求。

支持 Apple Silicon需要 CUDA
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

自托管 AI 微服务器,让任意语言的应用通过 HTTP 接口获得本地 AI 能力

自包含的本地 AI 服务,开发者可将其嵌入并随应用分发,为软件快速添加目标检测、生成式 AI 等能力,无需自建模型部署流程。

核心能力

  • 提供 HTTP REST API,任意语言可调用
  • 后端分析服务全部在本机处理,数据不出设备
  • 内置目标检测、人脸识别、场景识别等模块
  • 支持生成式 AI:文本生成、文生图、多模态
  • 可随应用一起分发安装包,快速集成

容易踩的坑

源码调试需先装 Visual Studio Code 或 Visual Studio 2019+;部分模块需额外运行 clone_repos 脚本拉取;GPU 加速能力取决于具体模块是否支持对应后端。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README
这个条目还没有人工点评。如果它对你很有用,欢迎到 提交仓库 页写下你的使用经验。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    最近发版

    5 个版本v2.9.5
    1. v2.9.5最新正式版2024-12-11 · 2024-12-11 14:31 UTC

      Improvements to installers

    2. v2.9.42024-12-04 · 2024-12-04 03:09 UTC
      查看更新说明
      • Updated to .NET 9
      • Support for Ubuntu 24.10
      • Improved CUDA 12 support
      • Improvements to CUDA support in Windows and Linux
      • Docker updates
      • Further Windows arm64 fixes
      • Further macOS arm64 fixes
      • General dev environment setup fixes
      • Fixes for Windows installer when wget is missing
    3. v2.8.12024-09-05 · 2024-09-05 19:03 UTC
      查看更新说明

      Headline

      • Update to .NET 8
      • Addition of Node.js, Go and Rust demos
      • A \potentially breaking update for module writers due to a rename of some script variables and the reorg of setup script files.
      • Support for new Multi-modal Phi-3 LLM

      Other

      • Improvements to setup
      • Corrections for detecting CUDA in Python scripts
      • Support for JSON requests to server
    4. v2.6.52024-05-27 · 2024-05-27 20:40 UTC
      查看更新说明

      What's Changed

      New Contributors

      Full Changelog: https://github.com/codeproject/CodeProject.AI-Server/compare/v2.6.2...v2.6.5

    5. v2.6.22024-04-05 · 2024-04-05 11:40 UTC
      查看更新说明
      • 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

    README 原文

    未翻译

    made-for-VSCode made-with-dotnet made-with-python GitHub license Open Source Love svg2

    CodeProject.AI Server

    Download the latest version

    A standalone, self-hosted, fast, free and Open Source Artificial Intelligence microserver for any platform, any language. It can be installed locally, required no off-device or out of network data transfer, and is easy to use.

    Object detection

    Supported Platforms

    WindowsmacOSmacOS arm64Ubuntu / DebianRaspberry Pi arm64DockerVisual Studio2019+Visual StudioCode

    Why

    1. 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 as a focus for articles and exploration to make it fun and painless to learn AI programming.

    2. We got sick of fighting versions and libraries and models and being blocked by tiny annoying things every step of the way. So we put put this together so we could save you the frustration. We'll take care of the housekeeping, you focus on the code.

    3. We also got sick of needing to sign up to potentially expensive services for AI functionality. This is something we need, and by sharing maybe you can use it too, and hopefully add your own modules and improvements along the way.

    Cut to the chase: how do I play with it?

    1: Running and playing with the features

    1. Download the latest version, install, and launch the shortcut to the server's dashboard on your desktop.
    2. On the dashboard, top and centre, is a link to the CodeProject.AI Explorer. Open that and play!

    2: Running and debugging the code

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

    How do I use it in my application?

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

    <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:32168/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 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.

    What does it include?

    CodeProject.AI includes

    1. 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.
    2. 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.
    3. The Source Code, naturally.

    What can it do?

    It can run any AI module your imagination and patience can create. Current modules include

    • Generative AI: LLMs for text generation, Text-to-image, and multi-modal LLMs (eg "tell me what's in this picture")
    • Object Detection in images, including using custom models
    • Faces detection and recognition images
    • Scene recognition represented in an image
    • 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
    • Sound Classification

    We will be constantly expanding the feature list.

    Our Goals

    1. To promote AI development and inspire the AI developer community to dive in and have a go. AI is here, it's in demand, and it's a huge paradigm change in the industry. Whether you like AI or not, developers owe it to themselves to experiment in and familiarise themselves with the technology. This is CodeProject.AI: a demonstration, an explorer, a learning tool, and a library and service that can be used out of the box.
    2. 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.
    3. 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.
    4. 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 comes from the contributions and improvements from our AI community.
    Supported Development Environments

    This current release works best with Visual Studio Code on Windows 10+. Ubuntu 22.04+, Debian and macOS (both Intel and Apple Silicon). Visual Studio 2019+ support is included for Windows 10+.

    The current release provides support for CPU on each platform, DirectML on Windows, CUDA on Windows and Linux, support for Apple Silicon GPUs, RockChip NPUs and Coral.AI TPUs. Support depends on the module itself.

    How to Guides

    I'll add this to the docs:

    Latest Version changes: 2.9

    • Updated to .NET 9
    • Support for Ubuntu 24.10
    • Improved CUDA 12 support
    • Improvements to CUDA support in Windows and Linux
    • Further Windows arm64 fixes
    • Further macOS arm64 fixes
    • General dev environment setup fixes
    • Fixes for Windows installer when wget is missing