mirror of
https://github.com/koush/scrypted.git
synced 2026-06-28 12:10:25 +01:00
objectdetector: publish new architecture
This commit is contained in:
@@ -6,4 +6,5 @@ fs
|
||||
src
|
||||
.vscode
|
||||
dist/*.js
|
||||
dist/*.txt
|
||||
HAP-NodeJS
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
.DS_Store
|
||||
out/
|
||||
node_modules/
|
||||
dist/*.map
|
||||
face-api.js
|
||||
*.map
|
||||
fs
|
||||
src
|
||||
.vscode
|
||||
dist/*.js
|
||||
|
||||
4
plugins/objectdetector/package-lock.json
generated
4
plugins/objectdetector/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/objectdetector",
|
||||
"version": "0.0.13",
|
||||
"version": "0.0.18",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/objectdetector",
|
||||
"version": "0.0.13",
|
||||
"version": "0.0.18",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@scrypted/common": "file:../../common",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@scrypted/objectdetector",
|
||||
"version": "0.0.13",
|
||||
"description": "Object Detection extension for VideoCameras. Installed alongside a CPU or TPU plugin.",
|
||||
"version": "0.0.18",
|
||||
"description": "Object Detector for VideoCameras. Installed alongside a detection service.",
|
||||
"author": "Scrypted",
|
||||
"license": "Apache-2.0",
|
||||
"scripts": {
|
||||
@@ -30,7 +30,7 @@
|
||||
"person"
|
||||
],
|
||||
"scrypted": {
|
||||
"name": "Object Detection Plugin",
|
||||
"name": "Object Detector Plugin",
|
||||
"singleInstance": true,
|
||||
"type": "API",
|
||||
"interfaces": [
|
||||
|
||||
@@ -2,6 +2,7 @@ import { MixinProvider, ScryptedDeviceType, ScryptedInterface, MediaObject, Vide
|
||||
import sdk from '@scrypted/sdk';
|
||||
import { SettingsMixinDeviceBase } from "../../../common/src/settings-mixin";
|
||||
import { randomBytes } from 'crypto';
|
||||
import { alertRecommendedPlugins } from '@scrypted/common/src/alert-recommended-plugins';
|
||||
import { DenoisedDetectionEntry, denoiseDetections } from './denoise';
|
||||
|
||||
export interface DetectionInput {
|
||||
@@ -309,6 +310,11 @@ class ObjectDetectionPlugin extends ScryptedDeviceBase implements MixinProvider
|
||||
if (!device.mixins?.includes(this.id))
|
||||
continue;
|
||||
device.probe();
|
||||
|
||||
alertRecommendedPlugins({
|
||||
'@scrypted/tensorflow': 'TensorFlow Face Recognition Plugin',
|
||||
'@scrypted/tensorflow-lite': 'TensorFlow Lite Object Detection Plugin',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,4 +6,6 @@ fs
|
||||
src
|
||||
.vscode
|
||||
dist/*.js
|
||||
dist/*.txt
|
||||
__pycache__
|
||||
all_models
|
||||
|
||||
4
plugins/tensorflow-lite/package-lock.json
generated
4
plugins/tensorflow-lite/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/coral",
|
||||
"version": "0.0.15",
|
||||
"version": "0.0.21",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/coral",
|
||||
"version": "0.0.15",
|
||||
"version": "0.0.21",
|
||||
"devDependencies": {
|
||||
"@scrypted/sdk": "file:../../sdk"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
{
|
||||
"name": "@scrypted/tensowflow-lite",
|
||||
"description": "Object Detection for VideoCameras.",
|
||||
"name": "@scrypted/tensorflow-lite",
|
||||
"description": "Object Detection Service.",
|
||||
"keywords": [
|
||||
"scrypted",
|
||||
"plugin",
|
||||
"tensorflow",
|
||||
"coral",
|
||||
"tpu",
|
||||
"edge",
|
||||
"motion",
|
||||
"object",
|
||||
"detect",
|
||||
"detection",
|
||||
"people",
|
||||
"person"
|
||||
],
|
||||
"scripts": {
|
||||
"prepublishOnly": "NODE_ENV=production scrypted-webpack",
|
||||
"prescrypted-vscode-launch": "scrypted-webpack",
|
||||
@@ -15,7 +29,7 @@
|
||||
"scrypted": {
|
||||
"name": "TensorFlow Lite + Coral TPU Object Detection Plugin",
|
||||
"runtime": "python",
|
||||
"type": "Light",
|
||||
"type": "API",
|
||||
"interfaces": [
|
||||
"ObjectDetection"
|
||||
]
|
||||
@@ -23,5 +37,5 @@
|
||||
"devDependencies": {
|
||||
"@scrypted/sdk": "file:../../sdk"
|
||||
},
|
||||
"version": "0.0.15"
|
||||
"version": "0.0.21"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
.DS_Store
|
||||
out/
|
||||
node_modules/
|
||||
dist/*.map
|
||||
*.map
|
||||
fs
|
||||
src
|
||||
.vscode
|
||||
dist/*.js
|
||||
dist/*.txt
|
||||
face-api.js
|
||||
|
||||
4
plugins/tensorflow/package-lock.json
generated
4
plugins/tensorflow/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/tensorflow",
|
||||
"version": "0.0.13",
|
||||
"version": "0.0.16",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/tensorflow",
|
||||
"version": "0.0.13",
|
||||
"version": "0.0.16",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@koush/face-api.js": "^0.22.3",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@scrypted/tensorflow",
|
||||
"version": "0.0.13",
|
||||
"description": "Face Recognition for VideoCameras.",
|
||||
"version": "0.0.16",
|
||||
"description": "Face Recognition Service.",
|
||||
"author": "Scrypted",
|
||||
"license": "Apache-2.0",
|
||||
"scripts": {
|
||||
@@ -20,8 +20,6 @@
|
||||
"plugin",
|
||||
"tensorflow",
|
||||
"motion",
|
||||
"object",
|
||||
"detect",
|
||||
"detection",
|
||||
"face",
|
||||
"recognition",
|
||||
|
||||
@@ -13,6 +13,7 @@ import { sleep } from './sleep';
|
||||
import { makeBoundingBoxFromFace } from './util';
|
||||
import { FFMpegRebroadcastSession, startRebroadcastSession } from '../../../common/src/ffmpeg-rebroadcast';
|
||||
import { createRawVideoParser, PIXEL_FORMAT_RGB24, StreamChunk } from '@scrypted/common/src/stream-parser';
|
||||
import { alertRecommendedPlugins } from '@scrypted/common/src/alert-recommended-plugins';
|
||||
import { once } from 'events';
|
||||
import { decodeJpeg, encodeJpeg } from './jpeg';
|
||||
import { EventEmitter } from 'stream';
|
||||
@@ -166,6 +167,10 @@ class TensorFlow extends ScryptedDeviceBase implements ObjectDetection, DevicePr
|
||||
}
|
||||
|
||||
this.reloadFaceMatcher();
|
||||
|
||||
alertRecommendedPlugins({
|
||||
'@scrypted/objectdetector': 'Object Detection Plugin',
|
||||
});
|
||||
}
|
||||
|
||||
async addUnknowns(unknowns: { descriptor: Float32Array, nativeId: string, detection: FaceDetection }[], input: Tensor3D, buffer: Buffer) {
|
||||
@@ -363,7 +368,6 @@ class TensorFlow extends ScryptedDeviceBase implements ObjectDetection, DevicePr
|
||||
if (!detectionSession.running)
|
||||
return;
|
||||
this.onDeviceEvent(ScryptedInterface.ObjectDetection, detections);
|
||||
this.console.log(detections);
|
||||
|
||||
await sleep(1000);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user