edge-impulse-linux 1.16.1 → 1.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/build/cli/linux/linux.js +1 -0
  2. package/build/cli/linux/linux.js.map +1 -1
  3. package/build/cli/linux/runner-downloader.d.ts +1 -0
  4. package/build/cli/linux/runner-downloader.js +10 -0
  5. package/build/cli/linux/runner-downloader.js.map +1 -1
  6. package/build/cli/linux/runner-profiling.d.ts +10 -0
  7. package/build/cli/linux/runner-profiling.js +72 -0
  8. package/build/cli/linux/runner-profiling.js.map +1 -0
  9. package/build/cli/linux/runner-utils.js +10 -64
  10. package/build/cli/linux/runner-utils.js.map +1 -1
  11. package/build/cli/linux/runner.js +15 -1
  12. package/build/cli/linux/runner.js.map +1 -1
  13. package/build/cli/linux/webserver/public/inference-server.js +92 -83
  14. package/build/cli/linux/webserver/public/inference-server.js.map +1 -1
  15. package/build/cli-common/model-monitor.d.ts +1 -2
  16. package/build/cli-common/model-monitor.js +5 -5
  17. package/build/cli-common/model-monitor.js.map +1 -1
  18. package/build/cli-common/remote-mgmt-service.d.ts +1 -1
  19. package/build/library/async-pool.d.ts +1 -0
  20. package/build/library/async-pool.js +21 -0
  21. package/build/library/async-pool.js.map +1 -0
  22. package/build/library/classifier/image-classifier.d.ts +12 -2
  23. package/build/library/classifier/image-classifier.js +37 -7
  24. package/build/library/classifier/image-classifier.js.map +1 -1
  25. package/build/library/classifier/libcwrapper.d.ts +26 -0
  26. package/build/library/classifier/libcwrapper.js +37 -0
  27. package/build/library/classifier/libcwrapper.js.map +1 -0
  28. package/build/library/classifier/linux-impulse-runner-types.d.ts +177 -0
  29. package/build/library/classifier/linux-impulse-runner-types.js +28 -0
  30. package/build/library/classifier/linux-impulse-runner-types.js.map +1 -0
  31. package/build/library/classifier/linux-impulse-runner.d.ts +20 -120
  32. package/build/library/classifier/linux-impulse-runner.js +172 -47
  33. package/build/library/classifier/linux-impulse-runner.js.map +1 -1
  34. package/build/library/classifier/valgrind-suppression.d.ts +1 -0
  35. package/build/library/classifier/valgrind-suppression.js +64 -0
  36. package/build/library/classifier/valgrind-suppression.js.map +1 -0
  37. package/build/library/moving-average-filter.d.ts +1 -1
  38. package/build/library/sensors/gstreamer.d.ts +12 -5
  39. package/build/library/sensors/gstreamer.js +217 -66
  40. package/build/library/sensors/gstreamer.js.map +1 -1
  41. package/build/library/sensors/icamera.d.ts +3 -1
  42. package/build/library/sensors/imagesnap.d.ts +2 -0
  43. package/build/library/sensors/imagesnap.js +2 -0
  44. package/build/library/sensors/imagesnap.js.map +1 -1
  45. package/build/library/sensors/prophesee.d.ts +2 -0
  46. package/build/library/sensors/prophesee.js +1 -0
  47. package/build/library/sensors/prophesee.js.map +1 -1
  48. package/build/library/sensors/sensors-helper.d.ts +1 -0
  49. package/build/library/sensors/sensors-helper.js +1 -1
  50. package/build/library/sensors/sensors-helper.js.map +1 -1
  51. package/build/sdk/studio/sdk/api/classifyApi.d.ts +64 -0
  52. package/build/sdk/studio/sdk/api/classifyApi.js +128 -0
  53. package/build/sdk/studio/sdk/api/classifyApi.js.map +1 -1
  54. package/build/sdk/studio/sdk/api/postProcessingApi.d.ts +5 -4
  55. package/build/sdk/studio/sdk/api/postProcessingApi.js +12 -12
  56. package/build/sdk/studio/sdk/api/postProcessingApi.js.map +1 -1
  57. package/build/sdk/studio/sdk/api/testApi.d.ts +16 -0
  58. package/build/sdk/studio/sdk/api/testApi.js +90 -0
  59. package/build/sdk/studio/sdk/api/testApi.js.map +1 -1
  60. package/build/sdk/studio/sdk/model/models.d.ts +2 -0
  61. package/build/sdk/studio/sdk/model/models.js +6 -0
  62. package/build/sdk/studio/sdk/model/models.js.map +1 -1
  63. package/build/sdk/studio/sdk/model/permission.d.ts +1 -1
  64. package/build/sdk/studio/sdk/model/permission.js +1 -1
  65. package/build/sdk/studio/sdk/model/permission.js.map +1 -1
  66. package/build/sdk/studio/sdk/model/postProcessingFeaturesForSampleRequest.d.ts +28 -0
  67. package/build/sdk/studio/sdk/model/postProcessingFeaturesForSampleRequest.js +34 -0
  68. package/build/sdk/studio/sdk/model/postProcessingFeaturesForSampleRequest.js.map +1 -0
  69. package/build/sdk/studio/sdk/model/uploadVersionArchiveRequest.d.ts +34 -0
  70. package/build/sdk/studio/sdk/model/uploadVersionArchiveRequest.js +29 -0
  71. package/build/sdk/studio/sdk/model/uploadVersionArchiveRequest.js.map +1 -0
  72. package/build/shared/views/project/bounding-box-scaling.d.ts +66 -0
  73. package/build/shared/views/project/bounding-box-scaling.js +155 -0
  74. package/build/shared/views/project/bounding-box-scaling.js.map +1 -0
  75. package/cli/linux/webserver/public/assets/mobileclient.css +5 -0
  76. package/cli/linux/webserver/public/inference-server.js +100 -89
  77. package/examples/js/classify-camera.js +1 -3
  78. package/examples/ts/classify-camera.ts +1 -3
  79. package/package.json +2 -1
  80. package/test/gstreamer.test.ts +28 -23
  81. package/examples/ts/classify-custom-from-test.ts +0 -96
