├── index.js ├── knn └── mobilenet_v1_1.0_224 │ ├── group1-shard1of1 │ ├── group10-shard1of1 │ ├── group11-shard1of1 │ ├── group12-shard1of1 │ ├── group13-shard1of1 │ ├── group14-shard1of1 │ ├── group15-shard1of1 │ ├── group16-shard1of1 │ ├── group17-shard1of1 │ ├── group18-shard1of1 │ ├── group19-shard1of1 │ ├── group2-shard1of1 │ ├── group20-shard1of1 │ ├── group21-shard1of1 │ ├── group22-shard1of1 │ ├── group23-shard1of1 │ ├── group24-shard1of1 │ ├── group25-shard1of1 │ ├── group26-shard1of1 │ ├── group27-shard1of1 │ ├── group28-shard1of1 │ ├── group29-shard1of1 │ ├── group3-shard1of1 │ ├── group30-shard1of1 │ ├── group31-shard1of1 │ ├── group32-shard1of1 │ ├── group33-shard1of1 │ ├── group34-shard1of1 │ ├── group35-shard1of1 │ ├── group36-shard1of1 │ ├── group37-shard1of1 │ ├── group38-shard1of1 │ ├── group39-shard1of1 │ ├── group4-shard1of1 │ ├── group40-shard1of1 │ ├── group41-shard1of1 │ ├── group42-shard1of1 │ ├── group43-shard1of1 │ ├── group44-shard1of1 │ ├── group45-shard1of1 │ ├── group46-shard1of1 │ ├── group47-shard1of1 │ ├── group48-shard1of1 │ ├── group49-shard1of1 │ ├── group5-shard1of1 │ ├── group50-shard1of1 │ ├── group51-shard1of1 │ ├── group52-shard1of1 │ ├── group53-shard1of1 │ ├── group54-shard1of1 │ ├── group55-shard1of1 │ ├── group6-shard1of1 │ ├── group7-shard1of1 │ ├── group8-shard1of1 │ ├── group9-shard1of1 │ └── model.json ├── mobilenet.js └── readme.md /index.js: -------------------------------------------------------------------------------- 1 | require('babel-polyfill'); 2 | const Runtime = require('../../engine/runtime'); 3 | 4 | const ArgumentType = require('../../extension-support/argument-type'); 5 | const BlockType = require('../../extension-support/block-type'); 6 | const Clone = require('../../util/clone'); 7 | const Cast = require('../../util/cast'); 8 | const Video = require('../../io/video'); 9 | const formatMessage = require('format-message'); 10 | import * as tf from '@tensorflow/tfjs'; 11 | import * as mobilenetModule from './mobilenet.js'; 12 | import * as knnClassifier from '@tensorflow-models/knn-classifier'; 13 | 14 | /** 15 | * Sensor attribute video sensor block should report. 16 | * @readonly 17 | * @enum {string} 18 | */ 19 | const SensingAttribute = { 20 | /** The amount of motion. */ 21 | MOTION: 'motion', 22 | 23 | /** The direction of the motion. */ 24 | DIRECTION: 'direction' 25 | }; 26 | 27 | /** 28 | * Subject video sensor block should report for. 29 | * @readonly 30 | * @enum {string} 31 | */ 32 | const SensingSubject = { 33 | /** The sensor traits of the whole stage. */ 34 | STAGE: 'Stage', 35 | 36 | /** The senosr traits of the area overlapped by this sprite. */ 37 | SPRITE: 'this sprite' 38 | }; 39 | 40 | /** 41 | * States the video sensing activity can be set to. 42 | * @readonly 43 | * @enum {string} 44 | */ 45 | const VideoState = { 46 | /** Video turned off. */ 47 | OFF: 'off', 48 | 49 | /** Video turned on with default y axis mirroring. */ 50 | ON: 'on', 51 | 52 | /** Video turned on without default y axis mirroring. */ 53 | ON_FLIPPED: 'on-flipped' 54 | }; 55 | 56 | let typeArr = [ 57 | '1', 58 | '2', 59 | '3', 60 | '4', 61 | '5', 62 | '6', 63 | '7', 64 | '8', 65 | '9', 66 | '10' 67 | ] 68 | 69 | /** 70 | * Class for the motion-related blocks in Scratch 3.0 71 | * @param {Runtime} runtime - the runtime instantiating this block package. 72 | * @constructor 73 | */ 74 | class Scratch3Knn { 75 | constructor(runtime) { 76 | this.knn = null 77 | this.trainTypes = typeArr.map(item => { 78 | return 'label' + item 79 | }) 80 | this.knnInit() 81 | /** 82 | * The runtime instantiating this block package. 83 | * @type {Runtime} 84 | */ 85 | this.runtime = runtime; 86 | 87 | /** 88 | * The last millisecond epoch timestamp that the video stream was 89 | * analyzed. 90 | * @type {number} 91 | */ 92 | this._lastUpdate = null; 93 | this.KNN_INTERVAL = 1000 94 | if (this.runtime.ioDevices) { 95 | // Clear target motion state values when the project starts. 96 | this.runtime.on(Runtime.PROJECT_RUN_START, this.reset.bind(this)); 97 | 98 | // Kick off looping the analysis logic. 99 | // this._loop(); 100 | 101 | // Configure the video device with values from a globally stored 102 | // location. 103 | this.setVideoTransparency({ 104 | TRANSPARENCY: 10 105 | }); 106 | this.videoToggle({ 107 | VIDEO_STATE: this.globalVideoState 108 | }); 109 | } 110 | 111 | setInterval(async () => { 112 | if (this.globalVideoState === VideoState.ON) { 113 | await this.gotResult() 114 | console.log('knn result:', this.trainResult) 115 | } 116 | }, this.KNN_INTERVAL) 117 | } 118 | 119 | /** 120 | * After analyzing a frame the amount of milliseconds until another frame 121 | * is analyzed. 122 | * @type {number} 123 | */ 124 | static get INTERVAL() { 125 | return 33; 126 | } 127 | 128 | /** 129 | * Dimensions the video stream is analyzed at after its rendered to the 130 | * sample canvas. 131 | * @type {Array.} 132 | */ 133 | static get DIMENSIONS() { 134 | return [480, 360]; 135 | } 136 | 137 | /** 138 | * The key to load & store a target's motion-related state. 139 | * @type {string} 140 | */ 141 | static get STATE_KEY() { 142 | return 'Scratch.videoSensing'; 143 | } 144 | 145 | /** 146 | * The default motion-related state, to be used when a target has no existing motion state. 147 | * @type {MotionState} 148 | */ 149 | static get DEFAULT_MOTION_STATE() { 150 | return { 151 | motionFrameNumber: 0, 152 | motionAmount: 0, 153 | motionDirection: 0 154 | }; 155 | } 156 | 157 | /** 158 | * The transparency setting of the video preview stored in a value 159 | * accessible by any object connected to the virtual machine. 160 | * @type {number} 161 | */ 162 | get globalVideoTransparency() { 163 | const stage = this.runtime.getTargetForStage(); 164 | if (stage) { 165 | return stage.videoTransparency; 166 | } 167 | return 10; 168 | } 169 | 170 | set globalVideoTransparency(transparency) { 171 | const stage = this.runtime.getTargetForStage(); 172 | if (stage) { 173 | stage.videoTransparency = transparency; 174 | } 175 | return transparency; 176 | } 177 | 178 | /** 179 | * The video state of the video preview stored in a value accessible by any 180 | * object connected to the virtual machine. 181 | * @type {number} 182 | */ 183 | get globalVideoState() { 184 | const stage = this.runtime.getTargetForStage(); 185 | if (stage) { 186 | return stage.videoState; 187 | } 188 | return VideoState.ON; 189 | } 190 | 191 | set globalVideoState(state) { 192 | const stage = this.runtime.getTargetForStage(); 193 | if (stage) { 194 | stage.videoState = state; 195 | } 196 | return state; 197 | } 198 | 199 | /** 200 | * Reset the extension's data motion detection data. This will clear out 201 | * for example old frames, so the first analyzed frame will not be compared 202 | * against a frame from before reset was called. 203 | */ 204 | reset() { 205 | const targets = this.runtime.targets; 206 | for (let i = 0; i < targets.length; i++) { 207 | const state = targets[i].getCustomState(Scratch3Knn .STATE_KEY); 208 | if (state) { 209 | state.motionAmount = 0; 210 | state.motionDirection = 0; 211 | } 212 | } 213 | } 214 | 215 | /** 216 | * Occasionally step a loop to sample the video, stamp it to the preview 217 | * skin, and add a TypedArray copy of the canvas's pixel data. 218 | * @private 219 | */ 220 | _loop() { 221 | setTimeout(this._loop.bind(this), Math.max(this.runtime.currentStepTime, Scratch3Knn .INTERVAL)); 222 | 223 | // Add frame to detector 224 | const time = Date.now(); 225 | if (this._lastUpdate === null) { 226 | this._lastUpdate = time; 227 | } 228 | const offset = time - this._lastUpdate; 229 | if (offset > Scratch3Knn .INTERVAL) { 230 | const frame = this.runtime.ioDevices.video.getFrame({ 231 | format: Video.FORMAT_IMAGE_DATA, 232 | dimensions: Scratch3Knn .DIMENSIONS 233 | }); 234 | if (frame) { 235 | this._lastUpdate = time; 236 | } 237 | } 238 | } 239 | 240 | /** 241 | * Create data for a menu in scratch-blocks format, consisting of an array 242 | * of objects with text and value properties. The text is a translated 243 | * string, and the value is one-indexed. 244 | * @param {object[]} info - An array of info objects each having a name 245 | * property. 246 | * @return {array} - An array of objects with text and value properties. 247 | * @private 248 | */ 249 | _buildMenu(info) { 250 | return info.map((entry, index) => { 251 | const obj = {}; 252 | obj.text = entry.name; 253 | obj.value = entry.value || String(index + 1); 254 | return obj; 255 | }); 256 | } 257 | 258 | /** 259 | * @param {Target} target - collect motion state for this target. 260 | * @returns {MotionState} the mutable motion state associated with that 261 | * target. This will be created if necessary. 262 | * @private 263 | */ 264 | _getMotionState(target) { 265 | let motionState = target.getCustomState(Scratch3Knn .STATE_KEY); 266 | if (!motionState) { 267 | motionState = Clone.simple(Scratch3Knn .DEFAULT_MOTION_STATE); 268 | target.setCustomState(Scratch3Knn .STATE_KEY, motionState); 269 | } 270 | return motionState; 271 | } 272 | 273 | static get SensingAttribute() { 274 | return SensingAttribute; 275 | } 276 | 277 | /** 278 | * An array of choices of whether a reporter should return the frame's 279 | * motion amount or direction. 280 | * @type {object[]} an array of objects 281 | * @param {string} name - the translatable name to display in sensor 282 | * attribute menu 283 | * @param {string} value - the serializable value of the attribute 284 | */ 285 | get ATTRIBUTE_INFO() { 286 | return [ 287 | { 288 | name: 'motion', 289 | value: SensingAttribute.MOTION 290 | }, 291 | { 292 | name: 'direction', 293 | value: SensingAttribute.DIRECTION 294 | } 295 | ]; 296 | } 297 | 298 | static get SensingSubject() { 299 | return SensingSubject; 300 | } 301 | 302 | /** 303 | * An array of info about the subject choices. 304 | * @type {object[]} an array of objects 305 | * @param {string} name - the translatable name to display in the subject menu 306 | * @param {string} value - the serializable value of the subject 307 | */ 308 | get SUBJECT_INFO() { 309 | return [ 310 | { 311 | name: 'stage', 312 | value: SensingSubject.STAGE 313 | }, 314 | { 315 | name: 'sprite', 316 | value: SensingSubject.SPRITE 317 | } 318 | ]; 319 | } 320 | 321 | /** 322 | * States the video sensing activity can be set to. 323 | * @readonly 324 | * @enum {string} 325 | */ 326 | static get VideoState() { 327 | return VideoState; 328 | } 329 | 330 | /** 331 | * An array of info on video state options for the "turn video [STATE]" block. 332 | * @type {object[]} an array of objects 333 | * @param {string} name - the translatable name to display in the video state menu 334 | * @param {string} value - the serializable value stored in the block 335 | */ 336 | get VIDEO_STATE_INFO () { 337 | return [ 338 | { 339 | name: formatMessage({ 340 | id: 'videoSensing.off', 341 | default: 'off', 342 | description: 'Option for the "turn video [STATE]" block' 343 | }), 344 | value: VideoState.OFF 345 | }, 346 | { 347 | name: formatMessage({ 348 | id: 'videoSensing.on', 349 | default: 'on', 350 | description: 'Option for the "turn video [STATE]" block' 351 | }), 352 | value: VideoState.ON 353 | }, 354 | { 355 | name: formatMessage({ 356 | id: 'videoSensing.onFlipped', 357 | default: 'on flipped', 358 | description: 'Option for the "turn video [STATE]" block that causes the video to be flipped' + 359 | ' horizontally (reversed as in a mirror)' 360 | }), 361 | value: VideoState.ON_FLIPPED 362 | } 363 | ]; 364 | } 365 | 366 | 367 | /** 368 | * @returns {object} metadata for this extension and its blocks. 369 | */ 370 | getInfo() { 371 | return { 372 | id: 'cxknn', 373 | name: 'KNN Classifier', 374 | blocks: [ 375 | { 376 | opcode: 'videoToggle', 377 | text: formatMessage({ 378 | id: 'videoSensing.videoToggle', 379 | default: 'turn video [VIDEO_STATE]', 380 | description: 'Controls display of the video preview layer' 381 | }), 382 | arguments: { 383 | VIDEO_STATE: { 384 | type: ArgumentType.NUMBER, 385 | menu: 'VIDEO_STATE', 386 | defaultValue: VideoState.ON 387 | } 388 | } 389 | }, 390 | { 391 | opcode: 'setVideoTransparency', 392 | text: formatMessage({ 393 | id: 'videoSensing.setVideoTransparency', 394 | default: 'set video transparency to [TRANSPARENCY]', 395 | description: 'Controls transparency of the video preview layer' 396 | }), 397 | arguments: { 398 | TRANSPARENCY: { 399 | type: ArgumentType.NUMBER, 400 | defaultValue: 10 401 | } 402 | } 403 | }, 404 | { 405 | opcode: 'isloaded', 406 | blockType: BlockType.BOOLEAN, 407 | text: formatMessage({ 408 | id: 'knn.isloaded', 409 | default: 'is loaded', 410 | description: 'knn is loaded' 411 | }) 412 | }, 413 | { 414 | opcode: 'trainA', 415 | blockType: BlockType.COMMAND, 416 | text: formatMessage({ 417 | id: 'knn.trainA', 418 | default: 'Train 1 [STRING]', 419 | description: 'Train A' 420 | }), 421 | arguments: { 422 | STRING: { 423 | type: ArgumentType.STRING, 424 | defaultValue: "label1" 425 | } 426 | } 427 | }, 428 | { 429 | opcode: 'trainB', 430 | blockType: BlockType.COMMAND, 431 | text: formatMessage({ 432 | id: 'knn.trainB', 433 | default: 'Train 2 [STRING]', 434 | description: 'Train B' 435 | }), 436 | arguments: { 437 | STRING: { 438 | type: ArgumentType.STRING, 439 | defaultValue: "label2" 440 | } 441 | } 442 | }, 443 | { 444 | opcode: 'trainC', 445 | blockType: BlockType.COMMAND, 446 | text: formatMessage({ 447 | id: 'knn.trainC', 448 | default: 'Train 3 [STRING]', 449 | description: 'Train C' 450 | }), 451 | arguments: { 452 | STRING: { 453 | type: ArgumentType.STRING, 454 | defaultValue: "label3" 455 | } 456 | } 457 | }, 458 | { 459 | opcode: 'train', 460 | blockType: BlockType.COMMAND, 461 | text: formatMessage({ 462 | id: 'knn.train', 463 | default: 'Train label [type] [STRING]', 464 | description: 'Train' 465 | }), 466 | arguments: { 467 | STRING: { 468 | type: ArgumentType.STRING, 469 | defaultValue: "label4" 470 | }, 471 | type: { 472 | type: ArgumentType.STRING, 473 | menu: 'typemenu', 474 | defaultValue: "4" 475 | } 476 | } 477 | }, 478 | { 479 | opcode: 'addTrainType', 480 | blockType: BlockType.COMMAND, 481 | text: formatMessage({ 482 | id: 'knn.addTrainType', 483 | default: 'add train type', 484 | description: 'add train type' 485 | }) 486 | }, 487 | { 488 | opcode: 'resetTrain', 489 | blockType: BlockType.COMMAND, 490 | text: formatMessage({ 491 | id: 'knn.reset', 492 | default: 'Reset [STRING]', 493 | description: 'reset' 494 | }), 495 | arguments: { 496 | STRING: { 497 | type: ArgumentType.STRING, 498 | defaultValue: "label1" 499 | } 500 | } 501 | }, 502 | { 503 | opcode: 'Sample1', 504 | blockType: BlockType.REPORTER, 505 | text: formatMessage({ 506 | id: 'knn.sample', 507 | default: 'Sample', 508 | description: 'samples' 509 | }) + '1', 510 | arguments: { 511 | STRING: { 512 | type: ArgumentType.STRING, 513 | defaultValue: "label1" 514 | } 515 | } 516 | }, 517 | { 518 | opcode: 'Sample2', 519 | blockType: BlockType.REPORTER, 520 | text: formatMessage({ 521 | id: 'knn.sample', 522 | default: 'Sample', 523 | description: 'samples' 524 | }) + '2', 525 | arguments: { 526 | STRING: { 527 | type: ArgumentType.STRING, 528 | defaultValue: "label1" 529 | } 530 | } 531 | }, 532 | { 533 | opcode: 'Sample3', 534 | blockType: BlockType.REPORTER, 535 | text: formatMessage({ 536 | id: 'knn.sample', 537 | default: 'Sample', 538 | description: 'samples' 539 | }) + '3', 540 | arguments: { 541 | STRING: { 542 | type: ArgumentType.STRING, 543 | defaultValue: "label1" 544 | } 545 | } 546 | }, 547 | { 548 | opcode: 'Samples', 549 | blockType: BlockType.REPORTER, 550 | text: formatMessage({ 551 | id: 'knn.samples', 552 | default: 'Samples [STRING]', 553 | description: 'samples' 554 | }), 555 | arguments: { 556 | STRING: { 557 | type: ArgumentType.STRING, 558 | defaultValue: "label1" 559 | } 560 | } 561 | }, 562 | { 563 | opcode: 'getResult', 564 | blockType: BlockType.REPORTER, 565 | text: formatMessage({ 566 | id: 'knn.getResult', 567 | default: 'Result', 568 | description: 'getResult' 569 | }), 570 | arguments: { 571 | 572 | } 573 | }, 574 | { 575 | opcode: 'getConfidence', 576 | blockType: BlockType.REPORTER, 577 | text: formatMessage({ 578 | id: 'knn.getConfidence', 579 | default: 'getConfidence [STRING]', 580 | description: 'getConfidence' 581 | }), 582 | arguments: { 583 | STRING: { 584 | type: ArgumentType.STRING, 585 | defaultValue: "label1" 586 | } 587 | } 588 | }, 589 | { 590 | opcode: 'whenGetResult', 591 | blockType: BlockType.HAT, 592 | text: formatMessage({ 593 | id: 'knn.whenGetResult', 594 | default: 'when get [STRING]', 595 | description: 'whenGetResult' 596 | }), 597 | arguments: { 598 | STRING: { 599 | type: ArgumentType.STRING, 600 | defaultValue: "label1" 601 | } 602 | } 603 | } 604 | ], 605 | menus: { 606 | ATTRIBUTE: { 607 | acceptReporters: true, 608 | items: this._buildMenu(this.ATTRIBUTE_INFO) 609 | }, 610 | SUBJECT: { 611 | acceptReporters: true, 612 | items: this._buildMenu(this.SUBJECT_INFO) 613 | }, 614 | VIDEO_STATE: { 615 | acceptReporters: true, 616 | items:this._buildMenu(this.VIDEO_STATE_INFO), 617 | }, 618 | typemenu: { 619 | acceptReporters: true, 620 | items: '_typeArr' 621 | } 622 | } 623 | }; 624 | } 625 | 626 | _typeArr () { 627 | return typeArr.slice(3).map(item => item.toString()) 628 | } 629 | /** 630 | * A scratch command block handle that configures the video state from 631 | * passed arguments. 632 | * @param {object} args - the block arguments 633 | * @param {VideoState} args.VIDEO_STATE - the video state to set the device to 634 | */ 635 | videoToggle(args) { 636 | const state = args.VIDEO_STATE; 637 | this.globalVideoState = state; 638 | if (state === VideoState.OFF) { 639 | this.runtime.ioDevices.video.disableVideo(); 640 | } else { 641 | this.runtime.ioDevices.video.enableVideo(); 642 | // Mirror if state is ON. Do not mirror if state is ON_FLIPPED. 643 | this.runtime.ioDevices.video.mirror = state === VideoState.ON; 644 | } 645 | } 646 | 647 | /** 648 | * A scratch command block handle that configures the video preview's 649 | * transparency from passed arguments. 650 | * @param {object} args - the block arguments 651 | * @param {number} args.TRANSPARENCY - the transparency to set the video 652 | * preview to 653 | */ 654 | setVideoTransparency(args) { 655 | const transparency = Cast.toNumber(args.TRANSPARENCY); 656 | this.globalVideoTransparency = transparency; 657 | this.runtime.ioDevices.video.setPreviewGhost(transparency); 658 | } 659 | 660 | clearClass(classIndex) { 661 | this.classifier.clearClass(classIndex); 662 | } 663 | 664 | updateExampleCounts(args, util) { 665 | let counts = this.classifier.getClassExampleCount(); 666 | this.runtime.emit('SAY', util.target, 'say', this.trainTypes.map((item, index) => { 667 | return item + '样本数:' + (counts[index] || 0) + '\n' 668 | }).join('\n')); 669 | } 670 | 671 | isloaded() { 672 | return Boolean(this.mobilenet) 673 | } 674 | train(args, util) { 675 | if (this.globalVideoState === VideoState.OFF) { 676 | console.log('请先打开摄像头') 677 | return 678 | } 679 | let index = typeArr.findIndex(item => item === args.type) 680 | let img = document.createElement('img') 681 | img.src = this.runtime.ioDevices.video.getFrame({ 682 | format: Video.FORMAT_CANVAS, 683 | dimensions: Scratch3Knn.DIMENSIONS 684 | }).toDataURL("image/png") 685 | img.width = 480 686 | img.height = 360 687 | img.onload = () => { 688 | const img0 = tf.fromPixels(img); 689 | const logits0 = this.mobilenet.infer(img0, 'conv_preds'); 690 | this.classifier.addExample(logits0, index); 691 | this.trainTypes[index] = args.STRING 692 | } 693 | } 694 | 695 | addTrainType() { 696 | typeArr.push((typeArr.length + 1).toString()) 697 | this.trainTypes.push('label' + (this.trainTypes.length + 1).toString()) 698 | } 699 | 700 | trainA(args, util) { 701 | if (this.globalVideoState === VideoState.OFF) { 702 | alert('请先打开摄像头') 703 | return 704 | } 705 | let img = document.createElement('img') 706 | img.src = this.runtime.ioDevices.video.getFrame({ 707 | format: Video.FORMAT_CANVAS, 708 | dimensions: Scratch3Knn.DIMENSIONS 709 | }).toDataURL("image/png") 710 | img.width = 480 711 | img.height = 360 712 | img.onload = () => { 713 | const img0 = tf.fromPixels(img); 714 | const logits0 = this.mobilenet.infer(img0, 'conv_preds'); 715 | this.classifier.addExample(logits0, 0); 716 | this.trainTypes[0] = args.STRING 717 | } 718 | } 719 | 720 | trainB(args, util) { 721 | if (this.globalVideoState === VideoState.OFF) { 722 | alert('请先打开摄像头') 723 | return 724 | } 725 | let img = document.createElement('img') 726 | img.src = this.runtime.ioDevices.video.getFrame({ 727 | format: Video.FORMAT_CANVAS, 728 | dimensions: Scratch3Knn.DIMENSIONS 729 | }).toDataURL("image/png") 730 | img.width = 480 731 | img.height = 360 732 | img.onload = () => { 733 | const img0 = tf.fromPixels(img); 734 | const logits0 = this.mobilenet.infer(img0, 'conv_preds'); 735 | this.classifier.addExample(logits0, 1); 736 | this.trainTypes[1] = args.STRING 737 | } 738 | } 739 | 740 | trainC(args, util) { 741 | if (this.globalVideoState === VideoState.OFF) { 742 | alert('请先打开摄像头') 743 | return 744 | } 745 | let img = document.createElement('img') 746 | img.src = this.runtime.ioDevices.video.getFrame({ 747 | format: Video.FORMAT_CANVAS, 748 | dimensions: Scratch3Knn.DIMENSIONS 749 | }).toDataURL("image/png") 750 | img.width = 480 751 | img.height = 360 752 | img.onload = () => { 753 | const img0 = tf.fromPixels(img); 754 | const logits0 = this.mobilenet.infer(img0, 'conv_preds'); 755 | this.classifier.addExample(logits0, 2); 756 | this.trainTypes[2] = args.STRING 757 | } 758 | } 759 | 760 | trainD(args, util) { 761 | if (this.globalVideoState === VideoState.OFF) { 762 | alert('请先打开摄像头') 763 | return 764 | } 765 | let img = document.createElement('img') 766 | img.src = this.runtime.ioDevices.video.getFrame({ 767 | format: Video.FORMAT_CANVAS, 768 | dimensions: Scratch3Knn.DIMENSIONS 769 | }).toDataURL("image/png") 770 | img.width = 480 771 | img.height = 360 772 | img.onload = () => { 773 | const img0 = tf.fromPixels(img); 774 | const logits0 = this.mobilenet.infer(img0, 'conv_preds'); 775 | this.classifier.addExample(logits0, 3); 776 | this.trainTypes[3] = args.STRING 777 | this.updateExampleCounts(args, util); 778 | } 779 | } 780 | 781 | trainE(args, util) { 782 | if (this.globalVideoState === VideoState.OFF) { 783 | alert('请先打开摄像头') 784 | return 785 | } 786 | let img = document.createElement('img') 787 | img.src = this.runtime.ioDevices.video.getFrame({ 788 | format: Video.FORMAT_CANVAS, 789 | dimensions: Scratch3Knn.DIMENSIONS 790 | }).toDataURL("image/png") 791 | img.width = 480 792 | img.height = 360 793 | img.onload = () => { 794 | const img0 = tf.fromPixels(img); 795 | const logits0 = this.mobilenet.infer(img0, 'conv_preds'); 796 | this.classifier.addExample(logits0, 4); 797 | this.trainTypes[4] = args.STRING 798 | this.updateExampleCounts(args, util); 799 | } 800 | } 801 | 802 | trainF(args, util) { 803 | if (this.globalVideoState === VideoState.OFF) { 804 | alert('请先打开摄像头') 805 | return 806 | } 807 | let img = document.createElement('img') 808 | img.src = this.runtime.ioDevices.video.getFrame({ 809 | format: Video.FORMAT_CANVAS, 810 | dimensions: Scratch3Knn.DIMENSIONS 811 | }).toDataURL("image/png") 812 | img.width = 480 813 | img.height = 360 814 | img.onload = () => { 815 | const img0 = tf.fromPixels(img); 816 | const logits0 = this.mobilenet.infer(img0, 'conv_preds'); 817 | this.classifier.addExample(logits0, 5); 818 | this.trainTypes[5] = args.STRING 819 | this.updateExampleCounts(args, util); 820 | } 821 | } 822 | Samples(args, util) { 823 | let counts = this.classifier.getClassExampleCount(); 824 | let index = this.trainTypes.indexOf(args.STRING) 825 | return counts[index] || 0 826 | } 827 | Sample1(args, util) { 828 | let counts = this.classifier.getClassExampleCount(); 829 | let index = 0 830 | return counts[index] || 0 831 | } 832 | Sample2(args, util) { 833 | let counts = this.classifier.getClassExampleCount(); 834 | let index = 1 835 | return counts[index] || 0 836 | } 837 | Sample3(args, util) { 838 | let counts = this.classifier.getClassExampleCount(); 839 | let index = 2 840 | return counts[index] || 0 841 | } 842 | resetTrain(args, util) { 843 | let counts = this.classifier.getClassExampleCount(); 844 | let index = this.trainTypes.indexOf(args.STRING) 845 | if (!counts[index]) { 846 | alert('该类别无训练数据') 847 | return 848 | } 849 | if (index < 0) { 850 | alert('未找到对应类别') 851 | return 852 | } 853 | this.clearClass(index); 854 | // this.updateExampleCounts(args, util); 855 | } 856 | 857 | getResult(args, util) { 858 | return this.trainResult 859 | } 860 | getConfidence(args, util) { 861 | let index = this.trainTypes.indexOf(args.STRING) 862 | if (index === -1) { 863 | return 0 864 | } 865 | return (this.trainConfidences && this.trainConfidences[index]) || 0 866 | } 867 | gotResult(args, util) { 868 | return new Promise((resolve, reject) => { 869 | let img = document.createElement('img') 870 | let frame = this.runtime.ioDevices.video.getFrame({ 871 | format: Video.FORMAT_CANVAS, 872 | dimensions: Scratch3Knn.DIMENSIONS 873 | }) 874 | if (!Object.keys(this.classifier.getClassExampleCount()).length) { 875 | resolve() 876 | return 877 | } 878 | if (frame) { 879 | img.src = frame.toDataURL("image/png") 880 | } else { 881 | resolve() 882 | return 883 | } 884 | img.width = 480 885 | img.height = 360 886 | img.onload = async () => { 887 | const x = tf.fromPixels(img); 888 | const xlogits = this.mobilenet.infer(x, 'conv_preds'); 889 | console.log('Predictions:'); 890 | let res = await this.classifier.predictClass(xlogits); 891 | console.log(this.classifier.getClassExampleCount(), res) 892 | this.trainResult = this.trainTypes[res.classIndex] || 0 893 | this.trainConfidences = res.confidences 894 | resolve(this.trainResult) 895 | } 896 | }) 897 | } 898 | 899 | whenGetResult(args, util) { 900 | if (this.trainResult === undefined) { 901 | return false 902 | } 903 | setTimeout(() => { 904 | this.trainResult = undefined 905 | }, 100) 906 | return args.STRING === this.trainResult 907 | } 908 | 909 | async knnInit () { 910 | this.classifier = knnClassifier.create(); 911 | this.mobilenet = await mobilenetModule.load(); 912 | } 913 | } 914 | 915 | module.exports = Scratch3Knn; 916 | -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group1-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group1-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group10-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group10-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group11-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group11-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group12-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group12-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group13-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group13-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group14-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group14-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group15-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group15-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group16-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group16-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group17-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group17-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group18-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group18-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group19-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group19-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group2-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group2-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group20-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group20-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group21-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group21-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group22-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group22-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group23-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group23-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group24-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group24-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group25-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group25-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group26-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group26-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group27-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group27-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group28-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group28-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group29-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group29-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group3-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group3-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group30-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group30-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group31-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group31-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group32-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group32-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group33-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group33-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group34-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group34-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group35-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group35-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group36-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group36-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group37-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group37-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group38-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group38-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group39-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group39-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group4-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group4-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group40-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group40-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group41-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group41-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group42-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group42-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group43-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group43-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group44-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group44-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group45-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group45-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group46-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group46-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group47-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group47-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group48-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group48-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group49-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group49-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group5-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group5-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group50-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group50-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group51-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group51-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group52-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group52-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group53-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group53-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group54-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group54-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group55-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group55-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group6-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group6-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group7-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group7-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group8-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group8-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/group9-shard1of1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeLabClub/scratch3_knn/745dd4b221ea8b48d9df330f17e50d42ab37ee38/knn/mobilenet_v1_1.0_224/group9-shard1of1 -------------------------------------------------------------------------------- /knn/mobilenet_v1_1.0_224/model.json: -------------------------------------------------------------------------------- 1 | {"modelTopology": {"keras_version": "2.1.4", "model_config": {"class_name": "Model", "config": {"layers": [{"class_name": "InputLayer", "inbound_nodes": [], "config": {"dtype": "float32", "batch_input_shape": [null, 224, 224, 3], "name": "input_1", "sparse": false}, "name": "input_1"}, {"class_name": "Conv2D", "inbound_nodes": [[["input_1", 0, 0, {}]]], "config": {"kernel_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "name": "conv1", "kernel_constraint": null, "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "padding": "same", "strides": [2, 2], "dilation_rate": [1, 1], "kernel_regularizer": null, "filters": 32, "bias_initializer": {"class_name": "Zeros", "config": {}}, "use_bias": false, "activity_regularizer": null, "kernel_size": [3, 3]}, "name": "conv1"}, {"class_name": "BatchNormalization", "inbound_nodes": [[["conv1", 0, 0, {}]]], "config": {"gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "name": "conv1_bn", "epsilon": 0.001, "trainable": true, "center": true, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_initializer": {"class_name": "Zeros", "config": {}}, "scale": true, "gamma_regularizer": null, "gamma_constraint": null, "beta_constraint": null, "beta_regularizer": null, "momentum": 0.99, "axis": -1}, "name": "conv1_bn"}, {"class_name": "Activation", "inbound_nodes": [[["conv1_bn", 0, 0, {}]]], "config": {"activation": "relu6", "trainable": true, "name": "conv1_relu"}, "name": "conv1_relu"}, {"class_name": "DepthwiseConv2D", "inbound_nodes": [[["conv1_relu", 0, 0, {}]]], "config": {"padding": "same", "depth_multiplier": 1, "name": "conv_dw_1", "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "depthwise_constraint": null, "strides": [1, 1], "dilation_rate": [1, 1], "depthwise_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "depthwise_regularizer": null, "use_bias": false, "activity_regularizer": null, "kernel_size": [3, 3]}, "name": "conv_dw_1"}, {"class_name": "BatchNormalization", "inbound_nodes": [[["conv_dw_1", 0, 0, {}]]], "config": {"gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "name": "conv_dw_1_bn", "epsilon": 0.001, "trainable": true, "center": true, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_initializer": {"class_name": "Zeros", "config": {}}, "scale": true, "gamma_regularizer": null, "gamma_constraint": null, "beta_constraint": null, "beta_regularizer": null, "momentum": 0.99, "axis": -1}, "name": "conv_dw_1_bn"}, {"class_name": "Activation", "inbound_nodes": [[["conv_dw_1_bn", 0, 0, {}]]], "config": {"activation": "relu6", "trainable": true, "name": "conv_dw_1_relu"}, "name": "conv_dw_1_relu"}, {"class_name": "Conv2D", "inbound_nodes": [[["conv_dw_1_relu", 0, 0, {}]]], "config": {"kernel_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "name": "conv_pw_1", "kernel_constraint": null, "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "padding": "same", "strides": [1, 1], "dilation_rate": [1, 1], "kernel_regularizer": null, "filters": 64, "bias_initializer": {"class_name": "Zeros", "config": {}}, "use_bias": false, "activity_regularizer": null, "kernel_size": [1, 1]}, "name": "conv_pw_1"}, {"class_name": "BatchNormalization", "inbound_nodes": [[["conv_pw_1", 0, 0, {}]]], "config": {"gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "name": "conv_pw_1_bn", "epsilon": 0.001, "trainable": true, "center": true, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_initializer": {"class_name": "Zeros", "config": {}}, "scale": true, "gamma_regularizer": null, "gamma_constraint": null, "beta_constraint": null, "beta_regularizer": null, "momentum": 0.99, "axis": -1}, "name": "conv_pw_1_bn"}, {"class_name": "Activation", "inbound_nodes": [[["conv_pw_1_bn", 0, 0, {}]]], "config": {"activation": "relu6", "trainable": true, "name": "conv_pw_1_relu"}, "name": "conv_pw_1_relu"}, {"class_name": "DepthwiseConv2D", "inbound_nodes": [[["conv_pw_1_relu", 0, 0, {}]]], "config": {"padding": "same", "depth_multiplier": 1, "name": "conv_dw_2", "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "depthwise_constraint": null, "strides": [2, 2], "dilation_rate": [1, 1], "depthwise_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "depthwise_regularizer": null, "use_bias": false, "activity_regularizer": null, "kernel_size": [3, 3]}, "name": "conv_dw_2"}, {"class_name": "BatchNormalization", "inbound_nodes": [[["conv_dw_2", 0, 0, {}]]], "config": {"gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "name": "conv_dw_2_bn", "epsilon": 0.001, "trainable": true, "center": true, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_initializer": {"class_name": "Zeros", "config": {}}, "scale": true, "gamma_regularizer": null, "gamma_constraint": null, "beta_constraint": null, "beta_regularizer": null, "momentum": 0.99, "axis": -1}, "name": "conv_dw_2_bn"}, {"class_name": "Activation", "inbound_nodes": [[["conv_dw_2_bn", 0, 0, {}]]], "config": {"activation": "relu6", "trainable": true, "name": "conv_dw_2_relu"}, "name": "conv_dw_2_relu"}, {"class_name": "Conv2D", "inbound_nodes": [[["conv_dw_2_relu", 0, 0, {}]]], "config": {"kernel_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "name": "conv_pw_2", "kernel_constraint": null, "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "padding": "same", "strides": [1, 1], "dilation_rate": [1, 1], "kernel_regularizer": null, "filters": 128, "bias_initializer": {"class_name": "Zeros", "config": {}}, "use_bias": false, "activity_regularizer": null, "kernel_size": [1, 1]}, "name": "conv_pw_2"}, {"class_name": "BatchNormalization", "inbound_nodes": [[["conv_pw_2", 0, 0, {}]]], "config": {"gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "name": "conv_pw_2_bn", "epsilon": 0.001, "trainable": true, "center": true, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_initializer": {"class_name": "Zeros", "config": {}}, "scale": true, "gamma_regularizer": null, "gamma_constraint": null, "beta_constraint": null, "beta_regularizer": null, "momentum": 0.99, "axis": -1}, "name": "conv_pw_2_bn"}, {"class_name": "Activation", "inbound_nodes": [[["conv_pw_2_bn", 0, 0, {}]]], "config": {"activation": "relu6", "trainable": true, "name": "conv_pw_2_relu"}, "name": "conv_pw_2_relu"}, {"class_name": "DepthwiseConv2D", "inbound_nodes": [[["conv_pw_2_relu", 0, 0, {}]]], "config": {"padding": "same", "depth_multiplier": 1, "name": "conv_dw_3", "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "depthwise_constraint": null, "strides": [1, 1], "dilation_rate": [1, 1], "depthwise_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "depthwise_regularizer": null, "use_bias": false, "activity_regularizer": null, "kernel_size": [3, 3]}, "name": "conv_dw_3"}, {"class_name": "BatchNormalization", "inbound_nodes": [[["conv_dw_3", 0, 0, {}]]], "config": {"gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "name": "conv_dw_3_bn", "epsilon": 0.001, "trainable": true, "center": true, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_initializer": {"class_name": "Zeros", "config": {}}, "scale": true, "gamma_regularizer": null, "gamma_constraint": null, "beta_constraint": null, "beta_regularizer": null, "momentum": 0.99, "axis": -1}, "name": "conv_dw_3_bn"}, {"class_name": "Activation", "inbound_nodes": [[["conv_dw_3_bn", 0, 0, {}]]], "config": {"activation": "relu6", "trainable": true, "name": "conv_dw_3_relu"}, "name": "conv_dw_3_relu"}, {"class_name": "Conv2D", "inbound_nodes": [[["conv_dw_3_relu", 0, 0, {}]]], "config": {"kernel_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "name": "conv_pw_3", "kernel_constraint": null, "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "padding": "same", "strides": [1, 1], "dilation_rate": [1, 1], "kernel_regularizer": null, "filters": 128, "bias_initializer": {"class_name": "Zeros", "config": {}}, "use_bias": false, "activity_regularizer": null, "kernel_size": [1, 1]}, "name": "conv_pw_3"}, {"class_name": "BatchNormalization", "inbound_nodes": [[["conv_pw_3", 0, 0, {}]]], "config": {"gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "name": "conv_pw_3_bn", "epsilon": 0.001, "trainable": true, "center": true, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_initializer": {"class_name": "Zeros", "config": {}}, "scale": true, "gamma_regularizer": null, "gamma_constraint": null, "beta_constraint": null, "beta_regularizer": null, "momentum": 0.99, "axis": -1}, "name": "conv_pw_3_bn"}, {"class_name": "Activation", "inbound_nodes": [[["conv_pw_3_bn", 0, 0, {}]]], "config": {"activation": "relu6", "trainable": true, "name": "conv_pw_3_relu"}, "name": "conv_pw_3_relu"}, {"class_name": "DepthwiseConv2D", "inbound_nodes": [[["conv_pw_3_relu", 0, 0, {}]]], "config": {"padding": "same", "depth_multiplier": 1, "name": "conv_dw_4", "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "depthwise_constraint": null, "strides": [2, 2], "dilation_rate": [1, 1], "depthwise_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "depthwise_regularizer": null, "use_bias": false, "activity_regularizer": null, "kernel_size": [3, 3]}, "name": "conv_dw_4"}, {"class_name": "BatchNormalization", "inbound_nodes": [[["conv_dw_4", 0, 0, {}]]], "config": {"gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "name": "conv_dw_4_bn", "epsilon": 0.001, "trainable": true, "center": true, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_initializer": {"class_name": "Zeros", "config": {}}, "scale": true, "gamma_regularizer": null, "gamma_constraint": null, "beta_constraint": null, "beta_regularizer": null, "momentum": 0.99, "axis": -1}, "name": "conv_dw_4_bn"}, {"class_name": "Activation", "inbound_nodes": [[["conv_dw_4_bn", 0, 0, {}]]], "config": {"activation": "relu6", "trainable": true, "name": "conv_dw_4_relu"}, "name": "conv_dw_4_relu"}, {"class_name": "Conv2D", "inbound_nodes": [[["conv_dw_4_relu", 0, 0, {}]]], "config": {"kernel_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "name": "conv_pw_4", "kernel_constraint": null, "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "padding": "same", "strides": [1, 1], "dilation_rate": [1, 1], "kernel_regularizer": null, "filters": 256, "bias_initializer": {"class_name": "Zeros", "config": {}}, "use_bias": false, "activity_regularizer": null, "kernel_size": [1, 1]}, "name": "conv_pw_4"}, {"class_name": "BatchNormalization", "inbound_nodes": [[["conv_pw_4", 0, 0, {}]]], "config": {"gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "name": "conv_pw_4_bn", "epsilon": 0.001, "trainable": true, "center": true, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_initializer": {"class_name": "Zeros", "config": {}}, "scale": true, "gamma_regularizer": null, "gamma_constraint": null, "beta_constraint": null, "beta_regularizer": null, "momentum": 0.99, "axis": -1}, "name": "conv_pw_4_bn"}, {"class_name": "Activation", "inbound_nodes": [[["conv_pw_4_bn", 0, 0, {}]]], "config": {"activation": "relu6", "trainable": true, "name": "conv_pw_4_relu"}, "name": "conv_pw_4_relu"}, {"class_name": "DepthwiseConv2D", "inbound_nodes": [[["conv_pw_4_relu", 0, 0, {}]]], "config": {"padding": "same", "depth_multiplier": 1, "name": "conv_dw_5", "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "depthwise_constraint": null, "strides": [1, 1], "dilation_rate": [1, 1], "depthwise_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "depthwise_regularizer": null, "use_bias": false, "activity_regularizer": null, "kernel_size": [3, 3]}, "name": "conv_dw_5"}, {"class_name": "BatchNormalization", "inbound_nodes": [[["conv_dw_5", 0, 0, {}]]], "config": {"gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "name": "conv_dw_5_bn", "epsilon": 0.001, "trainable": true, "center": true, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_initializer": {"class_name": "Zeros", "config": {}}, "scale": true, "gamma_regularizer": null, "gamma_constraint": null, "beta_constraint": null, "beta_regularizer": null, "momentum": 0.99, "axis": -1}, "name": "conv_dw_5_bn"}, {"class_name": "Activation", "inbound_nodes": [[["conv_dw_5_bn", 0, 0, {}]]], "config": {"activation": "relu6", "trainable": true, "name": "conv_dw_5_relu"}, "name": "conv_dw_5_relu"}, {"class_name": "Conv2D", "inbound_nodes": [[["conv_dw_5_relu", 0, 0, {}]]], "config": {"kernel_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "name": "conv_pw_5", "kernel_constraint": null, "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "padding": "same", "strides": [1, 1], "dilation_rate": [1, 1], "kernel_regularizer": null, "filters": 256, "bias_initializer": {"class_name": "Zeros", "config": {}}, "use_bias": false, "activity_regularizer": null, "kernel_size": [1, 1]}, "name": "conv_pw_5"}, {"class_name": "BatchNormalization", "inbound_nodes": [[["conv_pw_5", 0, 0, {}]]], "config": {"gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "name": "conv_pw_5_bn", "epsilon": 0.001, "trainable": true, "center": true, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_initializer": {"class_name": "Zeros", "config": {}}, "scale": true, "gamma_regularizer": null, "gamma_constraint": null, "beta_constraint": null, "beta_regularizer": null, "momentum": 0.99, "axis": -1}, "name": "conv_pw_5_bn"}, {"class_name": "Activation", "inbound_nodes": [[["conv_pw_5_bn", 0, 0, {}]]], "config": {"activation": "relu6", "trainable": true, "name": "conv_pw_5_relu"}, "name": "conv_pw_5_relu"}, {"class_name": "DepthwiseConv2D", "inbound_nodes": [[["conv_pw_5_relu", 0, 0, {}]]], "config": {"padding": "same", "depth_multiplier": 1, "name": "conv_dw_6", "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "depthwise_constraint": null, "strides": [2, 2], "dilation_rate": [1, 1], "depthwise_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "depthwise_regularizer": null, "use_bias": false, "activity_regularizer": null, "kernel_size": [3, 3]}, "name": "conv_dw_6"}, {"class_name": "BatchNormalization", "inbound_nodes": [[["conv_dw_6", 0, 0, {}]]], "config": {"gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "name": "conv_dw_6_bn", "epsilon": 0.001, "trainable": true, "center": true, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_initializer": {"class_name": "Zeros", "config": {}}, "scale": true, "gamma_regularizer": null, "gamma_constraint": null, "beta_constraint": null, "beta_regularizer": null, "momentum": 0.99, "axis": -1}, "name": "conv_dw_6_bn"}, {"class_name": "Activation", "inbound_nodes": [[["conv_dw_6_bn", 0, 0, {}]]], "config": {"activation": "relu6", "trainable": true, "name": "conv_dw_6_relu"}, "name": "conv_dw_6_relu"}, {"class_name": "Conv2D", "inbound_nodes": [[["conv_dw_6_relu", 0, 0, {}]]], "config": {"kernel_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "name": "conv_pw_6", "kernel_constraint": null, "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "padding": "same", "strides": [1, 1], "dilation_rate": [1, 1], "kernel_regularizer": null, "filters": 512, "bias_initializer": {"class_name": "Zeros", "config": {}}, "use_bias": false, "activity_regularizer": null, "kernel_size": [1, 1]}, "name": "conv_pw_6"}, {"class_name": "BatchNormalization", "inbound_nodes": [[["conv_pw_6", 0, 0, {}]]], "config": {"gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "name": "conv_pw_6_bn", "epsilon": 0.001, "trainable": true, "center": true, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_initializer": {"class_name": "Zeros", "config": {}}, "scale": true, "gamma_regularizer": null, "gamma_constraint": null, "beta_constraint": null, "beta_regularizer": null, "momentum": 0.99, "axis": -1}, "name": "conv_pw_6_bn"}, {"class_name": "Activation", "inbound_nodes": [[["conv_pw_6_bn", 0, 0, {}]]], "config": {"activation": "relu6", "trainable": true, "name": "conv_pw_6_relu"}, "name": "conv_pw_6_relu"}, {"class_name": "DepthwiseConv2D", "inbound_nodes": [[["conv_pw_6_relu", 0, 0, {}]]], "config": {"padding": "same", "depth_multiplier": 1, "name": "conv_dw_7", "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "depthwise_constraint": null, "strides": [1, 1], "dilation_rate": [1, 1], "depthwise_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "depthwise_regularizer": null, "use_bias": false, "activity_regularizer": null, "kernel_size": [3, 3]}, "name": "conv_dw_7"}, {"class_name": "BatchNormalization", "inbound_nodes": [[["conv_dw_7", 0, 0, {}]]], "config": {"gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "name": "conv_dw_7_bn", "epsilon": 0.001, "trainable": true, "center": true, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_initializer": {"class_name": "Zeros", "config": {}}, "scale": true, "gamma_regularizer": null, "gamma_constraint": null, "beta_constraint": null, "beta_regularizer": null, "momentum": 0.99, "axis": -1}, "name": "conv_dw_7_bn"}, {"class_name": "Activation", "inbound_nodes": [[["conv_dw_7_bn", 0, 0, {}]]], "config": {"activation": "relu6", "trainable": true, "name": "conv_dw_7_relu"}, "name": "conv_dw_7_relu"}, {"class_name": "Conv2D", "inbound_nodes": [[["conv_dw_7_relu", 0, 0, {}]]], "config": {"kernel_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "name": "conv_pw_7", "kernel_constraint": null, "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "padding": "same", "strides": [1, 1], "dilation_rate": [1, 1], "kernel_regularizer": null, "filters": 512, "bias_initializer": {"class_name": "Zeros", "config": {}}, "use_bias": false, "activity_regularizer": null, "kernel_size": [1, 1]}, "name": "conv_pw_7"}, {"class_name": "BatchNormalization", "inbound_nodes": [[["conv_pw_7", 0, 0, {}]]], "config": {"gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "name": "conv_pw_7_bn", "epsilon": 0.001, "trainable": true, "center": true, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_initializer": {"class_name": "Zeros", "config": {}}, "scale": true, "gamma_regularizer": null, "gamma_constraint": null, "beta_constraint": null, "beta_regularizer": null, "momentum": 0.99, "axis": -1}, "name": "conv_pw_7_bn"}, {"class_name": "Activation", "inbound_nodes": [[["conv_pw_7_bn", 0, 0, {}]]], "config": {"activation": "relu6", "trainable": true, "name": "conv_pw_7_relu"}, "name": "conv_pw_7_relu"}, {"class_name": "DepthwiseConv2D", "inbound_nodes": [[["conv_pw_7_relu", 0, 0, {}]]], "config": {"padding": "same", "depth_multiplier": 1, "name": "conv_dw_8", "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "depthwise_constraint": null, "strides": [1, 1], "dilation_rate": [1, 1], "depthwise_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "depthwise_regularizer": null, "use_bias": false, "activity_regularizer": null, "kernel_size": [3, 3]}, "name": "conv_dw_8"}, {"class_name": "BatchNormalization", "inbound_nodes": [[["conv_dw_8", 0, 0, {}]]], "config": {"gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "name": "conv_dw_8_bn", "epsilon": 0.001, "trainable": true, "center": true, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_initializer": {"class_name": "Zeros", "config": {}}, "scale": true, "gamma_regularizer": null, "gamma_constraint": null, "beta_constraint": null, "beta_regularizer": null, "momentum": 0.99, "axis": -1}, "name": "conv_dw_8_bn"}, {"class_name": "Activation", "inbound_nodes": [[["conv_dw_8_bn", 0, 0, {}]]], "config": {"activation": "relu6", "trainable": true, "name": "conv_dw_8_relu"}, "name": "conv_dw_8_relu"}, {"class_name": "Conv2D", "inbound_nodes": [[["conv_dw_8_relu", 0, 0, {}]]], "config": {"kernel_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "name": "conv_pw_8", "kernel_constraint": null, "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "padding": "same", "strides": [1, 1], "dilation_rate": [1, 1], "kernel_regularizer": null, "filters": 512, "bias_initializer": {"class_name": "Zeros", "config": {}}, "use_bias": false, "activity_regularizer": null, "kernel_size": [1, 1]}, "name": "conv_pw_8"}, {"class_name": "BatchNormalization", "inbound_nodes": [[["conv_pw_8", 0, 0, {}]]], "config": {"gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "name": "conv_pw_8_bn", "epsilon": 0.001, "trainable": true, "center": true, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_initializer": {"class_name": "Zeros", "config": {}}, "scale": true, "gamma_regularizer": null, "gamma_constraint": null, "beta_constraint": null, "beta_regularizer": null, "momentum": 0.99, "axis": -1}, "name": "conv_pw_8_bn"}, {"class_name": "Activation", "inbound_nodes": [[["conv_pw_8_bn", 0, 0, {}]]], "config": {"activation": "relu6", "trainable": true, "name": "conv_pw_8_relu"}, "name": "conv_pw_8_relu"}, {"class_name": "DepthwiseConv2D", "inbound_nodes": [[["conv_pw_8_relu", 0, 0, {}]]], "config": {"padding": "same", "depth_multiplier": 1, "name": "conv_dw_9", "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "depthwise_constraint": null, "strides": [1, 1], "dilation_rate": [1, 1], "depthwise_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "depthwise_regularizer": null, "use_bias": false, "activity_regularizer": null, "kernel_size": [3, 3]}, "name": "conv_dw_9"}, {"class_name": "BatchNormalization", "inbound_nodes": [[["conv_dw_9", 0, 0, {}]]], "config": {"gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "name": "conv_dw_9_bn", "epsilon": 0.001, "trainable": true, "center": true, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_initializer": {"class_name": "Zeros", "config": {}}, "scale": true, "gamma_regularizer": null, "gamma_constraint": null, "beta_constraint": null, "beta_regularizer": null, "momentum": 0.99, "axis": -1}, "name": "conv_dw_9_bn"}, {"class_name": "Activation", "inbound_nodes": [[["conv_dw_9_bn", 0, 0, {}]]], "config": {"activation": "relu6", "trainable": true, "name": "conv_dw_9_relu"}, "name": "conv_dw_9_relu"}, {"class_name": "Conv2D", "inbound_nodes": [[["conv_dw_9_relu", 0, 0, {}]]], "config": {"kernel_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "name": "conv_pw_9", "kernel_constraint": null, "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "padding": "same", "strides": [1, 1], "dilation_rate": [1, 1], "kernel_regularizer": null, "filters": 512, "bias_initializer": {"class_name": "Zeros", "config": {}}, "use_bias": false, "activity_regularizer": null, "kernel_size": [1, 1]}, "name": "conv_pw_9"}, {"class_name": "BatchNormalization", "inbound_nodes": [[["conv_pw_9", 0, 0, {}]]], "config": {"gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "name": "conv_pw_9_bn", "epsilon": 0.001, "trainable": true, "center": true, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_initializer": {"class_name": "Zeros", "config": {}}, "scale": true, "gamma_regularizer": null, "gamma_constraint": null, "beta_constraint": null, "beta_regularizer": null, "momentum": 0.99, "axis": -1}, "name": "conv_pw_9_bn"}, {"class_name": "Activation", "inbound_nodes": [[["conv_pw_9_bn", 0, 0, {}]]], "config": {"activation": "relu6", "trainable": true, "name": "conv_pw_9_relu"}, "name": "conv_pw_9_relu"}, {"class_name": "DepthwiseConv2D", "inbound_nodes": [[["conv_pw_9_relu", 0, 0, {}]]], "config": {"padding": "same", "depth_multiplier": 1, "name": "conv_dw_10", "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "depthwise_constraint": null, "strides": [1, 1], "dilation_rate": [1, 1], "depthwise_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "depthwise_regularizer": null, "use_bias": false, "activity_regularizer": null, "kernel_size": [3, 3]}, "name": "conv_dw_10"}, {"class_name": "BatchNormalization", "inbound_nodes": [[["conv_dw_10", 0, 0, {}]]], "config": {"gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "name": "conv_dw_10_bn", "epsilon": 0.001, "trainable": true, "center": true, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_initializer": {"class_name": "Zeros", "config": {}}, "scale": true, "gamma_regularizer": null, "gamma_constraint": null, "beta_constraint": null, "beta_regularizer": null, "momentum": 0.99, "axis": -1}, "name": "conv_dw_10_bn"}, {"class_name": "Activation", "inbound_nodes": [[["conv_dw_10_bn", 0, 0, {}]]], "config": {"activation": "relu6", "trainable": true, "name": "conv_dw_10_relu"}, "name": "conv_dw_10_relu"}, {"class_name": "Conv2D", "inbound_nodes": [[["conv_dw_10_relu", 0, 0, {}]]], "config": {"kernel_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "name": "conv_pw_10", "kernel_constraint": null, "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "padding": "same", "strides": [1, 1], "dilation_rate": [1, 1], "kernel_regularizer": null, "filters": 512, "bias_initializer": {"class_name": "Zeros", "config": {}}, "use_bias": false, "activity_regularizer": null, "kernel_size": [1, 1]}, "name": "conv_pw_10"}, {"class_name": "BatchNormalization", "inbound_nodes": [[["conv_pw_10", 0, 0, {}]]], "config": {"gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "name": "conv_pw_10_bn", "epsilon": 0.001, "trainable": true, "center": true, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_initializer": {"class_name": "Zeros", "config": {}}, "scale": true, "gamma_regularizer": null, "gamma_constraint": null, "beta_constraint": null, "beta_regularizer": null, "momentum": 0.99, "axis": -1}, "name": "conv_pw_10_bn"}, {"class_name": "Activation", "inbound_nodes": [[["conv_pw_10_bn", 0, 0, {}]]], "config": {"activation": "relu6", "trainable": true, "name": "conv_pw_10_relu"}, "name": "conv_pw_10_relu"}, {"class_name": "DepthwiseConv2D", "inbound_nodes": [[["conv_pw_10_relu", 0, 0, {}]]], "config": {"padding": "same", "depth_multiplier": 1, "name": "conv_dw_11", "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "depthwise_constraint": null, "strides": [1, 1], "dilation_rate": [1, 1], "depthwise_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "depthwise_regularizer": null, "use_bias": false, "activity_regularizer": null, "kernel_size": [3, 3]}, "name": "conv_dw_11"}, {"class_name": "BatchNormalization", "inbound_nodes": [[["conv_dw_11", 0, 0, {}]]], "config": {"gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "name": "conv_dw_11_bn", "epsilon": 0.001, "trainable": true, "center": true, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_initializer": {"class_name": "Zeros", "config": {}}, "scale": true, "gamma_regularizer": null, "gamma_constraint": null, "beta_constraint": null, "beta_regularizer": null, "momentum": 0.99, "axis": -1}, "name": "conv_dw_11_bn"}, {"class_name": "Activation", "inbound_nodes": [[["conv_dw_11_bn", 0, 0, {}]]], "config": {"activation": "relu6", "trainable": true, "name": "conv_dw_11_relu"}, "name": "conv_dw_11_relu"}, {"class_name": "Conv2D", "inbound_nodes": [[["conv_dw_11_relu", 0, 0, {}]]], "config": {"kernel_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "name": "conv_pw_11", "kernel_constraint": null, "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "padding": "same", "strides": [1, 1], "dilation_rate": [1, 1], "kernel_regularizer": null, "filters": 512, "bias_initializer": {"class_name": "Zeros", "config": {}}, "use_bias": false, "activity_regularizer": null, "kernel_size": [1, 1]}, "name": "conv_pw_11"}, {"class_name": "BatchNormalization", "inbound_nodes": [[["conv_pw_11", 0, 0, {}]]], "config": {"gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "name": "conv_pw_11_bn", "epsilon": 0.001, "trainable": true, "center": true, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_initializer": {"class_name": "Zeros", "config": {}}, "scale": true, "gamma_regularizer": null, "gamma_constraint": null, "beta_constraint": null, "beta_regularizer": null, "momentum": 0.99, "axis": -1}, "name": "conv_pw_11_bn"}, {"class_name": "Activation", "inbound_nodes": [[["conv_pw_11_bn", 0, 0, {}]]], "config": {"activation": "relu6", "trainable": true, "name": "conv_pw_11_relu"}, "name": "conv_pw_11_relu"}, {"class_name": "DepthwiseConv2D", "inbound_nodes": [[["conv_pw_11_relu", 0, 0, {}]]], "config": {"padding": "same", "depth_multiplier": 1, "name": "conv_dw_12", "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "depthwise_constraint": null, "strides": [2, 2], "dilation_rate": [1, 1], "depthwise_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "depthwise_regularizer": null, "use_bias": false, "activity_regularizer": null, "kernel_size": [3, 3]}, "name": "conv_dw_12"}, {"class_name": "BatchNormalization", "inbound_nodes": [[["conv_dw_12", 0, 0, {}]]], "config": {"gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "name": "conv_dw_12_bn", "epsilon": 0.001, "trainable": true, "center": true, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_initializer": {"class_name": "Zeros", "config": {}}, "scale": true, "gamma_regularizer": null, "gamma_constraint": null, "beta_constraint": null, "beta_regularizer": null, "momentum": 0.99, "axis": -1}, "name": "conv_dw_12_bn"}, {"class_name": "Activation", "inbound_nodes": [[["conv_dw_12_bn", 0, 0, {}]]], "config": {"activation": "relu6", "trainable": true, "name": "conv_dw_12_relu"}, "name": "conv_dw_12_relu"}, {"class_name": "Conv2D", "inbound_nodes": [[["conv_dw_12_relu", 0, 0, {}]]], "config": {"kernel_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "name": "conv_pw_12", "kernel_constraint": null, "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "padding": "same", "strides": [1, 1], "dilation_rate": [1, 1], "kernel_regularizer": null, "filters": 1024, "bias_initializer": {"class_name": "Zeros", "config": {}}, "use_bias": false, "activity_regularizer": null, "kernel_size": [1, 1]}, "name": "conv_pw_12"}, {"class_name": "BatchNormalization", "inbound_nodes": [[["conv_pw_12", 0, 0, {}]]], "config": {"gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "name": "conv_pw_12_bn", "epsilon": 0.001, "trainable": true, "center": true, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_initializer": {"class_name": "Zeros", "config": {}}, "scale": true, "gamma_regularizer": null, "gamma_constraint": null, "beta_constraint": null, "beta_regularizer": null, "momentum": 0.99, "axis": -1}, "name": "conv_pw_12_bn"}, {"class_name": "Activation", "inbound_nodes": [[["conv_pw_12_bn", 0, 0, {}]]], "config": {"activation": "relu6", "trainable": true, "name": "conv_pw_12_relu"}, "name": "conv_pw_12_relu"}, {"class_name": "DepthwiseConv2D", "inbound_nodes": [[["conv_pw_12_relu", 0, 0, {}]]], "config": {"padding": "same", "depth_multiplier": 1, "name": "conv_dw_13", "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "depthwise_constraint": null, "strides": [1, 1], "dilation_rate": [1, 1], "depthwise_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "depthwise_regularizer": null, "use_bias": false, "activity_regularizer": null, "kernel_size": [3, 3]}, "name": "conv_dw_13"}, {"class_name": "BatchNormalization", "inbound_nodes": [[["conv_dw_13", 0, 0, {}]]], "config": {"gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "name": "conv_dw_13_bn", "epsilon": 0.001, "trainable": true, "center": true, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_initializer": {"class_name": "Zeros", "config": {}}, "scale": true, "gamma_regularizer": null, "gamma_constraint": null, "beta_constraint": null, "beta_regularizer": null, "momentum": 0.99, "axis": -1}, "name": "conv_dw_13_bn"}, {"class_name": "Activation", "inbound_nodes": [[["conv_dw_13_bn", 0, 0, {}]]], "config": {"activation": "relu6", "trainable": true, "name": "conv_dw_13_relu"}, "name": "conv_dw_13_relu"}, {"class_name": "Conv2D", "inbound_nodes": [[["conv_dw_13_relu", 0, 0, {}]]], "config": {"kernel_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "name": "conv_pw_13", "kernel_constraint": null, "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "padding": "same", "strides": [1, 1], "dilation_rate": [1, 1], "kernel_regularizer": null, "filters": 1024, "bias_initializer": {"class_name": "Zeros", "config": {}}, "use_bias": false, "activity_regularizer": null, "kernel_size": [1, 1]}, "name": "conv_pw_13"}, {"class_name": "BatchNormalization", "inbound_nodes": [[["conv_pw_13", 0, 0, {}]]], "config": {"gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "name": "conv_pw_13_bn", "epsilon": 0.001, "trainable": true, "center": true, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_initializer": {"class_name": "Zeros", "config": {}}, "scale": true, "gamma_regularizer": null, "gamma_constraint": null, "beta_constraint": null, "beta_regularizer": null, "momentum": 0.99, "axis": -1}, "name": "conv_pw_13_bn"}, {"class_name": "Activation", "inbound_nodes": [[["conv_pw_13_bn", 0, 0, {}]]], "config": {"activation": "relu6", "trainable": true, "name": "conv_pw_13_relu"}, "name": "conv_pw_13_relu"}, {"class_name": "GlobalAveragePooling2D", "inbound_nodes": [[["conv_pw_13_relu", 0, 0, {}]]], "config": {"trainable": true, "name": "global_average_pooling2d_1", "data_format": "channels_last"}, "name": "global_average_pooling2d_1"}, {"class_name": "Reshape", "inbound_nodes": [[["global_average_pooling2d_1", 0, 0, {}]]], "config": {"target_shape": [1, 1, 1024], "trainable": true, "name": "reshape_1"}, "name": "reshape_1"}, {"class_name": "Dropout", "inbound_nodes": [[["reshape_1", 0, 0, {}]]], "config": {"rate": 0.001, "noise_shape": null, "trainable": true, "seed": null, "name": "dropout"}, "name": "dropout"}, {"class_name": "Conv2D", "inbound_nodes": [[["dropout", 0, 0, {}]]], "config": {"kernel_initializer": {"class_name": "VarianceScaling", "config": {"distribution": "uniform", "scale": 1.0, "seed": null, "mode": "fan_avg"}}, "name": "conv_preds", "kernel_constraint": null, "bias_regularizer": null, "bias_constraint": null, "activation": "linear", "trainable": true, "data_format": "channels_last", "padding": "same", "strides": [1, 1], "dilation_rate": [1, 1], "kernel_regularizer": null, "filters": 1000, "bias_initializer": {"class_name": "Zeros", "config": {}}, "use_bias": true, "activity_regularizer": null, "kernel_size": [1, 1]}, "name": "conv_preds"}, {"class_name": "Activation", "inbound_nodes": [[["conv_preds", 0, 0, {}]]], "config": {"activation": "softmax", "trainable": true, "name": "act_softmax"}, "name": "act_softmax"}, {"class_name": "Reshape", "inbound_nodes": [[["act_softmax", 0, 0, {}]]], "config": {"target_shape": [1000], "trainable": true, "name": "reshape_2"}, "name": "reshape_2"}], "input_layers": [["input_1", 0, 0]], "name": "mobilenet_1.00_224", "output_layers": [["reshape_2", 0, 0]]}}, "backend": "tensorflow"}, "weightsManifest": [{"paths": ["group1-shard1of1"], "weights": [{"dtype": "float32", "shape": [3, 3, 3, 32], "name": "conv1/kernel"}]}, {"paths": ["group2-shard1of1"], "weights": [{"dtype": "float32", "shape": [32], "name": "conv1_bn/gamma"}, {"dtype": "float32", "shape": [32], "name": "conv1_bn/beta"}, {"dtype": "float32", "shape": [32], "name": "conv1_bn/moving_mean"}, {"dtype": "float32", "shape": [32], "name": "conv1_bn/moving_variance"}]}, {"paths": ["group3-shard1of1"], "weights": [{"dtype": "float32", "shape": [3, 3, 32, 1], "name": "conv_dw_1/depthwise_kernel"}]}, {"paths": ["group4-shard1of1"], "weights": [{"dtype": "float32", "shape": [3, 3, 512, 1], "name": "conv_dw_10/depthwise_kernel"}]}, {"paths": ["group5-shard1of1"], "weights": [{"dtype": "float32", "shape": [512], "name": "conv_dw_10_bn/gamma"}, {"dtype": "float32", "shape": [512], "name": "conv_dw_10_bn/beta"}, {"dtype": "float32", "shape": [512], "name": "conv_dw_10_bn/moving_mean"}, {"dtype": "float32", "shape": [512], "name": "conv_dw_10_bn/moving_variance"}]}, {"paths": ["group6-shard1of1"], "weights": [{"dtype": "float32", "shape": [3, 3, 512, 1], "name": "conv_dw_11/depthwise_kernel"}]}, {"paths": ["group7-shard1of1"], "weights": [{"dtype": "float32", "shape": [512], "name": "conv_dw_11_bn/gamma"}, {"dtype": "float32", "shape": [512], "name": "conv_dw_11_bn/beta"}, {"dtype": "float32", "shape": [512], "name": "conv_dw_11_bn/moving_mean"}, {"dtype": "float32", "shape": [512], "name": "conv_dw_11_bn/moving_variance"}]}, {"paths": ["group8-shard1of1"], "weights": [{"dtype": "float32", "shape": [3, 3, 512, 1], "name": "conv_dw_12/depthwise_kernel"}]}, {"paths": ["group9-shard1of1"], "weights": [{"dtype": "float32", "shape": [512], "name": "conv_dw_12_bn/gamma"}, {"dtype": "float32", "shape": [512], "name": "conv_dw_12_bn/beta"}, {"dtype": "float32", "shape": [512], "name": "conv_dw_12_bn/moving_mean"}, {"dtype": "float32", "shape": [512], "name": "conv_dw_12_bn/moving_variance"}]}, {"paths": ["group10-shard1of1"], "weights": [{"dtype": "float32", "shape": [3, 3, 1024, 1], "name": "conv_dw_13/depthwise_kernel"}]}, {"paths": ["group11-shard1of1"], "weights": [{"dtype": "float32", "shape": [1024], "name": "conv_dw_13_bn/gamma"}, {"dtype": "float32", "shape": [1024], "name": "conv_dw_13_bn/beta"}, {"dtype": "float32", "shape": [1024], "name": "conv_dw_13_bn/moving_mean"}, {"dtype": "float32", "shape": [1024], "name": "conv_dw_13_bn/moving_variance"}]}, {"paths": ["group12-shard1of1"], "weights": [{"dtype": "float32", "shape": [32], "name": "conv_dw_1_bn/gamma"}, {"dtype": "float32", "shape": [32], "name": "conv_dw_1_bn/beta"}, {"dtype": "float32", "shape": [32], "name": "conv_dw_1_bn/moving_mean"}, {"dtype": "float32", "shape": [32], "name": "conv_dw_1_bn/moving_variance"}]}, {"paths": ["group13-shard1of1"], "weights": [{"dtype": "float32", "shape": [3, 3, 64, 1], "name": "conv_dw_2/depthwise_kernel"}]}, {"paths": ["group14-shard1of1"], "weights": [{"dtype": "float32", "shape": [64], "name": "conv_dw_2_bn/gamma"}, {"dtype": "float32", "shape": [64], "name": "conv_dw_2_bn/beta"}, {"dtype": "float32", "shape": [64], "name": "conv_dw_2_bn/moving_mean"}, {"dtype": "float32", "shape": [64], "name": "conv_dw_2_bn/moving_variance"}]}, {"paths": ["group15-shard1of1"], "weights": [{"dtype": "float32", "shape": [3, 3, 128, 1], "name": "conv_dw_3/depthwise_kernel"}]}, {"paths": ["group16-shard1of1"], "weights": [{"dtype": "float32", "shape": [128], "name": "conv_dw_3_bn/gamma"}, {"dtype": "float32", "shape": [128], "name": "conv_dw_3_bn/beta"}, {"dtype": "float32", "shape": [128], "name": "conv_dw_3_bn/moving_mean"}, {"dtype": "float32", "shape": [128], "name": "conv_dw_3_bn/moving_variance"}]}, {"paths": ["group17-shard1of1"], "weights": [{"dtype": "float32", "shape": [3, 3, 128, 1], "name": "conv_dw_4/depthwise_kernel"}]}, {"paths": ["group18-shard1of1"], "weights": [{"dtype": "float32", "shape": [128], "name": "conv_dw_4_bn/gamma"}, {"dtype": "float32", "shape": [128], "name": "conv_dw_4_bn/beta"}, {"dtype": "float32", "shape": [128], "name": "conv_dw_4_bn/moving_mean"}, {"dtype": "float32", "shape": [128], "name": "conv_dw_4_bn/moving_variance"}]}, {"paths": ["group19-shard1of1"], "weights": [{"dtype": "float32", "shape": [3, 3, 256, 1], "name": "conv_dw_5/depthwise_kernel"}]}, {"paths": ["group20-shard1of1"], "weights": [{"dtype": "float32", "shape": [256], "name": "conv_dw_5_bn/gamma"}, {"dtype": "float32", "shape": [256], "name": "conv_dw_5_bn/beta"}, {"dtype": "float32", "shape": [256], "name": "conv_dw_5_bn/moving_mean"}, {"dtype": "float32", "shape": [256], "name": "conv_dw_5_bn/moving_variance"}]}, {"paths": ["group21-shard1of1"], "weights": [{"dtype": "float32", "shape": [3, 3, 256, 1], "name": "conv_dw_6/depthwise_kernel"}]}, {"paths": ["group22-shard1of1"], "weights": [{"dtype": "float32", "shape": [256], "name": "conv_dw_6_bn/gamma"}, {"dtype": "float32", "shape": [256], "name": "conv_dw_6_bn/beta"}, {"dtype": "float32", "shape": [256], "name": "conv_dw_6_bn/moving_mean"}, {"dtype": "float32", "shape": [256], "name": "conv_dw_6_bn/moving_variance"}]}, {"paths": ["group23-shard1of1"], "weights": [{"dtype": "float32", "shape": [3, 3, 512, 1], "name": "conv_dw_7/depthwise_kernel"}]}, {"paths": ["group24-shard1of1"], "weights": [{"dtype": "float32", "shape": [512], "name": "conv_dw_7_bn/gamma"}, {"dtype": "float32", "shape": [512], "name": "conv_dw_7_bn/beta"}, {"dtype": "float32", "shape": [512], "name": "conv_dw_7_bn/moving_mean"}, {"dtype": "float32", "shape": [512], "name": "conv_dw_7_bn/moving_variance"}]}, {"paths": ["group25-shard1of1"], "weights": [{"dtype": "float32", "shape": [3, 3, 512, 1], "name": "conv_dw_8/depthwise_kernel"}]}, {"paths": ["group26-shard1of1"], "weights": [{"dtype": "float32", "shape": [512], "name": "conv_dw_8_bn/gamma"}, {"dtype": "float32", "shape": [512], "name": "conv_dw_8_bn/beta"}, {"dtype": "float32", "shape": [512], "name": "conv_dw_8_bn/moving_mean"}, {"dtype": "float32", "shape": [512], "name": "conv_dw_8_bn/moving_variance"}]}, {"paths": ["group27-shard1of1"], "weights": [{"dtype": "float32", "shape": [3, 3, 512, 1], "name": "conv_dw_9/depthwise_kernel"}]}, {"paths": ["group28-shard1of1"], "weights": [{"dtype": "float32", "shape": [512], "name": "conv_dw_9_bn/gamma"}, {"dtype": "float32", "shape": [512], "name": "conv_dw_9_bn/beta"}, {"dtype": "float32", "shape": [512], "name": "conv_dw_9_bn/moving_mean"}, {"dtype": "float32", "shape": [512], "name": "conv_dw_9_bn/moving_variance"}]}, {"paths": ["group29-shard1of1"], "weights": [{"dtype": "float32", "shape": [1, 1, 1024, 1000], "name": "conv_preds/kernel"}, {"dtype": "float32", "shape": [1000], "name": "conv_preds/bias"}]}, {"paths": ["group30-shard1of1"], "weights": [{"dtype": "float32", "shape": [1, 1, 32, 64], "name": "conv_pw_1/kernel"}]}, {"paths": ["group31-shard1of1"], "weights": [{"dtype": "float32", "shape": [1, 1, 512, 512], "name": "conv_pw_10/kernel"}]}, {"paths": ["group32-shard1of1"], "weights": [{"dtype": "float32", "shape": [512], "name": "conv_pw_10_bn/gamma"}, {"dtype": "float32", "shape": [512], "name": "conv_pw_10_bn/beta"}, {"dtype": "float32", "shape": [512], "name": "conv_pw_10_bn/moving_mean"}, {"dtype": "float32", "shape": [512], "name": "conv_pw_10_bn/moving_variance"}]}, {"paths": ["group33-shard1of1"], "weights": [{"dtype": "float32", "shape": [1, 1, 512, 512], "name": "conv_pw_11/kernel"}]}, {"paths": ["group34-shard1of1"], "weights": [{"dtype": "float32", "shape": [512], "name": "conv_pw_11_bn/gamma"}, {"dtype": "float32", "shape": [512], "name": "conv_pw_11_bn/beta"}, {"dtype": "float32", "shape": [512], "name": "conv_pw_11_bn/moving_mean"}, {"dtype": "float32", "shape": [512], "name": "conv_pw_11_bn/moving_variance"}]}, {"paths": ["group35-shard1of1"], "weights": [{"dtype": "float32", "shape": [1, 1, 512, 1024], "name": "conv_pw_12/kernel"}]}, {"paths": ["group36-shard1of1"], "weights": [{"dtype": "float32", "shape": [1024], "name": "conv_pw_12_bn/gamma"}, {"dtype": "float32", "shape": [1024], "name": "conv_pw_12_bn/beta"}, {"dtype": "float32", "shape": [1024], "name": "conv_pw_12_bn/moving_mean"}, {"dtype": "float32", "shape": [1024], "name": "conv_pw_12_bn/moving_variance"}]}, {"paths": ["group37-shard1of1"], "weights": [{"dtype": "float32", "shape": [1, 1, 1024, 1024], "name": "conv_pw_13/kernel"}]}, {"paths": ["group38-shard1of1"], "weights": [{"dtype": "float32", "shape": [1024], "name": "conv_pw_13_bn/gamma"}, {"dtype": "float32", "shape": [1024], "name": "conv_pw_13_bn/beta"}, {"dtype": "float32", "shape": [1024], "name": "conv_pw_13_bn/moving_mean"}, {"dtype": "float32", "shape": [1024], "name": "conv_pw_13_bn/moving_variance"}]}, {"paths": ["group39-shard1of1"], "weights": [{"dtype": "float32", "shape": [64], "name": "conv_pw_1_bn/gamma"}, {"dtype": "float32", "shape": [64], "name": "conv_pw_1_bn/beta"}, {"dtype": "float32", "shape": [64], "name": "conv_pw_1_bn/moving_mean"}, {"dtype": "float32", "shape": [64], "name": "conv_pw_1_bn/moving_variance"}]}, {"paths": ["group40-shard1of1"], "weights": [{"dtype": "float32", "shape": [1, 1, 64, 128], "name": "conv_pw_2/kernel"}]}, {"paths": ["group41-shard1of1"], "weights": [{"dtype": "float32", "shape": [128], "name": "conv_pw_2_bn/gamma"}, {"dtype": "float32", "shape": [128], "name": "conv_pw_2_bn/beta"}, {"dtype": "float32", "shape": [128], "name": "conv_pw_2_bn/moving_mean"}, {"dtype": "float32", "shape": [128], "name": "conv_pw_2_bn/moving_variance"}]}, {"paths": ["group42-shard1of1"], "weights": [{"dtype": "float32", "shape": [1, 1, 128, 128], "name": "conv_pw_3/kernel"}]}, {"paths": ["group43-shard1of1"], "weights": [{"dtype": "float32", "shape": [128], "name": "conv_pw_3_bn/gamma"}, {"dtype": "float32", "shape": [128], "name": "conv_pw_3_bn/beta"}, {"dtype": "float32", "shape": [128], "name": "conv_pw_3_bn/moving_mean"}, {"dtype": "float32", "shape": [128], "name": "conv_pw_3_bn/moving_variance"}]}, {"paths": ["group44-shard1of1"], "weights": [{"dtype": "float32", "shape": [1, 1, 128, 256], "name": "conv_pw_4/kernel"}]}, {"paths": ["group45-shard1of1"], "weights": [{"dtype": "float32", "shape": [256], "name": "conv_pw_4_bn/gamma"}, {"dtype": "float32", "shape": [256], "name": "conv_pw_4_bn/beta"}, {"dtype": "float32", "shape": [256], "name": "conv_pw_4_bn/moving_mean"}, {"dtype": "float32", "shape": [256], "name": "conv_pw_4_bn/moving_variance"}]}, {"paths": ["group46-shard1of1"], "weights": [{"dtype": "float32", "shape": [1, 1, 256, 256], "name": "conv_pw_5/kernel"}]}, {"paths": ["group47-shard1of1"], "weights": [{"dtype": "float32", "shape": [256], "name": "conv_pw_5_bn/gamma"}, {"dtype": "float32", "shape": [256], "name": "conv_pw_5_bn/beta"}, {"dtype": "float32", "shape": [256], "name": "conv_pw_5_bn/moving_mean"}, {"dtype": "float32", "shape": [256], "name": "conv_pw_5_bn/moving_variance"}]}, {"paths": ["group48-shard1of1"], "weights": [{"dtype": "float32", "shape": [1, 1, 256, 512], "name": "conv_pw_6/kernel"}]}, {"paths": ["group49-shard1of1"], "weights": [{"dtype": "float32", "shape": [512], "name": "conv_pw_6_bn/gamma"}, {"dtype": "float32", "shape": [512], "name": "conv_pw_6_bn/beta"}, {"dtype": "float32", "shape": [512], "name": "conv_pw_6_bn/moving_mean"}, {"dtype": "float32", "shape": [512], "name": "conv_pw_6_bn/moving_variance"}]}, {"paths": ["group50-shard1of1"], "weights": [{"dtype": "float32", "shape": [1, 1, 512, 512], "name": "conv_pw_7/kernel"}]}, {"paths": ["group51-shard1of1"], "weights": [{"dtype": "float32", "shape": [512], "name": "conv_pw_7_bn/gamma"}, {"dtype": "float32", "shape": [512], "name": "conv_pw_7_bn/beta"}, {"dtype": "float32", "shape": [512], "name": "conv_pw_7_bn/moving_mean"}, {"dtype": "float32", "shape": [512], "name": "conv_pw_7_bn/moving_variance"}]}, {"paths": ["group52-shard1of1"], "weights": [{"dtype": "float32", "shape": [1, 1, 512, 512], "name": "conv_pw_8/kernel"}]}, {"paths": ["group53-shard1of1"], "weights": [{"dtype": "float32", "shape": [512], "name": "conv_pw_8_bn/gamma"}, {"dtype": "float32", "shape": [512], "name": "conv_pw_8_bn/beta"}, {"dtype": "float32", "shape": [512], "name": "conv_pw_8_bn/moving_mean"}, {"dtype": "float32", "shape": [512], "name": "conv_pw_8_bn/moving_variance"}]}, {"paths": ["group54-shard1of1"], "weights": [{"dtype": "float32", "shape": [1, 1, 512, 512], "name": "conv_pw_9/kernel"}]}, {"paths": ["group55-shard1of1"], "weights": [{"dtype": "float32", "shape": [512], "name": "conv_pw_9_bn/gamma"}, {"dtype": "float32", "shape": [512], "name": "conv_pw_9_bn/beta"}, {"dtype": "float32", "shape": [512], "name": "conv_pw_9_bn/moving_mean"}, {"dtype": "float32", "shape": [512], "name": "conv_pw_9_bn/moving_variance"}]}]} -------------------------------------------------------------------------------- /mobilenet.js: -------------------------------------------------------------------------------- 1 | // @tensorflow/tfjs-models Copyright 2018 Google 2 | (function (global, factory) { 3 | typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tensorflow/tfjs')) : 4 | typeof define === 'function' && define.amd ? define(['exports', '@tensorflow/tfjs'], factory) : 5 | (factory((global.mobilenet = {}),global.tf)); 6 | }(this, (function (exports,tf) { 'use strict'; 7 | 8 | /*! ***************************************************************************** 9 | Copyright (c) Microsoft Corporation. All rights reserved. 10 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use 11 | this file except in compliance with the License. You may obtain a copy of the 12 | License at http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED 16 | WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, 17 | MERCHANTABLITY OR NON-INFRINGEMENT. 18 | 19 | See the Apache Version 2.0 License for specific language governing permissions 20 | and limitations under the License. 21 | ***************************************************************************** */ 22 | 23 | function __awaiter(thisArg, _arguments, P, generator) { 24 | return new (P || (P = Promise))(function (resolve, reject) { 25 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 26 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 27 | function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } 28 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 29 | }); 30 | } 31 | 32 | function __generator(thisArg, body) { 33 | var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; 34 | return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; 35 | function verb(n) { return function (v) { return step([n, v]); }; } 36 | function step(op) { 37 | if (f) throw new TypeError("Generator is already executing."); 38 | while (_) try { 39 | if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; 40 | if (y = 0, t) op = [op[0] & 2, t.value]; 41 | switch (op[0]) { 42 | case 0: case 1: t = op; break; 43 | case 4: _.label++; return { value: op[1], done: false }; 44 | case 5: _.label++; y = op[1]; op = [0]; continue; 45 | case 7: op = _.ops.pop(); _.trys.pop(); continue; 46 | default: 47 | if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } 48 | if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } 49 | if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } 50 | if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } 51 | if (t[2]) _.ops.pop(); 52 | _.trys.pop(); continue; 53 | } 54 | op = body.call(thisArg, _); 55 | } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } 56 | if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; 57 | } 58 | } 59 | 60 | var IMAGENET_CLASSES = { 61 | 0: 'tench, Tinca tinca', 62 | 1: 'goldfish, Carassius auratus', 63 | 2: 'great white shark, white shark, man-eater, man-eating shark, ' + 64 | 'Carcharodon carcharias', 65 | 3: 'tiger shark, Galeocerdo cuvieri', 66 | 4: 'hammerhead, hammerhead shark', 67 | 5: 'electric ray, crampfish, numbfish, torpedo', 68 | 6: 'stingray', 69 | 7: 'cock', 70 | 8: 'hen', 71 | 9: 'ostrich, Struthio camelus', 72 | 10: 'brambling, Fringilla montifringilla', 73 | 11: 'goldfinch, Carduelis carduelis', 74 | 12: 'house finch, linnet, Carpodacus mexicanus', 75 | 13: 'junco, snowbird', 76 | 14: 'indigo bunting, indigo finch, indigo bird, Passerina cyanea', 77 | 15: 'robin, American robin, Turdus migratorius', 78 | 16: 'bulbul', 79 | 17: 'jay', 80 | 18: 'magpie', 81 | 19: 'chickadee', 82 | 20: 'water ouzel, dipper', 83 | 21: 'kite', 84 | 22: 'bald eagle, American eagle, Haliaeetus leucocephalus', 85 | 23: 'vulture', 86 | 24: 'great grey owl, great gray owl, Strix nebulosa', 87 | 25: 'European fire salamander, Salamandra salamandra', 88 | 26: 'common newt, Triturus vulgaris', 89 | 27: 'eft', 90 | 28: 'spotted salamander, Ambystoma maculatum', 91 | 29: 'axolotl, mud puppy, Ambystoma mexicanum', 92 | 30: 'bullfrog, Rana catesbeiana', 93 | 31: 'tree frog, tree-frog', 94 | 32: 'tailed frog, bell toad, ribbed toad, tailed toad, Ascaphus trui', 95 | 33: 'loggerhead, loggerhead turtle, Caretta caretta', 96 | 34: 'leatherback turtle, leatherback, leathery turtle, Dermochelys coriacea', 97 | 35: 'mud turtle', 98 | 36: 'terrapin', 99 | 37: 'box turtle, box tortoise', 100 | 38: 'banded gecko', 101 | 39: 'common iguana, iguana, Iguana iguana', 102 | 40: 'American chameleon, anole, Anolis carolinensis', 103 | 41: 'whiptail, whiptail lizard', 104 | 42: 'agama', 105 | 43: 'frilled lizard, Chlamydosaurus kingi', 106 | 44: 'alligator lizard', 107 | 45: 'Gila monster, Heloderma suspectum', 108 | 46: 'green lizard, Lacerta viridis', 109 | 47: 'African chameleon, Chamaeleo chamaeleon', 110 | 48: 'Komodo dragon, Komodo lizard, dragon lizard, giant lizard, ' + 111 | 'Varanus komodoensis', 112 | 49: 'African crocodile, Nile crocodile, Crocodylus niloticus', 113 | 50: 'American alligator, Alligator mississipiensis', 114 | 51: 'triceratops', 115 | 52: 'thunder snake, worm snake, Carphophis amoenus', 116 | 53: 'ringneck snake, ring-necked snake, ring snake', 117 | 54: 'hognose snake, puff adder, sand viper', 118 | 55: 'green snake, grass snake', 119 | 56: 'king snake, kingsnake', 120 | 57: 'garter snake, grass snake', 121 | 58: 'water snake', 122 | 59: 'vine snake', 123 | 60: 'night snake, Hypsiglena torquata', 124 | 61: 'boa constrictor, Constrictor constrictor', 125 | 62: 'rock python, rock snake, Python sebae', 126 | 63: 'Indian cobra, Naja naja', 127 | 64: 'green mamba', 128 | 65: 'sea snake', 129 | 66: 'horned viper, cerastes, sand viper, horned asp, Cerastes cornutus', 130 | 67: 'diamondback, diamondback rattlesnake, Crotalus adamanteus', 131 | 68: 'sidewinder, horned rattlesnake, Crotalus cerastes', 132 | 69: 'trilobite', 133 | 70: 'harvestman, daddy longlegs, Phalangium opilio', 134 | 71: 'scorpion', 135 | 72: 'black and gold garden spider, Argiope aurantia', 136 | 73: 'barn spider, Araneus cavaticus', 137 | 74: 'garden spider, Aranea diademata', 138 | 75: 'black widow, Latrodectus mactans', 139 | 76: 'tarantula', 140 | 77: 'wolf spider, hunting spider', 141 | 78: 'tick', 142 | 79: 'centipede', 143 | 80: 'black grouse', 144 | 81: 'ptarmigan', 145 | 82: 'ruffed grouse, partridge, Bonasa umbellus', 146 | 83: 'prairie chicken, prairie grouse, prairie fowl', 147 | 84: 'peacock', 148 | 85: 'quail', 149 | 86: 'partridge', 150 | 87: 'African grey, African gray, Psittacus erithacus', 151 | 88: 'macaw', 152 | 89: 'sulphur-crested cockatoo, Kakatoe galerita, Cacatua galerita', 153 | 90: 'lorikeet', 154 | 91: 'coucal', 155 | 92: 'bee eater', 156 | 93: 'hornbill', 157 | 94: 'hummingbird', 158 | 95: 'jacamar', 159 | 96: 'toucan', 160 | 97: 'drake', 161 | 98: 'red-breasted merganser, Mergus serrator', 162 | 99: 'goose', 163 | 100: 'black swan, Cygnus atratus', 164 | 101: 'tusker', 165 | 102: 'echidna, spiny anteater, anteater', 166 | 103: 'platypus, duckbill, duckbilled platypus, duck-billed platypus, ' + 167 | 'Ornithorhynchus anatinus', 168 | 104: 'wallaby, brush kangaroo', 169 | 105: 'koala, koala bear, kangaroo bear, native bear, Phascolarctos cinereus', 170 | 106: 'wombat', 171 | 107: 'jelly fish', 172 | 108: 'sea anemone, anemone', 173 | 109: 'brain coral', 174 | 110: 'flatworm, platyhelminth', 175 | 111: 'nematode, nematode worm, roundworm', 176 | 112: 'conch', 177 | 113: 'snail', 178 | 114: 'slug', 179 | 115: 'sea slug, nudibranch', 180 | 116: 'chiton, coat-of-mail shell, sea cradle, polyplacophore', 181 | 117: 'chambered nautilus, pearly nautilus, nautilus', 182 | 118: 'Dungeness crab, Cancer magister', 183 | 119: 'rock crab, Cancer irroratus', 184 | 120: 'fiddler crab', 185 | 121: 'king crab, Alaska crab, Alaskan king crab, Alaska king crab, ' + 186 | 'Paralithodes camtschatica', 187 | 122: 'American lobster, Northern lobster, Maine lobster, Homarus americanus', 188 | 123: 'spiny lobster, langouste, rock lobster, crawfish, crayfish, sea ' + 189 | 'crawfish', 190 | 124: 'crayfish, crawfish, crawdad, crawdaddy', 191 | 125: 'hermit crab', 192 | 126: 'isopod', 193 | 127: 'white stork, Ciconia ciconia', 194 | 128: 'black stork, Ciconia nigra', 195 | 129: 'spoonbill', 196 | 130: 'flamingo', 197 | 131: 'little blue heron, Egretta caerulea', 198 | 132: 'American egret, great white heron, Egretta albus', 199 | 133: 'bittern', 200 | 134: 'crane', 201 | 135: 'limpkin, Aramus pictus', 202 | 136: 'European gallinule, Porphyrio porphyrio', 203 | 137: 'American coot, marsh hen, mud hen, water hen, Fulica americana', 204 | 138: 'bustard', 205 | 139: 'ruddy turnstone, Arenaria interpres', 206 | 140: 'red-backed sandpiper, dunlin, Erolia alpina', 207 | 141: 'redshank, Tringa totanus', 208 | 142: 'dowitcher', 209 | 143: 'oystercatcher, oyster catcher', 210 | 144: 'pelican', 211 | 145: 'king penguin, Aptenodytes patagonica', 212 | 146: 'albatross, mollymawk', 213 | 147: 'grey whale, gray whale, devilfish, Eschrichtius gibbosus, ' + 214 | 'Eschrichtius robustus', 215 | 148: 'killer whale, killer, orca, grampus, sea wolf, Orcinus orca', 216 | 149: 'dugong, Dugong dugon', 217 | 150: 'sea lion', 218 | 151: 'Chihuahua', 219 | 152: 'Japanese spaniel', 220 | 153: 'Maltese dog, Maltese terrier, Maltese', 221 | 154: 'Pekinese, Pekingese, Peke', 222 | 155: 'Shih-Tzu', 223 | 156: 'Blenheim spaniel', 224 | 157: 'papillon', 225 | 158: 'toy terrier', 226 | 159: 'Rhodesian ridgeback', 227 | 160: 'Afghan hound, Afghan', 228 | 161: 'basset, basset hound', 229 | 162: 'beagle', 230 | 163: 'bloodhound, sleuthhound', 231 | 164: 'bluetick', 232 | 165: 'black-and-tan coonhound', 233 | 166: 'Walker hound, Walker foxhound', 234 | 167: 'English foxhound', 235 | 168: 'redbone', 236 | 169: 'borzoi, Russian wolfhound', 237 | 170: 'Irish wolfhound', 238 | 171: 'Italian greyhound', 239 | 172: 'whippet', 240 | 173: 'Ibizan hound, Ibizan Podenco', 241 | 174: 'Norwegian elkhound, elkhound', 242 | 175: 'otterhound, otter hound', 243 | 176: 'Saluki, gazelle hound', 244 | 177: 'Scottish deerhound, deerhound', 245 | 178: 'Weimaraner', 246 | 179: 'Staffordshire bullterrier, Staffordshire bull terrier', 247 | 180: 'American Staffordshire terrier, Staffordshire terrier, American pit ' + 248 | 'bull terrier, pit bull terrier', 249 | 181: 'Bedlington terrier', 250 | 182: 'Border terrier', 251 | 183: 'Kerry blue terrier', 252 | 184: 'Irish terrier', 253 | 185: 'Norfolk terrier', 254 | 186: 'Norwich terrier', 255 | 187: 'Yorkshire terrier', 256 | 188: 'wire-haired fox terrier', 257 | 189: 'Lakeland terrier', 258 | 190: 'Sealyham terrier, Sealyham', 259 | 191: 'Airedale, Airedale terrier', 260 | 192: 'cairn, cairn terrier', 261 | 193: 'Australian terrier', 262 | 194: 'Dandie Dinmont, Dandie Dinmont terrier', 263 | 195: 'Boston bull, Boston terrier', 264 | 196: 'miniature schnauzer', 265 | 197: 'giant schnauzer', 266 | 198: 'standard schnauzer', 267 | 199: 'Scotch terrier, Scottish terrier, Scottie', 268 | 200: 'Tibetan terrier, chrysanthemum dog', 269 | 201: 'silky terrier, Sydney silky', 270 | 202: 'soft-coated wheaten terrier', 271 | 203: 'West Highland white terrier', 272 | 204: 'Lhasa, Lhasa apso', 273 | 205: 'flat-coated retriever', 274 | 206: 'curly-coated retriever', 275 | 207: 'golden retriever', 276 | 208: 'Labrador retriever', 277 | 209: 'Chesapeake Bay retriever', 278 | 210: 'German short-haired pointer', 279 | 211: 'vizsla, Hungarian pointer', 280 | 212: 'English setter', 281 | 213: 'Irish setter, red setter', 282 | 214: 'Gordon setter', 283 | 215: 'Brittany spaniel', 284 | 216: 'clumber, clumber spaniel', 285 | 217: 'English springer, English springer spaniel', 286 | 218: 'Welsh springer spaniel', 287 | 219: 'cocker spaniel, English cocker spaniel, cocker', 288 | 220: 'Sussex spaniel', 289 | 221: 'Irish water spaniel', 290 | 222: 'kuvasz', 291 | 223: 'schipperke', 292 | 224: 'groenendael', 293 | 225: 'malinois', 294 | 226: 'briard', 295 | 227: 'kelpie', 296 | 228: 'komondor', 297 | 229: 'Old English sheepdog, bobtail', 298 | 230: 'Shetland sheepdog, Shetland sheep dog, Shetland', 299 | 231: 'collie', 300 | 232: 'Border collie', 301 | 233: 'Bouvier des Flandres, Bouviers des Flandres', 302 | 234: 'Rottweiler', 303 | 235: 'German shepherd, German shepherd dog, German police dog, alsatian', 304 | 236: 'Doberman, Doberman pinscher', 305 | 237: 'miniature pinscher', 306 | 238: 'Greater Swiss Mountain dog', 307 | 239: 'Bernese mountain dog', 308 | 240: 'Appenzeller', 309 | 241: 'EntleBucher', 310 | 242: 'boxer', 311 | 243: 'bull mastiff', 312 | 244: 'Tibetan mastiff', 313 | 245: 'French bulldog', 314 | 246: 'Great Dane', 315 | 247: 'Saint Bernard, St Bernard', 316 | 248: 'Eskimo dog, husky', 317 | 249: 'malamute, malemute, Alaskan malamute', 318 | 250: 'Siberian husky', 319 | 251: 'dalmatian, coach dog, carriage dog', 320 | 252: 'affenpinscher, monkey pinscher, monkey dog', 321 | 253: 'basenji', 322 | 254: 'pug, pug-dog', 323 | 255: 'Leonberg', 324 | 256: 'Newfoundland, Newfoundland dog', 325 | 257: 'Great Pyrenees', 326 | 258: 'Samoyed, Samoyede', 327 | 259: 'Pomeranian', 328 | 260: 'chow, chow chow', 329 | 261: 'keeshond', 330 | 262: 'Brabancon griffon', 331 | 263: 'Pembroke, Pembroke Welsh corgi', 332 | 264: 'Cardigan, Cardigan Welsh corgi', 333 | 265: 'toy poodle', 334 | 266: 'miniature poodle', 335 | 267: 'standard poodle', 336 | 268: 'Mexican hairless', 337 | 269: 'timber wolf, grey wolf, gray wolf, Canis lupus', 338 | 270: 'white wolf, Arctic wolf, Canis lupus tundrarum', 339 | 271: 'red wolf, maned wolf, Canis rufus, Canis niger', 340 | 272: 'coyote, prairie wolf, brush wolf, Canis latrans', 341 | 273: 'dingo, warrigal, warragal, Canis dingo', 342 | 274: 'dhole, Cuon alpinus', 343 | 275: 'African hunting dog, hyena dog, Cape hunting dog, Lycaon pictus', 344 | 276: 'hyena, hyaena', 345 | 277: 'red fox, Vulpes vulpes', 346 | 278: 'kit fox, Vulpes macrotis', 347 | 279: 'Arctic fox, white fox, Alopex lagopus', 348 | 280: 'grey fox, gray fox, Urocyon cinereoargenteus', 349 | 281: 'tabby, tabby cat', 350 | 282: 'tiger cat', 351 | 283: 'Persian cat', 352 | 284: 'Siamese cat, Siamese', 353 | 285: 'Egyptian cat', 354 | 286: 'cougar, puma, catamount, mountain lion, painter, panther, ' + 355 | 'Felis concolor', 356 | 287: 'lynx, catamount', 357 | 288: 'leopard, Panthera pardus', 358 | 289: 'snow leopard, ounce, Panthera uncia', 359 | 290: 'jaguar, panther, Panthera onca, Felis onca', 360 | 291: 'lion, king of beasts, Panthera leo', 361 | 292: 'tiger, Panthera tigris', 362 | 293: 'cheetah, chetah, Acinonyx jubatus', 363 | 294: 'brown bear, bruin, Ursus arctos', 364 | 295: 'American black bear, black bear, Ursus americanus, Euarctos ' + 365 | 'americanus', 366 | 296: 'ice bear, polar bear, Ursus Maritimus, Thalarctos maritimus', 367 | 297: 'sloth bear, Melursus ursinus, Ursus ursinus', 368 | 298: 'mongoose', 369 | 299: 'meerkat, mierkat', 370 | 300: 'tiger beetle', 371 | 301: 'ladybug, ladybeetle, lady beetle, ladybird, ladybird beetle', 372 | 302: 'ground beetle, carabid beetle', 373 | 303: 'long-horned beetle, longicorn, longicorn beetle', 374 | 304: 'leaf beetle, chrysomelid', 375 | 305: 'dung beetle', 376 | 306: 'rhinoceros beetle', 377 | 307: 'weevil', 378 | 308: 'fly', 379 | 309: 'bee', 380 | 310: 'ant, emmet, pismire', 381 | 311: 'grasshopper, hopper', 382 | 312: 'cricket', 383 | 313: 'walking stick, walkingstick, stick insect', 384 | 314: 'cockroach, roach', 385 | 315: 'mantis, mantid', 386 | 316: 'cicada, cicala', 387 | 317: 'leafhopper', 388 | 318: 'lacewing, lacewing fly', 389 | 319: 'dragonfly, darning needle, devil\'s darning needle, sewing needle, ' + 390 | 'snake feeder, snake doctor, mosquito hawk, skeeter hawk', 391 | 320: 'damselfly', 392 | 321: 'admiral', 393 | 322: 'ringlet, ringlet butterfly', 394 | 323: 'monarch, monarch butterfly, milkweed butterfly, Danaus plexippus', 395 | 324: 'cabbage butterfly', 396 | 325: 'sulphur butterfly, sulfur butterfly', 397 | 326: 'lycaenid, lycaenid butterfly', 398 | 327: 'starfish, sea star', 399 | 328: 'sea urchin', 400 | 329: 'sea cucumber, holothurian', 401 | 330: 'wood rabbit, cottontail, cottontail rabbit', 402 | 331: 'hare', 403 | 332: 'Angora, Angora rabbit', 404 | 333: 'hamster', 405 | 334: 'porcupine, hedgehog', 406 | 335: 'fox squirrel, eastern fox squirrel, Sciurus niger', 407 | 336: 'marmot', 408 | 337: 'beaver', 409 | 338: 'guinea pig, Cavia cobaya', 410 | 339: 'sorrel', 411 | 340: 'zebra', 412 | 341: 'hog, pig, grunter, squealer, Sus scrofa', 413 | 342: 'wild boar, boar, Sus scrofa', 414 | 343: 'warthog', 415 | 344: 'hippopotamus, hippo, river horse, Hippopotamus amphibius', 416 | 345: 'ox', 417 | 346: 'water buffalo, water ox, Asiatic buffalo, Bubalus bubalis', 418 | 347: 'bison', 419 | 348: 'ram, tup', 420 | 349: 'bighorn, bighorn sheep, cimarron, Rocky Mountain bighorn, Rocky ' + 421 | 'Mountain sheep, Ovis canadensis', 422 | 350: 'ibex, Capra ibex', 423 | 351: 'hartebeest', 424 | 352: 'impala, Aepyceros melampus', 425 | 353: 'gazelle', 426 | 354: 'Arabian camel, dromedary, Camelus dromedarius', 427 | 355: 'llama', 428 | 356: 'weasel', 429 | 357: 'mink', 430 | 358: 'polecat, fitch, foulmart, foumart, Mustela putorius', 431 | 359: 'black-footed ferret, ferret, Mustela nigripes', 432 | 360: 'otter', 433 | 361: 'skunk, polecat, wood pussy', 434 | 362: 'badger', 435 | 363: 'armadillo', 436 | 364: 'three-toed sloth, ai, Bradypus tridactylus', 437 | 365: 'orangutan, orang, orangutang, Pongo pygmaeus', 438 | 366: 'gorilla, Gorilla gorilla', 439 | 367: 'chimpanzee, chimp, Pan troglodytes', 440 | 368: 'gibbon, Hylobates lar', 441 | 369: 'siamang, Hylobates syndactylus, Symphalangus syndactylus', 442 | 370: 'guenon, guenon monkey', 443 | 371: 'patas, hussar monkey, Erythrocebus patas', 444 | 372: 'baboon', 445 | 373: 'macaque', 446 | 374: 'langur', 447 | 375: 'colobus, colobus monkey', 448 | 376: 'proboscis monkey, Nasalis larvatus', 449 | 377: 'marmoset', 450 | 378: 'capuchin, ringtail, Cebus capucinus', 451 | 379: 'howler monkey, howler', 452 | 380: 'titi, titi monkey', 453 | 381: 'spider monkey, Ateles geoffroyi', 454 | 382: 'squirrel monkey, Saimiri sciureus', 455 | 383: 'Madagascar cat, ring-tailed lemur, Lemur catta', 456 | 384: 'indri, indris, Indri indri, Indri brevicaudatus', 457 | 385: 'Indian elephant, Elephas maximus', 458 | 386: 'African elephant, Loxodonta africana', 459 | 387: 'lesser panda, red panda, panda, bear cat, cat bear, Ailurus fulgens', 460 | 388: 'giant panda, panda, panda bear, coon bear, Ailuropoda melanoleuca', 461 | 389: 'barracouta, snoek', 462 | 390: 'eel', 463 | 391: 'coho, cohoe, coho salmon, blue jack, silver salmon, Oncorhynchus ' + 464 | 'kisutch', 465 | 392: 'rock beauty, Holocanthus tricolor', 466 | 393: 'anemone fish', 467 | 394: 'sturgeon', 468 | 395: 'gar, garfish, garpike, billfish, Lepisosteus osseus', 469 | 396: 'lionfish', 470 | 397: 'puffer, pufferfish, blowfish, globefish', 471 | 398: 'abacus', 472 | 399: 'abaya', 473 | 400: 'academic gown, academic robe, judge\'s robe', 474 | 401: 'accordion, piano accordion, squeeze box', 475 | 402: 'acoustic guitar', 476 | 403: 'aircraft carrier, carrier, flattop, attack aircraft carrier', 477 | 404: 'airliner', 478 | 405: 'airship, dirigible', 479 | 406: 'altar', 480 | 407: 'ambulance', 481 | 408: 'amphibian, amphibious vehicle', 482 | 409: 'analog clock', 483 | 410: 'apiary, bee house', 484 | 411: 'apron', 485 | 412: 'ashcan, trash can, garbage can, wastebin, ash bin, ash-bin, ashbin, ' + 486 | 'dustbin, trash barrel, trash bin', 487 | 413: 'assault rifle, assault gun', 488 | 414: 'backpack, back pack, knapsack, packsack, rucksack, haversack', 489 | 415: 'bakery, bakeshop, bakehouse', 490 | 416: 'balance beam, beam', 491 | 417: 'balloon', 492 | 418: 'ballpoint, ballpoint pen, ballpen, Biro', 493 | 419: 'Band Aid', 494 | 420: 'banjo', 495 | 421: 'bannister, banister, balustrade, balusters, handrail', 496 | 422: 'barbell', 497 | 423: 'barber chair', 498 | 424: 'barbershop', 499 | 425: 'barn', 500 | 426: 'barometer', 501 | 427: 'barrel, cask', 502 | 428: 'barrow, garden cart, lawn cart, wheelbarrow', 503 | 429: 'baseball', 504 | 430: 'basketball', 505 | 431: 'bassinet', 506 | 432: 'bassoon', 507 | 433: 'bathing cap, swimming cap', 508 | 434: 'bath towel', 509 | 435: 'bathtub, bathing tub, bath, tub', 510 | 436: 'beach wagon, station wagon, wagon, estate car, beach waggon, station ' + 511 | 'waggon, waggon', 512 | 437: 'beacon, lighthouse, beacon light, pharos', 513 | 438: 'beaker', 514 | 439: 'bearskin, busby, shako', 515 | 440: 'beer bottle', 516 | 441: 'beer glass', 517 | 442: 'bell cote, bell cot', 518 | 443: 'bib', 519 | 444: 'bicycle-built-for-two, tandem bicycle, tandem', 520 | 445: 'bikini, two-piece', 521 | 446: 'binder, ring-binder', 522 | 447: 'binoculars, field glasses, opera glasses', 523 | 448: 'birdhouse', 524 | 449: 'boathouse', 525 | 450: 'bobsled, bobsleigh, bob', 526 | 451: 'bolo tie, bolo, bola tie, bola', 527 | 452: 'bonnet, poke bonnet', 528 | 453: 'bookcase', 529 | 454: 'bookshop, bookstore, bookstall', 530 | 455: 'bottlecap', 531 | 456: 'bow', 532 | 457: 'bow tie, bow-tie, bowtie', 533 | 458: 'brass, memorial tablet, plaque', 534 | 459: 'brassiere, bra, bandeau', 535 | 460: 'breakwater, groin, groyne, mole, bulwark, seawall, jetty', 536 | 461: 'breastplate, aegis, egis', 537 | 462: 'broom', 538 | 463: 'bucket, pail', 539 | 464: 'buckle', 540 | 465: 'bulletproof vest', 541 | 466: 'bullet train, bullet', 542 | 467: 'butcher shop, meat market', 543 | 468: 'cab, hack, taxi, taxicab', 544 | 469: 'caldron, cauldron', 545 | 470: 'candle, taper, wax light', 546 | 471: 'cannon', 547 | 472: 'canoe', 548 | 473: 'can opener, tin opener', 549 | 474: 'cardigan', 550 | 475: 'car mirror', 551 | 476: 'carousel, carrousel, merry-go-round, roundabout, whirligig', 552 | 477: 'carpenter\'s kit, tool kit', 553 | 478: 'carton', 554 | 479: 'car wheel', 555 | 480: 'cash machine, cash dispenser, automated teller machine, automatic ' + 556 | 'teller machine, automated teller, automatic teller, ATM', 557 | 481: 'cassette', 558 | 482: 'cassette player', 559 | 483: 'castle', 560 | 484: 'catamaran', 561 | 485: 'CD player', 562 | 486: 'cello, violoncello', 563 | 487: 'cellular telephone, cellular phone, cellphone, cell, mobile phone', 564 | 488: 'chain', 565 | 489: 'chainlink fence', 566 | 490: 'chain mail, ring mail, mail, chain armor, chain armour, ring armor, ' + 567 | 'ring armour', 568 | 491: 'chain saw, chainsaw', 569 | 492: 'chest', 570 | 493: 'chiffonier, commode', 571 | 494: 'chime, bell, gong', 572 | 495: 'china cabinet, china closet', 573 | 496: 'Christmas stocking', 574 | 497: 'church, church building', 575 | 498: 'cinema, movie theater, movie theatre, movie house, picture palace', 576 | 499: 'cleaver, meat cleaver, chopper', 577 | 500: 'cliff dwelling', 578 | 501: 'cloak', 579 | 502: 'clog, geta, patten, sabot', 580 | 503: 'cocktail shaker', 581 | 504: 'coffee mug', 582 | 505: 'coffeepot', 583 | 506: 'coil, spiral, volute, whorl, helix', 584 | 507: 'combination lock', 585 | 508: 'computer keyboard, keypad', 586 | 509: 'confectionery, confectionary, candy store', 587 | 510: 'container ship, containership, container vessel', 588 | 511: 'convertible', 589 | 512: 'corkscrew, bottle screw', 590 | 513: 'cornet, horn, trumpet, trump', 591 | 514: 'cowboy boot', 592 | 515: 'cowboy hat, ten-gallon hat', 593 | 516: 'cradle', 594 | 517: 'crane', 595 | 518: 'crash helmet', 596 | 519: 'crate', 597 | 520: 'crib, cot', 598 | 521: 'Crock Pot', 599 | 522: 'croquet ball', 600 | 523: 'crutch', 601 | 524: 'cuirass', 602 | 525: 'dam, dike, dyke', 603 | 526: 'desk', 604 | 527: 'desktop computer', 605 | 528: 'dial telephone, dial phone', 606 | 529: 'diaper, nappy, napkin', 607 | 530: 'digital clock', 608 | 531: 'digital watch', 609 | 532: 'dining table, board', 610 | 533: 'dishrag, dishcloth', 611 | 534: 'dishwasher, dish washer, dishwashing machine', 612 | 535: 'disk brake, disc brake', 613 | 536: 'dock, dockage, docking facility', 614 | 537: 'dogsled, dog sled, dog sleigh', 615 | 538: 'dome', 616 | 539: 'doormat, welcome mat', 617 | 540: 'drilling platform, offshore rig', 618 | 541: 'drum, membranophone, tympan', 619 | 542: 'drumstick', 620 | 543: 'dumbbell', 621 | 544: 'Dutch oven', 622 | 545: 'electric fan, blower', 623 | 546: 'electric guitar', 624 | 547: 'electric locomotive', 625 | 548: 'entertainment center', 626 | 549: 'envelope', 627 | 550: 'espresso maker', 628 | 551: 'face powder', 629 | 552: 'feather boa, boa', 630 | 553: 'file, file cabinet, filing cabinet', 631 | 554: 'fireboat', 632 | 555: 'fire engine, fire truck', 633 | 556: 'fire screen, fireguard', 634 | 557: 'flagpole, flagstaff', 635 | 558: 'flute, transverse flute', 636 | 559: 'folding chair', 637 | 560: 'football helmet', 638 | 561: 'forklift', 639 | 562: 'fountain', 640 | 563: 'fountain pen', 641 | 564: 'four-poster', 642 | 565: 'freight car', 643 | 566: 'French horn, horn', 644 | 567: 'frying pan, frypan, skillet', 645 | 568: 'fur coat', 646 | 569: 'garbage truck, dustcart', 647 | 570: 'gasmask, respirator, gas helmet', 648 | 571: 'gas pump, gasoline pump, petrol pump, island dispenser', 649 | 572: 'goblet', 650 | 573: 'go-kart', 651 | 574: 'golf ball', 652 | 575: 'golfcart, golf cart', 653 | 576: 'gondola', 654 | 577: 'gong, tam-tam', 655 | 578: 'gown', 656 | 579: 'grand piano, grand', 657 | 580: 'greenhouse, nursery, glasshouse', 658 | 581: 'grille, radiator grille', 659 | 582: 'grocery store, grocery, food market, market', 660 | 583: 'guillotine', 661 | 584: 'hair slide', 662 | 585: 'hair spray', 663 | 586: 'half track', 664 | 587: 'hammer', 665 | 588: 'hamper', 666 | 589: 'hand blower, blow dryer, blow drier, hair dryer, hair drier', 667 | 590: 'hand-held computer, hand-held microcomputer', 668 | 591: 'handkerchief, hankie, hanky, hankey', 669 | 592: 'hard disc, hard disk, fixed disk', 670 | 593: 'harmonica, mouth organ, harp, mouth harp', 671 | 594: 'harp', 672 | 595: 'harvester, reaper', 673 | 596: 'hatchet', 674 | 597: 'holster', 675 | 598: 'home theater, home theatre', 676 | 599: 'honeycomb', 677 | 600: 'hook, claw', 678 | 601: 'hoopskirt, crinoline', 679 | 602: 'horizontal bar, high bar', 680 | 603: 'horse cart, horse-cart', 681 | 604: 'hourglass', 682 | 605: 'iPod', 683 | 606: 'iron, smoothing iron', 684 | 607: 'jack-o\'-lantern', 685 | 608: 'jean, blue jean, denim', 686 | 609: 'jeep, landrover', 687 | 610: 'jersey, T-shirt, tee shirt', 688 | 611: 'jigsaw puzzle', 689 | 612: 'jinrikisha, ricksha, rickshaw', 690 | 613: 'joystick', 691 | 614: 'kimono', 692 | 615: 'knee pad', 693 | 616: 'knot', 694 | 617: 'lab coat, laboratory coat', 695 | 618: 'ladle', 696 | 619: 'lampshade, lamp shade', 697 | 620: 'laptop, laptop computer', 698 | 621: 'lawn mower, mower', 699 | 622: 'lens cap, lens cover', 700 | 623: 'letter opener, paper knife, paperknife', 701 | 624: 'library', 702 | 625: 'lifeboat', 703 | 626: 'lighter, light, igniter, ignitor', 704 | 627: 'limousine, limo', 705 | 628: 'liner, ocean liner', 706 | 629: 'lipstick, lip rouge', 707 | 630: 'Loafer', 708 | 631: 'lotion', 709 | 632: 'loudspeaker, speaker, speaker unit, loudspeaker system, speaker ' + 710 | 'system', 711 | 633: 'loupe, jeweler\'s loupe', 712 | 634: 'lumbermill, sawmill', 713 | 635: 'magnetic compass', 714 | 636: 'mailbag, postbag', 715 | 637: 'mailbox, letter box', 716 | 638: 'maillot', 717 | 639: 'maillot, tank suit', 718 | 640: 'manhole cover', 719 | 641: 'maraca', 720 | 642: 'marimba, xylophone', 721 | 643: 'mask', 722 | 644: 'matchstick', 723 | 645: 'maypole', 724 | 646: 'maze, labyrinth', 725 | 647: 'measuring cup', 726 | 648: 'medicine chest, medicine cabinet', 727 | 649: 'megalith, megalithic structure', 728 | 650: 'microphone, mike', 729 | 651: 'microwave, microwave oven', 730 | 652: 'military uniform', 731 | 653: 'milk can', 732 | 654: 'minibus', 733 | 655: 'miniskirt, mini', 734 | 656: 'minivan', 735 | 657: 'missile', 736 | 658: 'mitten', 737 | 659: 'mixing bowl', 738 | 660: 'mobile home, manufactured home', 739 | 661: 'Model T', 740 | 662: 'modem', 741 | 663: 'monastery', 742 | 664: 'monitor', 743 | 665: 'moped', 744 | 666: 'mortar', 745 | 667: 'mortarboard', 746 | 668: 'mosque', 747 | 669: 'mosquito net', 748 | 670: 'motor scooter, scooter', 749 | 671: 'mountain bike, all-terrain bike, off-roader', 750 | 672: 'mountain tent', 751 | 673: 'mouse, computer mouse', 752 | 674: 'mousetrap', 753 | 675: 'moving van', 754 | 676: 'muzzle', 755 | 677: 'nail', 756 | 678: 'neck brace', 757 | 679: 'necklace', 758 | 680: 'nipple', 759 | 681: 'notebook, notebook computer', 760 | 682: 'obelisk', 761 | 683: 'oboe, hautboy, hautbois', 762 | 684: 'ocarina, sweet potato', 763 | 685: 'odometer, hodometer, mileometer, milometer', 764 | 686: 'oil filter', 765 | 687: 'organ, pipe organ', 766 | 688: 'oscilloscope, scope, cathode-ray oscilloscope, CRO', 767 | 689: 'overskirt', 768 | 690: 'oxcart', 769 | 691: 'oxygen mask', 770 | 692: 'packet', 771 | 693: 'paddle, boat paddle', 772 | 694: 'paddlewheel, paddle wheel', 773 | 695: 'padlock', 774 | 696: 'paintbrush', 775 | 697: 'pajama, pyjama, pj\'s, jammies', 776 | 698: 'palace', 777 | 699: 'panpipe, pandean pipe, syrinx', 778 | 700: 'paper towel', 779 | 701: 'parachute, chute', 780 | 702: 'parallel bars, bars', 781 | 703: 'park bench', 782 | 704: 'parking meter', 783 | 705: 'passenger car, coach, carriage', 784 | 706: 'patio, terrace', 785 | 707: 'pay-phone, pay-station', 786 | 708: 'pedestal, plinth, footstall', 787 | 709: 'pencil box, pencil case', 788 | 710: 'pencil sharpener', 789 | 711: 'perfume, essence', 790 | 712: 'Petri dish', 791 | 713: 'photocopier', 792 | 714: 'pick, plectrum, plectron', 793 | 715: 'pickelhaube', 794 | 716: 'picket fence, paling', 795 | 717: 'pickup, pickup truck', 796 | 718: 'pier', 797 | 719: 'piggy bank, penny bank', 798 | 720: 'pill bottle', 799 | 721: 'pillow', 800 | 722: 'ping-pong ball', 801 | 723: 'pinwheel', 802 | 724: 'pirate, pirate ship', 803 | 725: 'pitcher, ewer', 804 | 726: 'plane, carpenter\'s plane, woodworking plane', 805 | 727: 'planetarium', 806 | 728: 'plastic bag', 807 | 729: 'plate rack', 808 | 730: 'plow, plough', 809 | 731: 'plunger, plumber\'s helper', 810 | 732: 'Polaroid camera, Polaroid Land camera', 811 | 733: 'pole', 812 | 734: 'police van, police wagon, paddy wagon, patrol wagon, wagon, black ' + 813 | 'Maria', 814 | 735: 'poncho', 815 | 736: 'pool table, billiard table, snooker table', 816 | 737: 'pop bottle, soda bottle', 817 | 738: 'pot, flowerpot', 818 | 739: 'potter\'s wheel', 819 | 740: 'power drill', 820 | 741: 'prayer rug, prayer mat', 821 | 742: 'printer', 822 | 743: 'prison, prison house', 823 | 744: 'projectile, missile', 824 | 745: 'projector', 825 | 746: 'puck, hockey puck', 826 | 747: 'punching bag, punch bag, punching ball, punchball', 827 | 748: 'purse', 828 | 749: 'quill, quill pen', 829 | 750: 'quilt, comforter, comfort, puff', 830 | 751: 'racer, race car, racing car', 831 | 752: 'racket, racquet', 832 | 753: 'radiator', 833 | 754: 'radio, wireless', 834 | 755: 'radio telescope, radio reflector', 835 | 756: 'rain barrel', 836 | 757: 'recreational vehicle, RV, R.V.', 837 | 758: 'reel', 838 | 759: 'reflex camera', 839 | 760: 'refrigerator, icebox', 840 | 761: 'remote control, remote', 841 | 762: 'restaurant, eating house, eating place, eatery', 842 | 763: 'revolver, six-gun, six-shooter', 843 | 764: 'rifle', 844 | 765: 'rocking chair, rocker', 845 | 766: 'rotisserie', 846 | 767: 'rubber eraser, rubber, pencil eraser', 847 | 768: 'rugby ball', 848 | 769: 'rule, ruler', 849 | 770: 'running shoe', 850 | 771: 'safe', 851 | 772: 'safety pin', 852 | 773: 'saltshaker, salt shaker', 853 | 774: 'sandal', 854 | 775: 'sarong', 855 | 776: 'sax, saxophone', 856 | 777: 'scabbard', 857 | 778: 'scale, weighing machine', 858 | 779: 'school bus', 859 | 780: 'schooner', 860 | 781: 'scoreboard', 861 | 782: 'screen, CRT screen', 862 | 783: 'screw', 863 | 784: 'screwdriver', 864 | 785: 'seat belt, seatbelt', 865 | 786: 'sewing machine', 866 | 787: 'shield, buckler', 867 | 788: 'shoe shop, shoe-shop, shoe store', 868 | 789: 'shoji', 869 | 790: 'shopping basket', 870 | 791: 'shopping cart', 871 | 792: 'shovel', 872 | 793: 'shower cap', 873 | 794: 'shower curtain', 874 | 795: 'ski', 875 | 796: 'ski mask', 876 | 797: 'sleeping bag', 877 | 798: 'slide rule, slipstick', 878 | 799: 'sliding door', 879 | 800: 'slot, one-armed bandit', 880 | 801: 'snorkel', 881 | 802: 'snowmobile', 882 | 803: 'snowplow, snowplough', 883 | 804: 'soap dispenser', 884 | 805: 'soccer ball', 885 | 806: 'sock', 886 | 807: 'solar dish, solar collector, solar furnace', 887 | 808: 'sombrero', 888 | 809: 'soup bowl', 889 | 810: 'space bar', 890 | 811: 'space heater', 891 | 812: 'space shuttle', 892 | 813: 'spatula', 893 | 814: 'speedboat', 894 | 815: 'spider web, spider\'s web', 895 | 816: 'spindle', 896 | 817: 'sports car, sport car', 897 | 818: 'spotlight, spot', 898 | 819: 'stage', 899 | 820: 'steam locomotive', 900 | 821: 'steel arch bridge', 901 | 822: 'steel drum', 902 | 823: 'stethoscope', 903 | 824: 'stole', 904 | 825: 'stone wall', 905 | 826: 'stopwatch, stop watch', 906 | 827: 'stove', 907 | 828: 'strainer', 908 | 829: 'streetcar, tram, tramcar, trolley, trolley car', 909 | 830: 'stretcher', 910 | 831: 'studio couch, day bed', 911 | 832: 'stupa, tope', 912 | 833: 'submarine, pigboat, sub, U-boat', 913 | 834: 'suit, suit of clothes', 914 | 835: 'sundial', 915 | 836: 'sunglass', 916 | 837: 'sunglasses, dark glasses, shades', 917 | 838: 'sunscreen, sunblock, sun blocker', 918 | 839: 'suspension bridge', 919 | 840: 'swab, swob, mop', 920 | 841: 'sweatshirt', 921 | 842: 'swimming trunks, bathing trunks', 922 | 843: 'swing', 923 | 844: 'switch, electric switch, electrical switch', 924 | 845: 'syringe', 925 | 846: 'table lamp', 926 | 847: 'tank, army tank, armored combat vehicle, armoured combat vehicle', 927 | 848: 'tape player', 928 | 849: 'teapot', 929 | 850: 'teddy, teddy bear', 930 | 851: 'television, television system', 931 | 852: 'tennis ball', 932 | 853: 'thatch, thatched roof', 933 | 854: 'theater curtain, theatre curtain', 934 | 855: 'thimble', 935 | 856: 'thresher, thrasher, threshing machine', 936 | 857: 'throne', 937 | 858: 'tile roof', 938 | 859: 'toaster', 939 | 860: 'tobacco shop, tobacconist shop, tobacconist', 940 | 861: 'toilet seat', 941 | 862: 'torch', 942 | 863: 'totem pole', 943 | 864: 'tow truck, tow car, wrecker', 944 | 865: 'toyshop', 945 | 866: 'tractor', 946 | 867: 'trailer truck, tractor trailer, trucking rig, rig, articulated ' + 947 | 'lorry, semi', 948 | 868: 'tray', 949 | 869: 'trench coat', 950 | 870: 'tricycle, trike, velocipede', 951 | 871: 'trimaran', 952 | 872: 'tripod', 953 | 873: 'triumphal arch', 954 | 874: 'trolleybus, trolley coach, trackless trolley', 955 | 875: 'trombone', 956 | 876: 'tub, vat', 957 | 877: 'turnstile', 958 | 878: 'typewriter keyboard', 959 | 879: 'umbrella', 960 | 880: 'unicycle, monocycle', 961 | 881: 'upright, upright piano', 962 | 882: 'vacuum, vacuum cleaner', 963 | 883: 'vase', 964 | 884: 'vault', 965 | 885: 'velvet', 966 | 886: 'vending machine', 967 | 887: 'vestment', 968 | 888: 'viaduct', 969 | 889: 'violin, fiddle', 970 | 890: 'volleyball', 971 | 891: 'waffle iron', 972 | 892: 'wall clock', 973 | 893: 'wallet, billfold, notecase, pocketbook', 974 | 894: 'wardrobe, closet, press', 975 | 895: 'warplane, military plane', 976 | 896: 'washbasin, handbasin, washbowl, lavabo, wash-hand basin', 977 | 897: 'washer, automatic washer, washing machine', 978 | 898: 'water bottle', 979 | 899: 'water jug', 980 | 900: 'water tower', 981 | 901: 'whiskey jug', 982 | 902: 'whistle', 983 | 903: 'wig', 984 | 904: 'window screen', 985 | 905: 'window shade', 986 | 906: 'Windsor tie', 987 | 907: 'wine bottle', 988 | 908: 'wing', 989 | 909: 'wok', 990 | 910: 'wooden spoon', 991 | 911: 'wool, woolen, woollen', 992 | 912: 'worm fence, snake fence, snake-rail fence, Virginia fence', 993 | 913: 'wreck', 994 | 914: 'yawl', 995 | 915: 'yurt', 996 | 916: 'web site, website, internet site, site', 997 | 917: 'comic book', 998 | 918: 'crossword puzzle, crossword', 999 | 919: 'street sign', 1000 | 920: 'traffic light, traffic signal, stoplight', 1001 | 921: 'book jacket, dust cover, dust jacket, dust wrapper', 1002 | 922: 'menu', 1003 | 923: 'plate', 1004 | 924: 'guacamole', 1005 | 925: 'consomme', 1006 | 926: 'hot pot, hotpot', 1007 | 927: 'trifle', 1008 | 928: 'ice cream, icecream', 1009 | 929: 'ice lolly, lolly, lollipop, popsicle', 1010 | 930: 'French loaf', 1011 | 931: 'bagel, beigel', 1012 | 932: 'pretzel', 1013 | 933: 'cheeseburger', 1014 | 934: 'hotdog, hot dog, red hot', 1015 | 935: 'mashed potato', 1016 | 936: 'head cabbage', 1017 | 937: 'broccoli', 1018 | 938: 'cauliflower', 1019 | 939: 'zucchini, courgette', 1020 | 940: 'spaghetti squash', 1021 | 941: 'acorn squash', 1022 | 942: 'butternut squash', 1023 | 943: 'cucumber, cuke', 1024 | 944: 'artichoke, globe artichoke', 1025 | 945: 'bell pepper', 1026 | 946: 'cardoon', 1027 | 947: 'mushroom', 1028 | 948: 'Granny Smith', 1029 | 949: 'strawberry', 1030 | 950: 'orange', 1031 | 951: 'lemon', 1032 | 952: 'fig', 1033 | 953: 'pineapple, ananas', 1034 | 954: 'banana', 1035 | 955: 'jackfruit, jak, jack', 1036 | 956: 'custard apple', 1037 | 957: 'pomegranate', 1038 | 958: 'hay', 1039 | 959: 'carbonara', 1040 | 960: 'chocolate sauce, chocolate syrup', 1041 | 961: 'dough', 1042 | 962: 'meat loaf, meatloaf', 1043 | 963: 'pizza, pizza pie', 1044 | 964: 'potpie', 1045 | 965: 'burrito', 1046 | 966: 'red wine', 1047 | 967: 'espresso', 1048 | 968: 'cup', 1049 | 969: 'eggnog', 1050 | 970: 'alp', 1051 | 971: 'bubble', 1052 | 972: 'cliff, drop, drop-off', 1053 | 973: 'coral reef', 1054 | 974: 'geyser', 1055 | 975: 'lakeside, lakeshore', 1056 | 976: 'promontory, headland, head, foreland', 1057 | 977: 'sandbar, sand bar', 1058 | 978: 'seashore, coast, seacoast, sea-coast', 1059 | 979: 'valley, vale', 1060 | 980: 'volcano', 1061 | 981: 'ballplayer, baseball player', 1062 | 982: 'groom, bridegroom', 1063 | 983: 'scuba diver', 1064 | 984: 'rapeseed', 1065 | 985: 'daisy', 1066 | 986: 'yellow lady\'s slipper, yellow lady-slipper, Cypripedium calceolus, ' + 1067 | 'Cypripedium parviflorum', 1068 | 987: 'corn', 1069 | 988: 'acorn', 1070 | 989: 'hip, rose hip, rosehip', 1071 | 990: 'buckeye, horse chestnut, conker', 1072 | 991: 'coral fungus', 1073 | 992: 'agaric', 1074 | 993: 'gyromitra', 1075 | 994: 'stinkhorn, carrion fungus', 1076 | 995: 'earthstar', 1077 | 996: 'hen-of-the-woods, hen of the woods, Polyporus frondosus, Grifola ' + 1078 | 'frondosa', 1079 | 997: 'bolete', 1080 | 998: 'ear, spike, capitulum', 1081 | 999: 'toilet tissue, toilet paper, bathroom tissue' 1082 | }; 1083 | var BASE_PATH = 'http://storage.codelab.club/tfjs-models/tfjs/'; 1084 | var IMAGE_SIZE = 224; 1085 | function load(version, alpha) { 1086 | if (version === void 0) { version = 1; } 1087 | if (alpha === void 0) { alpha = 1.0; } 1088 | return __awaiter(this, void 0, void 0, function () { 1089 | var mobilenet; 1090 | return __generator(this, function (_a) { 1091 | switch (_a.label) { 1092 | case 0: 1093 | if (tf == null) { 1094 | throw new Error("Cannot find TensorFlow.js. If you are using a