Skip to content

Commit b20f514

Browse files
authored
Merge branch 'master' into master
2 parents ea23c7a + c21255f commit b20f514

File tree

5 files changed

+11
-2
lines changed

5 files changed

+11
-2
lines changed

src/ImageClassifier/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ class ImageClassifier {
7070
imgToPredict = inputNumOrCallback;
7171
} else if (typeof inputNumOrCallback === 'object' && inputNumOrCallback.elt instanceof HTMLImageElement) {
7272
imgToPredict = inputNumOrCallback.elt; // Handle p5.js image
73+
} else if (!(this.video instanceof HTMLVideoElement)) {
74+
// Handle unsupported input
75+
throw new Error('No input image provided. If you want to classify a video, pass the video element in the constructor. ');
7376
}
7477

7578
if (typeof numOrCallback === 'number') {

src/PitchDetection/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
/*
77
Crepe Pitch Detection model
8-
https://github.com/marl/crepe/tree/gh-pages
9-
https://marl.github.io/crepe/crepe.js
8+
Based on https://github.com/marl/crepe/tree/gh-pages
9+
Original model and code: https://marl.github.io/crepe/crepe.js
1010
*/
1111

1212
import * as tf from '@tensorflow/tfjs';

src/Pix2pix/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
/* eslint max-len: "off" */
77
/*
88
Pix2pix
9+
The original pix2pix TensorFlow implementation was made by affinelayer: github.com/affinelayer/pix2pix-tensorflow
10+
This version is heavily based on Christopher Hesse TensorFlow.js implementation: https://github.com/affinelayer/pix2pix-tensorflow/tree/master/server
911
*/
1012

1113
import * as tf from '@tensorflow/tfjs';

src/PoseNet/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
/*
77
PoseNet
8+
The original PoseNet model was ported to TensorFlow.js by Dan Oved.
89
*/
910

1011
import EventEmitter from 'events';

src/StyleTransfer/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44
// https://opensource.org/licenses/MIT
55

66
/* eslint max-len: "off" */
7+
/* eslint no-trailing-spaces: "off" */
78
/*
89
Fast Style Transfer
10+
This implementation is heavily based on github.com/reiinakano/fast-style-transfer-deeplearnjs by Reiichiro Nakano.
11+
The original TensorFlow implementation was developed by Logan Engstrom: github.com/lengstrom/fast-style-transfer
912
*/
1013

1114
import * as tf from '@tensorflow/tfjs';

0 commit comments

Comments
 (0)