Skip to content

Commit

Permalink
#158 Listing drop in support for CodeProject.AI-Server.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Done committed Nov 10, 2022
1 parent 8f92c0e commit fe40916
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ For example, if you are using the docker image/version v1.1.0, then ensure you h
* [Development](#development-config)
* [Support AIs](#supported-ais)
* [Deepstack](#deepstack)
* [CodeProject.AI-Server](#codeProject-ai-server)
* [Notifications](#notifications)
* [Pushbullet](#pushbullet)
* [Webhook](#webhook)
Expand Down Expand Up @@ -163,6 +164,7 @@ Configs which should be changed for debugging (change at own risk):

## Supported AIs
* [Deepstack](https://deepstack.cc/)
* [CodeProject.AI-Server](https://github.com/codeproject/CodeProject.AI-Server/)

In order to specify the AI to use, set the Type property against the AI section in the config:

Expand All @@ -184,6 +186,16 @@ The Deepstack API is a free to use AI that can identify objects, faces and more.
```
* Url [required]: The URL of the AI to POST the image to

### CodeProject.AI-Server

```json
"AI": {
"Type": "CodeProjectAIServer",
"Url": "http://10.0.0.10:83"
}
```
* Url [required]: The URL of the AI to POST the image to

## Notifications

Multiple notifications can be triggered when an object is detected. Each notification will have a defined "Type" and the sections below explain how each notification should be defined. An optional feature allows notifications to be triggered only by specified cameras.
Expand Down
6 changes: 5 additions & 1 deletion SynoAI/AIs/AIType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ public enum AIType
/// <summary>
/// DeepStackAI.
/// </summary>
DeepStack
DeepStack,
/// <summary>
/// CodeProjectAIServer.
/// </summary>
CodeProjectAIServer
}
}
1 change: 1 addition & 0 deletions SynoAI/Services/AIService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ private AI GetAI()
switch (Config.AI)
{
case AIType.DeepStack:
case AIType.CodeProjectAIServer: // Works the same as DeepStack
return new DeepStackAI();
default:
throw new NotImplementedException(Config.AI.ToString());
Expand Down

0 comments on commit fe40916

Please sign in to comment.