Using custom sensors on Raspberry Pi 4

Hello,

We are working on an industrial solution using Edge Impulse, we’ve reached the part where we want to deploy the model on an Industrial Shields Raspberry Pi 4 PLC and we need some help.

I’ve followed the tutorial for setting up Edge Impulse on Raspberry Pi: https://docs.edgeimpulse.com/docs/raspberry-pi-4 and I want to integrate it with our own sensors (an accelerometer). I’ve also followed the instructions here: https://docs.edgeimpulse.com/docs/linux-python-sdk and I managed to run this example to send data to the Project: https://github.com/edgeimpulse/linux-sdk-python/blob/master/examples/custom/collect.py

I’ve downloaded the .eim model from Edge Impulse (the Linux (ARMv7) version for Raspberry Pi 4) but I get an error when I run this example:

pi@raspberrypi:~ $ python3 classify.py predictive-maintenance-linux-armv7-v2.eim features.txt 
MODEL: /home/pi/predictive-maintenance-linux-armv7-v2.eim
Loaded runner for "Alexandra Covor / Predictive-Maintenance"
Traceback (most recent call last):
  File "classify.py", line 70, in <module>
    main(sys.argv[1:])
  File "classify.py", line 59, in main
    res = runner.classify(features)
  File "/home/pi/.local/lib/python3.7/site-packages/edge_impulse_linux/runner.py", line 60, in classify
    return self.send_msg(msg)
  File "/home/pi/.local/lib/python3.7/site-packages/edge_impulse_linux/runner.py", line 103, in send_msg
    raise Exception('Wrong id, expected: ' + str(ix) + ' but got ' + resp["id"])
TypeError: 'NoneType' object is not subscriptable

I’ve also tried to run it using the edge-impulse-linux-runner but failed to do so:

pi@raspberrypi:~ $ edge-impulse-linux-runner --model-file predictive-maintenance-linux-armv7-v2.eim 
[RUN] Failed to run impulse Error: Invalid sensorType: accelerometer
    at /usr/lib/node_modules/edge-impulse-linux/build/cli/linux/runner.js:255:19
    at processTicksAndRejections (internal/process/task_queues.js:95:5)

I’m kind of stuck so I would really appreciate your help with this.

Thanks,
Alexandra

Hello @alexandra.covor,

How did you get your features.txt values?
I just had a look at your issue and I wanted to test your model with the Live Classification feature on the studio but I am having the following issue:

Have you used the data-forwarder to push your data?
It might mean that the frequency is wrong. If you used the data forwarder, you might need to force the correct frequency using the flag --frequency

Regards,

Louis

Also,

I took the features from one sample of your training dataset and I can classify it correctly on my macbook using the Linux Python SDK:

python3 classify.py predictive-maintenance-mac-x86_64-v3.eim features.txt
MODEL: /Users/luisomoreau/Workspace/EI/linux-sdk-python/examples/custom/predictive-maintenance-mac-x86_64-v3.eim
Loaded runner for "Alexandra Covor / Predictive-Maintenance"
classification:
{'classification': {'bad': 0.9466792345046997, 'good': 0.05332073196768761}}
timing:
{'anomaly': 0, 'classification': 0, 'dsp': 0, 'json': 0, 'stdin': 6}

I don’t have a Raspberry Pi with me today so I cannot try on this target. I’ll give a shot tomorrow if you haven’t succeed by then.

Regards,

Louis

Hi @louis!

I’ve pushed some dummy data using this example: https://github.com/edgeimpulse/linux-sdk-python/blob/master/examples/custom/collect.py

I’ll take a look tomorrow, as right now I’m not near my Raspberry Pi either. I’ll also try a clean install on another Raspberry Pi to see if the problem persists, maybe I’ve just messed up some files.

I’ll update you on this!

Thanks,
Alexandra

If that helps, here is the features.txt file I have been using. You might want to check out if it works before reinstalling everything :slight_smile:

