SsdMobilenetv1Options.js 1.3 KB

1234567891011121314151617181920212223242526272829
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var SsdMobilenetv1Options = /** @class */ (function () {
  4. function SsdMobilenetv1Options(_a) {
  5. var _b = _a === void 0 ? {} : _a, minConfidence = _b.minConfidence, maxResults = _b.maxResults;
  6. this._name = 'SsdMobilenetv1Options';
  7. this._minConfidence = minConfidence || 0.5;
  8. this._maxResults = maxResults || 100;
  9. if (typeof this._minConfidence !== 'number' || this._minConfidence <= 0 || this._minConfidence >= 1) {
  10. throw new Error(this._name + " - expected minConfidence to be a number between 0 and 1");
  11. }
  12. if (typeof this._maxResults !== 'number') {
  13. throw new Error(this._name + " - expected maxResults to be a number");
  14. }
  15. }
  16. Object.defineProperty(SsdMobilenetv1Options.prototype, "minConfidence", {
  17. get: function () { return this._minConfidence; },
  18. enumerable: true,
  19. configurable: true
  20. });
  21. Object.defineProperty(SsdMobilenetv1Options.prototype, "maxResults", {
  22. get: function () { return this._maxResults; },
  23. enumerable: true,
  24. configurable: true
  25. });
  26. return SsdMobilenetv1Options;
  27. }());
  28. exports.SsdMobilenetv1Options = SsdMobilenetv1Options;
  29. //# sourceMappingURL=SsdMobilenetv1Options.js.map