@@ -1,96 +0,0 @@
1
- import { LinuxImpulseRunner } from "../../library";
2
- import fs from 'fs';
3
-
4
- // This script expects two arguments:
5
- // 1. The model file
6
- // 2. A features file with raw data. You can get this by going to **Live classification > Load sample**
7
- // then copy the features from the 'Raw features' block.
8
-
9
- (async () => {
10
- try {
11
- if (!process.argv[2]) {
12
- console.log('Missing one argument (model file)');
13
- process.exit(1);
14
- }
15
-
16
- if (!process.argv[3]) {
17
- console.log('Missing second argument (features file)');
18
- process.exit(1);
19
- }
20
-
21
- // Load the model
22
- let runner = new LinuxImpulseRunner(process.argv[2]);
23
- let model = await runner.init();
24
-
25
- const windowLengthMs = ((model.modelParameters.input_features_count /
26
- model.modelParameters.frequency /
27
- model.modelParameters.axis_count) * 1000);
28
-
29
- console.log('Starting the custom classifier for',
30
- model.project.owner + ' / ' + model.project.name, '(v' + model.project.deploy_version + ')');
31
- console.log('Parameters', 'freq', model.modelParameters.frequency + 'Hz',
32
- 'window length', windowLengthMs + 'ms.',
33
- 'classes', model.modelParameters.labels);
34
-
35
- // read the features file (comma separated numbers)
36
- // Newlines deliminate samples
37
- // Create an array of array of Numbers. Each inner array is a sample.
38
- let samples = (<string>await fs.promises.readFile(process.argv[3], 'utf-8'))
39
- .trim().split('\n').map(line => line.split(',').map(n => Number(n)));
40
-
41
- for (let features of samples) {
42
- // and classify the data, this should match the classification in the Studio
43
- let res = await runner.classify(features);
44
-
45
- console.log('Begin output');
46
- if (res.result.classification) {
47
- let ret: number[] = [];
48
- for (let k of Object.keys(res.result.classification)) {
49
- ret.push(res.result.classification[k]);
50
- }
51
- if (typeof res.result.visual_anomaly_max === 'number') {
52
- ret.push(res.result.visual_anomaly_max);
53
- }
54
- else if (typeof res.result.anomaly === 'number') {
55
- ret.push(res.result.anomaly);
56
- }
57
- console.log('[' + ret.map(x => x.toFixed(5)).join(', ') + ']');
58
- }
59
- if (res.result.bounding_boxes) {
60
- for (let bb of res.result.bounding_boxes) {
61
- if (bb.value === 0) {
62
- continue;
63
- }
64
- console.log(`${bb.label} (${bb.value.toFixed(5)}) ` +
65
- `[ x: ${bb.x}, y: ${bb.y}, width: ${bb.width}, height: ${bb.height} ]`);
66
- }
67
- }
68
- if (res.result.visual_anomaly_grid) {
69
- for (let bb of res.result.visual_anomaly_grid) {
70
- console.log(`${bb.label} (${bb.value.toFixed(5)}) ` +
71
- `[ x: ${bb.x}, y: ${bb.y}, width: ${bb.width}, height: ${bb.height} ]`);
72
- }
73
- }
74
- console.log('End output');
75
-
76
- // if you want to fill in data on the fly you can also do this; e.g. if you have 3-axis accelerometer
77
- // with 2 second window and 100Hz, then input_features_count=600, axis_count=3
78
- // let features = [];
79
- // for (let ix = 0; ix <
80
- // model.modelParameters.input_features_count; ix += model.modelParameters.axis_count) {
81
- // features.push(x);
82
- // features.push(y);
83
- // features.push(z);
84
- // }
85
- // and classify features
86
- }
87
- await runner.stop();
88
- }
89
- catch (ex) {
90
- console.error(ex);
91
- process.exit(1);
92
- }
93
- finally {
94
- process.exit(0);
95
- }
96
- })();