0.0000, 10.0067, 10.0067, 0.0725, 10.7304, 10.8029, 0.1656, 11.1802, 11.3458, 0.2776, 11.3663, 11.6439, 0.4055, 11.3216, 11.7271, 0.5457, 11.0962, 11.6419, 0.6941, 10.7511, 11.4452, 0.8465, 10.3510, 11.1975, 0.9990, 9.9567, 10.9557, 1.1434, 9.6164, 10.7597, 1.2810, 9.3679, 10.6489, 1.4110, 9.2305, 10.6414, 1.5338, 9.2056, 10.7394, 1.6507, 9.2796, 10.9304, 1.7640, 9.4267, 11.1907, 1.8757, 9.6141, 11.4898, 1.9880, 9.8072, 11.7952, 2.0977, 9.9722, 12.0699, 2.2098, 10.0861, 12.2959, 2.3254, 10.1342, 12.4596, 2.4451, 10.1125, 12.5576, 2.5689, 10.0273, 12.5962, 2.6963, 9.8933, 12.5895, 2.8261, 9.7301, 12.5563, 2.9572, 9.5597, 12.5169, 3.0828, 9.4009, 12.4837, 3.2057, 9.2709, 12.4765, 3.3255, 9.1798, 12.5053, 3.4425, 9.1309, 12.5734, 3.5571, 9.1208, 12.6780, 3.6705, 9.1404, 12.8109, 3.7834, 9.1771, 12.9605, 3.8968, 9.2167, 13.1135, 4.0059, 9.2452, 13.2511, 4.1152, 9.2525, 13.3677, 4.2254, 9.2321, 13.4575, 4.3368, 9.1822, 13.5190, 4.4499, 9.1051, 13.5551, 4.5646, 9.0070, 13.5716, 4.6807, 8.8961, 13.5768, 4.7974, 8.7817, 13.5791, 4.9089, 8.6717, 13.5806, 5.0184, 8.5732, 13.5916, 5.1259, 8.4901, 13.6160, 5.2319, 8.4235, 13.6554, 5.3367, 8.3716, 13.7083, 5.4410, 8.3305, 13.7715, 5.5454, 8.2948, 13.8402, 5.6502, 8.2588, 13.9090, 5.7501, 8.2176, 13.9676, 5.8492, 8.1669, 14.0161, 5.9479, 8.1046, 14.0525, 6.0467, 8.0303, 14.0769, 6.1458, 7.9451, 14.0909, 6.2455, 7.8517, 14.0972, 6.3458, 7.7534, 14.0992, 6.4465, 7.6535, 14.1000, 6.5417, 7.5558, 14.0975, 6.6353, 7.4619, 14.0972, 6.7273, 7.3729, 14.1002, 6.8182, 7.2886, 14.1067, 6.9083, 7.2081, 14.1163, 6.9982, 7.1297, 14.1278, 7.0882, 7.0515, 14.1397, 7.1783, 6.9717, 14.1500, 7.2634, 6.8901, 14.1534, 7.3471, 6.8047, 14.1518, 7.4298, 6.7152, 14.1450, 7.5117, 6.6217, 14.1334, 7.5934, 6.5245, 14.1179, 7.6750, 6.4247, 14.0997, 7.7567, 6.3229, 14.0797, 7.8385, 6.2202, 14.0587, 7.9149, 6.1190, 14.0339, 7.9897, 6.0182, 14.0080, 8.0630, 5.9179, 13.9810, 8.1353, 5.8176, 13.9529, 8.2068, 5.7169, 13.9237, 8.2780, 5.6150, 13.8931, 8.3492, 5.5117, 13.8609, 8.4203, 5.4066, 13.8269, 8.4863, 5.2982, 13.7845, 8.5506, 5.1905, 13.7412, 8.6136, 5.0834, 13.6969, 8.6754, 4.9764, 13.6518, 8.7365, 4.8690, 13.6055, 8.7973, 4.7606, 13.5578, 8.8578, 4.6506, 13.5084, 8.9180, 4.5390, 13.4570, 8.9728, 4.4246, 13.3974, 9.0261, 4.3110, 13.3371, 9.0780, 4.1981, 13.2761, 9.1289, 4.0854, 13.2143, 9.1790, 3.9725, 13.1515, 9.2286, 3.8585, 13.0871, 9.2778, 3.7431, 13.0209, 9.3266, 3.6260, 12.9526, 9.3697, 3.5067, 12.8764, 9.4114, 3.3883, 12.7997, 9.4518, 3.2708, 12.7226, 9.4911, 3.1537, 12.6448, 9.5297, 3.0362, 12.5660, 9.5677, 2.9179, 12.4856, 9.6051, 2.7982, 12.4033, 9.6420, 2.6768, 12.3188, 9.6730, 2.5537, 12.2267, 9.7026, 2.4318, 12.1344, 9.7311, 2.3109, 12.0420, 9.7586, 2.1904, 11.9489, 9.7852, 2.0697, 11.8549, 9.8112, 1.9482, 11.7594, 9.8365, 1.8253, 11.6618, 9.8611, 1.7008, 11.5619, 9.8796, 1.5753, 11.4549, 9.8969, 1.4510, 11.3480, 9.9132, 1.3278, 11.2410, 9.9285, 1.2052, 11.1337, 9.9430, 1.0825, 11.0254, 9.9567, 0.9590, 10.9156, 9.9696, 0.8342, 10.8037, 9.9816, 0.7078, 10.6894, 9.9875, 0.5811, 10.5686, 9.9924, 0.4557, 10.4481, 9.9962, 0.3315, 10.3277, 9.9992, 0.2080, 10.2072, 10.0014, 0.0844, 10.0858, 10.0027, -0.0398, 9.9628, 10.0030, -0.1653, 9.8377, 10.0024, -0.2922, 9.7102, 9.9956, -0.4189, 9.5767, 9.9879, -0.5441, 9.4438, 9.9794, -0.6681, 9.3113, 9.9700, -0.7913, 9.1787, 9.9598, -0.9145, 9.0453, 9.9487, -1.0382, 8.9105, 9.9366, -1.1631, 8.7734, 9.9232, -1.2893, 8.6339, 9.9039, -1.4147, 8.4892, 9.8837, -1.5385, 8.3452, 9.8628, -1.6610, 8.2018, 9.8412, -1.7827, 8.0585, 9.8188, -1.9042, 7.9145, 9.7954, -2.0263, 7.7691, 9.7708, -2.1493, 7.6215, 9.7450, -2.2735, 7.4714, 9.7132, -2.3964, 7.3168, 9.6807, -2.5176, 7.1632, 9.6477, -2.6374, 7.0104, 9.6141, -2.7563, 6.8578, 9.5796, -2.8750, 6.7047, 9.5441, -2.9941, 6.5501, 9.5074, -3.1140, 6.3934, 9.4693, -3.2350, 6.2343, 9.4254, -3.3541, 6.0713, 9.3810, -3.4715, 5.9096, 9.3362, -3.5874, 5.7489, 9.2909, -3.7023, 5.5886, 9.2447, -3.8170, 5.4278, 9.1975, -3.9319, 5.2656, 9.1490, -4.0476, 5.1014, 9.0990, -4.1642, 4.9348, 9.0435, -4.2783, 4.7652, 8.9876, -4.3907, 4.5969, 8.9314, -4.5015, 4.4299, 8.8748, -4.6114, 4.2635, 8.8175, -4.7208, 4.0967, 8.7591, -4.8305, 3.9286, 8.6992, -4.9408, 3.7585, 8.6378, -5.0518, 3.5860, 8.5712, -5.1598, 3.4114, 8.5044, -5.2660, 3.2384, 8.4374, -5.3707, 3.0668, 8.3701, -5.4743, 2.8958, 8.3021, -5.5775, 2.7246, 8.2331, -5.6808, 2.5522, 8.1625, -5.7846, 2.3779, 8.0903, -5.8889, 2.2014, 8.0132, -5.9897, 2.0235, 7.9362, -6.0887, 1.8475, 7.8591, -6.1862, 1.6729, 7.7818, -6.2826, 1.4992, 7.7038, -6.3785, 1.3254, 7.6248, -6.4744, 1.1504, 7.5443, -6.5706, 0.9737, 7.4620, -6.6672, 0.7948, 7.3752, -6.7598, 0.6155, 7.2887, -6.8506, 0.4381, 7.2023, -6.9399, 0.2624, 7.1157, -7.0281, 0.0876, 7.0286, -7.1157, -0.0872, 6.9403, -7.2032, -0.2629, 6.8506, -7.2909, -0.4403, 6.7591, -7.3788, -0.6197, 6.6635, -7.4623, -0.7987, 6.5683, -7.5440, -0.9757, 6.4734, -7.6242, -1.1508, 6.3785, -7.7034, -1.3248, 6.2831, -7.7819, -1.4988, 6.1865, -7.8601, -1.6736, 6.0885, -7.9384, -1.8499, 5.9887, -8.0168, -2.0281, 5.8853, -8.0902, -2.2050, 5.7824, -8.1620, -2.3797, 5.6799, -8.2324, -2.5525, 5.5776, -8.3017, -2.7241, 5.4748, -8.3702, -2.8955, 5.3709, -8.4385, -3.0675, 5.2656, -8.5066, -3.2410, 5.1584, -8.5746, -3.4161, 5.0482, -8.6374, -3.5892, 4.9386, -8.6985, -3.7599, 4.8297, -8.7583, -3.9286, 4.7210, -8.8170, -4.0961, 4.6118, -8.8750, -4.2632, 4.5017, -8.9325, -4.4309, 4.3900, -8.9898, -4.5998, 4.2766, -9.0467, -4.7701, 4.1607, -9.0982, -4.9375, 4.0456, -9.1481, -5.1026, 3.9312, -9.1967, -5.2655, 3.8171, -9.2443, -5.4272, 3.7027, -9.2911, -5.5883, 3.5874, -9.3373, -5.7499, 3.4706, -9.3831, -5.9125, 3.3521, -9.4285, -6.0764, 3.2316, -9.4681, -6.2365, 3.1121, -9.5063, -6.3942, 2.9934, -9.5433, -6.5498, 2.8752, -9.5792, -6.7040, 2.7567, -9.6143, -6.8576, 2.6373, -9.6488, -7.0115, 2.5165, -9.6827, -7.1662, 2.3941, -9.7160, -7.3220, 2.2702, -9.7434, -7.4732, 2.1475, -9.7695, -7.6220, 2.0257, -9.7944, -7.7687, 1.9045, -9.8184, -7.9139, 1.7831, -9.8415, -8.0584, 1.6609, -9.8639, -8.2030, 1.5373, -9.8856, -8.3483, 1.4121, -9.9065, -8.4944, 1.2861, -9.9214, -8.6353, 1.1614, -9.9351, -8.7737, 1.0378, -9.9477, -8.9099, 0.9148, -9.9595, -9.0447, 0.7917, -9.9703, -9.1787, 0.6678, -9.9804, -9.3126, 0.5427, -9.9897, -9.4470, 0.4161, -9.9980, -9.5819, 0.2892, -10.0002, -9.7110, 0.1638, -10.0014, -9.8376, 0.0395, -10.0016, -9.9621, -0.0841, -10.0010, -10.0851, -0.2077, -9.9996, -10.2072, -0.3319, -9.9972, -10.3291, -0.4573, -9.9940, -10.4513, -0.5841, -9.9896, -10.5737, -0.7106, -9.9791, -10.6897, -0.8355, -9.9678, -10.8033, -0.9592, -9.9556, -10.9148, -1.0821, -9.9427, -11.0248, -1.2049, -9.9289, -11.1338, -1.3283, -9.9142, -11.2424, -1.4528, -9.8984, -11.3511, -1.5785, -9.8814, -11.4599, -1.7033, -9.8584, -11.5616, -1.8265, -9.8346, -11.6610, -1.9483, -9.8101, -11.7584, -2.0693, -9.7850, -11.8543, -2.1901, -9.7590, -11.9491, -2.3114, -9.7320, -12.0434, -2.4337, -9.7039, -12.1376, -2.5571, -9.6744, -12.2315, -2.6790, -9.6391, -12.3180, -2.7992, -9.6031, -12.4023, -2.9180, -9.5666, -12.4846, -3.0358, -9.5295, -12.5653, -3.1535, -9.4916, -12.6450, -3.2715, -9.4526, -12.7241, -3.3903, -9.4124, -12.8028, -3.5102, -9.3708, -12.8810, -3.6279, -9.3235, -12.9513, -3.7439, -9.2757, -13.0196, -3.8584, -9.2275, -13.0859, -3.9720, -9.1788, -13.1508, -4.0853, -9.1293, -13.2146, -4.1988, -9.0788, -13.2776, -4.3131, -9.0270, -13.3400, -4.4281, -8.9736, -13.4017, -4.5406, -8.9147, -13.4552, -4.6512, -8.8556, -13.5068, -4.7604, -8.7962, -13.5566, -4.8685, -8.7364, -13.6049, -4.9763, -8.6759, -13.6522, -5.0842, -8.6143, -13.6985, -5.1927, -8.5513, -13.7440, -5.3019, -8.4866, -13.7885, -5.4079, -8.4169, -13.8247, -5.5121, -8.3470, -13.8590, -5.6148, -8.2770, -13.8918, -5.7164, -8.2067, -13.9231, -5.8176, -8.1357, -13.9533, -5.9188, -8.0637, -13.9825, -6.0205, -7.9901, -14.0106, -6.1227, -7.9149, -14.0376, -6.2211, -7.8349, -14.0560, -6.3178, -7.7550, -14.0728, -6.4130, -7.6751, -14.0881, -6.5071, -7.5950, -14.1022, -6.6007, -7.5143, -14.1150, -6.6942, -7.4325, -14.1267, -6.7881, -7.3492, -14.1372, -6.8822, -7.2642, -14.1464, -6.9722, -7.1747, -14.1469, -7.0605, -7.0855, -14.1460, -7.1472, -6.9965, -14.1438, -7.2329, -6.9075, -14.1403, -7.3179, -6.8178, -14.1357, -7.4028, -6.7270, -14.1299, -7.4878, -6.6348, -14.1226, -7.5731, -6.5408, -14.1138, -7.6537, -6.4428, -14.0965, -7.7326, -6.3452, -14.0778, -7.8100, -6.2481, -14.0581, -7.8863, -6.1509, -14.0372, -7.9620, -6.0532, -14.0152, -8.0374, -5.9544, -13.9918, -8.1128, -5.8541, -13.9669, -8.1882, -5.7521, -13.9403, -8.2586, -5.6465, -13.9052, -8.3274, -5.5416, -13.8690, -8.3947, -5.4371, -13.8319, -8.4610, -5.3328, -13.7938, -8.5265, -5.2280, -13.7546, -8.5917, -5.1222, -13.7139, -8.6567, -5.0149, -13.6716, -8.7216, -4.9059, -13.6274, -8.7811, -4.7938, -13.5749, -8.8390, -4.6825, -13.5216, -8.8956, -4.5719, -13.4675, -8.9511, -4.4615, -13.4126, -9.0059, -4.3507, -13.3566, -9.0602, -4.2389, -13.2991, -9.1141, -4.1256, -13.2398, -9.1678, -4.0107, -13.1784, -9.2158, -3.8932, -13.1090, -9.2624, -3.7767, -13.0391, -9.3076, -3.6610, -12.9686, -9.3518, -3.5456, -12.8974, -9.3952, -3.4299, -12.8251, -9.4381, -3.3132, -12.7513, -9.4805, -3.1951, -12.6756, -9.5224, -3.0754, -12.5977, -9.5584, -2.9537, -12.5122, -9.5931, -2.8332, -12.4263, -9.6266, -2.7135, -12.3401, -9.6591, -2.5942, -12.2533, -9.6907, -2.4748, -12.1655, -9.7217, -2.3544, -12.0761, -9.7521, -2.2327, -11.9848, -9.7818, -2.1094, -11.8912, -9.8056, -1.9847, -11.7903, -9.8280, -1.8613, -11.6893, -9.8494, -1.7389, -11.5883, -9.8698, -1.6170, -11.4868, -9.8894, -1.4950, -11.3843, -9.9082, -1.3721, -11.2803, -9.9263, -1.2480, -11.1742, -9.9435, -1.1223, -11.0658, -9.9547, -0.9959, -10.9506, -9.9648, -0.8708, -10.8356, -9.9738, -0.7469, -10.7207, -9.9819, -0.6236, -10.6055, -9.9892, -0.5002, -10.4894, -9.9957, -0.3761, -10.3718, -10.0013, -0.2508, -10.2520, -10.0059, -0.1240, -10.1299, -10.0044, 0.0029, -10.0015, -10.0019, 0.1283, -9.8736, -9.9985, 0.2526, -9.7460, -9.9943, 0.3761, -9.6182, -9.9892, 0.4995, -9.4897, -9.9833, 0.6237, -9.3596, -9.9763, 0.7489, -9.2274, -9.9683, 0.8756, -9.0927, -9.9541, 1.0017, -8.9525, -9.9391, 1.1262, -8.8129, -9.9234, 1.2495, -8.6739, -9.9068, 1.3720, -8.5349, -9.8895, 1.4943, -8.3951, -9.8711, 1.6172, -8.2539, -9.8517, 1.7412, -8.1106, -9.8311, 1.8664, -7.9647, -9.8044, 1.9904, -7.8140, -9.7770, 2.1129, -7.6642, -9.7490, 2.2339, -7.5151, -9.7204, 2.3541, -7.3662, -9.6909, 2.4741, -7.2167, -9.6604, 2.5946, -7.0658, -9.6287, 2.7160, -6.9127, -9.5956, 2.8385, -6.7571, -9.5567, 2.9593, -6.5974, -9.5173, 3.0784, -6.4389, -9.4773, 3.1961, -6.2813, -9.4368, 3.3128, -6.1240, -9.3955, 3.4293, -5.9662, -9.3531, 3.5461, -5.8070, -9.3094, 3.6637, -5.6457, -9.2643, 3.7823, -5.4820, -9.2135, 3.8986, -5.3150, -9.1624, 4.0131, -5.1492, -9.1109, 4.1262, -4.9847, -9.0589, 4.2384, -4.8206, -9.0062, 4.3501, -4.6561, -8.9523, 4.4621, -4.4902, -8.8972, 4.5748, -4.3224, -8.8404, 4.6883, -4.1521, -8.7783, 4.7989, -3.9794, -8.7160, 4.9078, -3.8082, -8.6534, 5.0152, -3.6382, -8.5905, 5.1216, -3.4690, -8.5269, 5.2275, -3.2994, -8.4621, 5.3336, -3.1286, -8.3960, 5.4402, -2.9558, -8.3282, 5.5474, -2.7808, -8.2554, 5.6513, -2.6040, -8.1825, 5.7534, -2.4290, -8.1095, 5.8540, -2.2555, -8.0363, 5.9536, -2.0827, -7.9624, 6.0526, -1.9098, -7.8874, 6.1517, -1.7357, -7.8109, 6.2512, -1.5597, -7.7328, 6.3512, -1.3816, -7.6499, 6.4472, -1.2027, -7.5672, 6.5416, -1.0256, -7.4846, 6.6344, -0.8502, -7.4018, 6.7261, -0.6756, -7.3184, 6.8173, -0.5011, -7.2339, 6.9084, -0.3254, -7.1478, 6.9998, -0.1481, -7.0601, 7.0914, 0.0313, -6.9681, 7.1787, 0.2107, -6.8763, 7.2644, 0.3880, -6.7849, 7.3485, 0.5636, -6.6933, 7.4315, 0.7382, -6.6012, 7.5139, 0.9127, -6.5080, 7.5961, 1.0881, -6.4133, 7.6784, 1.2651, -6.3169, 7.7608, 1.4440, -6.2166, 7.8385, 1.6220, -6.1168, 7.9146, 1.7978, -6.0173, 7.9891, 1.9718, -5.9180, 8.0626, 2.1446, -5.8181, 8.1354, 2.3173, -5.7172, 8.2078, 2.4907, -5.6147, 8.2803, 2.6656, -5.5105, 8.3527, 2.8422, -5.4030, 8.4200, 3.0170, -5.2961, 8.4857, 3.1896, -5.1897, 8.5499, 3.3602, -5.0835, 8.6131, 3.5296, -4.9768, 8.6756, 3.6987, -4.8692, 8.7376, 3.8684, -4.7600, 8.7995, 4.0394, -4.6491, 8.8611, 4.2120, -4.5354, 8.9173, 4.3819, -4.4224, 8.9720, 4.5496, -4.3102, 9.0253, 4.7151, -4.1982, 9.0776, 4.8794, -4.0859, 9.1291, 5.0432, -3.9726, 9.1801, 5.2075, -3.8578, 9.2307, 5.3729, -3.7413, 9.2810, 5.5397, -3.6225, 9.3256, 5.7031, -3.5046, 9.3687, 5.8640, -3.3876, 9.4105, 6.0229, -3.2710, 9.4514, 6.1804, -3.1541, 9.4914, 6.3373, -3.0362, 9.5308, 6.4946, -2.9170, 9.5697, 6.6528, -2.7960, 9.6081, 6.8121, -2.6734, 9.6406, 6.9672, -2.5518, 9.6718, 7.1199, -2.4312, 9.7017, 7.2705, -2.3111, 9.7307, 7.4196, -2.1908, 9.7588, 7.5681, -2.0696, 9.7863, 7.7167, -1.9470, 9.8131, 7.8661, -1.8228, 9.8392, 8.0164, -1.6976, 9.8593, 8.1618, -1.5735, 9.8782, 8.3047, -1.4505, 9.8960, 8.4454, -1.3281, 9.9128, 8.5847, -1.2056, 9.9288, 8.7232, -1.0822, 9.9440, 8.8618, -0.9576, 9.9585, 9.0009, -0.8314, 9.9721, 9.1406, -0.7048, 9.9796, 9.2748, -0.5795, 9.9859, 9.4065, -0.4553, 9.9913, 9.5360

