cycle-posenet-driver
Advanced tools
Comparing version 1.0.9 to 1.0.12
@@ -48,3 +48,3 @@ import { Driver } from "@cycle/run"; | ||
*/ | ||
export declare function makePoseDetectionDriver({ videoWidth, videoHeight, flipHorizontal, fps, closeGUIOnStart }?: { | ||
export declare function makePoseDetectionDriver({ videoWidth, videoHeight, flipHorizontal, fps, closeGUIOnStart, initialParameters }?: { | ||
videoWidth?: number; | ||
@@ -55,2 +55,3 @@ videoHeight?: number; | ||
closeGUIOnStart?: boolean; | ||
initialParameters?: object; | ||
}): Driver<any, any>; |
@@ -59,2 +59,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var defaultsDeep = require("lodash.defaultsdeep"); | ||
var xstream_1 = __importDefault(require("xstream")); | ||
@@ -168,3 +169,3 @@ var dom_1 = require("@cycle/dom"); | ||
function makePoseDetectionDriver(_a) { | ||
var _b = _a === void 0 ? {} : _a, _c = _b.videoWidth, videoWidth = _c === void 0 ? 640 : _c, _d = _b.videoHeight, videoHeight = _d === void 0 ? 480 : _d, _e = _b.flipHorizontal, flipHorizontal = _e === void 0 ? true : _e, _f = _b.fps, fps = _f === void 0 ? utils_1.isMobile() ? 5 : 10 : _f, _g = _b.closeGUIOnStart, closeGUIOnStart = _g === void 0 ? false : _g; | ||
var _b = _a === void 0 ? {} : _a, _c = _b.videoWidth, videoWidth = _c === void 0 ? 640 : _c, _d = _b.videoHeight, videoHeight = _d === void 0 ? 480 : _d, _e = _b.flipHorizontal, flipHorizontal = _e === void 0 ? true : _e, _f = _b.fps, fps = _f === void 0 ? utils_1.isMobile() ? 5 : 10 : _f, _g = _b.closeGUIOnStart, closeGUIOnStart = _g === void 0 ? false : _g, _h = _b.initialParameters, initialParameters = _h === void 0 ? {} : _h; | ||
var divClass = "posenet"; | ||
@@ -176,3 +177,3 @@ var videoClass = "posenet-video"; | ||
var params = null; | ||
var initialParams = { | ||
var initialParams = defaultsDeep(initialParameters, { | ||
algorithm: "single-pose", | ||
@@ -202,3 +203,3 @@ input: { | ||
stopRequested: false | ||
}; | ||
}); | ||
xstream_1.default.fromObservable(params$) | ||
@@ -205,0 +206,0 @@ .fold(function (prev, params) { |
@@ -48,3 +48,3 @@ import { Driver } from "@cycle/run"; | ||
*/ | ||
export declare function makePoseDetectionDriver({ videoWidth, videoHeight, flipHorizontal, fps, closeGUIOnStart }?: { | ||
export declare function makePoseDetectionDriver({ videoWidth, videoHeight, flipHorizontal, fps, closeGUIOnStart, initialParameters }?: { | ||
videoWidth?: number; | ||
@@ -55,2 +55,3 @@ videoHeight?: number; | ||
closeGUIOnStart?: boolean; | ||
initialParameters?: object; | ||
}): Driver<any, any>; |
@@ -47,2 +47,3 @@ var __assign = (this && this.__assign) || function () { | ||
}; | ||
var defaultsDeep = require("lodash.defaultsdeep"); | ||
import xs from "xstream"; | ||
@@ -156,3 +157,3 @@ import { div, canvas, video } from "@cycle/dom"; | ||
export function makePoseDetectionDriver(_a) { | ||
var _b = _a === void 0 ? {} : _a, _c = _b.videoWidth, videoWidth = _c === void 0 ? 640 : _c, _d = _b.videoHeight, videoHeight = _d === void 0 ? 480 : _d, _e = _b.flipHorizontal, flipHorizontal = _e === void 0 ? true : _e, _f = _b.fps, fps = _f === void 0 ? isMobile() ? 5 : 10 : _f, _g = _b.closeGUIOnStart, closeGUIOnStart = _g === void 0 ? false : _g; | ||
var _b = _a === void 0 ? {} : _a, _c = _b.videoWidth, videoWidth = _c === void 0 ? 640 : _c, _d = _b.videoHeight, videoHeight = _d === void 0 ? 480 : _d, _e = _b.flipHorizontal, flipHorizontal = _e === void 0 ? true : _e, _f = _b.fps, fps = _f === void 0 ? isMobile() ? 5 : 10 : _f, _g = _b.closeGUIOnStart, closeGUIOnStart = _g === void 0 ? false : _g, _h = _b.initialParameters, initialParameters = _h === void 0 ? {} : _h; | ||
var divClass = "posenet"; | ||
@@ -164,3 +165,3 @@ var videoClass = "posenet-video"; | ||
var params = null; | ||
var initialParams = { | ||
var initialParams = defaultsDeep(initialParameters, { | ||
algorithm: "single-pose", | ||
@@ -190,3 +191,3 @@ input: { | ||
stopRequested: false | ||
}; | ||
}); | ||
xs.fromObservable(params$) | ||
@@ -193,0 +194,0 @@ .fold(function (prev, params) { |
{ | ||
"name": "cycle-posenet-driver", | ||
"version": "1.0.9", | ||
"version": "1.0.12", | ||
"description": "A Cycle.js driver for pose detection using TensorFlow.js-powered PoseNet", | ||
@@ -18,2 +18,3 @@ "author": "Michael Jae-Yoon Chung", | ||
"dat.gui": "0.7.2", | ||
"lodash.defaultsdeep": "^4.6.1", | ||
"stats.js": "0.17.0", | ||
@@ -20,0 +21,0 @@ "xstream": "11.10.0" |
@@ -0,1 +1,2 @@ | ||
const defaultsDeep = require("lodash.defaultsdeep"); | ||
import xs from "xstream"; | ||
@@ -158,3 +159,4 @@ import { div, canvas, video } from "@cycle/dom"; | ||
fps = isMobile() ? 5 : 10, | ||
closeGUIOnStart = false | ||
closeGUIOnStart = false, | ||
initialParameters = {} | ||
}: { | ||
@@ -166,2 +168,3 @@ videoWidth?: number; | ||
closeGUIOnStart?: boolean; | ||
initialParameters?: object; | ||
} = {}): Driver<any, any> { | ||
@@ -174,3 +177,4 @@ const divClass = `posenet`; | ||
let params: PoseNetParameters = null; | ||
const initialParams = { | ||
const initialParams = defaultsDeep(initialParameters, { | ||
algorithm: "single-pose", | ||
@@ -200,3 +204,3 @@ input: { | ||
stopRequested: false | ||
}; | ||
}); | ||
xs.fromObservable(params$) | ||
@@ -203,0 +207,0 @@ .fold((prev: PoseNetParameters, params: PoseNetParameters) => { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
103809
1667
8
+ Addedlodash.defaultsdeep@^4.6.1
+ Addedlodash.defaultsdeep@4.6.1(transitive)