learning_model 1.0.40 → 1.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -138,8 +138,7 @@ class LearningMobilenet {
|
|
|
138
138
|
return __awaiter(this, void 0, void 0, function* () {
|
|
139
139
|
try {
|
|
140
140
|
if (this.mobilenetModule !== null) {
|
|
141
|
-
const
|
|
142
|
-
const cap = (0, tf_1.isTensor)(data) ? data : (0, tf_1.capture)(croppedImage, false);
|
|
141
|
+
const cap = (0, tf_1.isTensor)(data) ? data : (0, tf_1.capture)(data, false);
|
|
143
142
|
const predict = this.mobilenetModule.predict(cap);
|
|
144
143
|
const activation = predict.dataSync();
|
|
145
144
|
const classIndex = this.registerClassNumber(label);
|
|
@@ -150,8 +150,7 @@ class LearningMobilenet implements LearningInterface {
|
|
|
150
150
|
public async addData(label: string, data: any): Promise<void> {
|
|
151
151
|
try {
|
|
152
152
|
if (this.mobilenetModule !== null) {
|
|
153
|
-
const
|
|
154
|
-
const cap = isTensor(data) ? data : capture(croppedImage, false);
|
|
153
|
+
const cap = isTensor(data) ? data : capture(data, false);
|
|
155
154
|
const predict = this.mobilenetModule.predict(cap) as tf.Tensor;
|
|
156
155
|
const activation = predict.dataSync() as Float32Array;
|
|
157
156
|
const classIndex = this.registerClassNumber(label);
|