Regards,

Louis

1 Like

I’ve tested again using your features.txt file and I get the same error, both on the Raspberry Pi 4 and on my Linux laptop (I use Ubuntu 20.04.3 LTS). Sadly, I don’t have a Macbook to test this on a third OS :laughing:

Regards,
Alexandra

Hello @alexandra.covor,

I can indeed reproduce your error on Ubuntu 20.04 too.
I am transferring your issue to our Core Engineering team.
I’ll let you know when it will be fixed.

Regards,

Louis

1 Like

This is a very interesting bug… The number of input features to your ‘Raw data’ block is 500Hz x 3 axes => 1500 features. But the output out of the block is 1488 features (see EI_CLASSIFIER_NN_INPUT_FRAME_SIZE define). This causes a buffer overflow on the raw data block, as it expects the input / output size to be the same which then potentially segfaults the model.

The reason why this is not in sync is because of the resampling code, which rather takes too little elements (when you can’t cleanly divide the input frequency and the resampling frequency). Will push a fix that does a proper buffer size check here in the next patch release.

Quick fix on your end:

  1. Go to Create impulse
  2. Click the icon next to ‘Frequency (Hz)’ to reset the frequency back to 62.5Hz.
  3. Retrain.
3 Likes

Thank you for the explanation!
Indeed, it works now!