diff --git a/selfdrive/car/ford/tests/ford_fuzzy_fingerprint.ipynb b/selfdrive/car/ford/tests/ford_fuzzy_fingerprint.ipynb deleted file mode 100644 index 4ef7a752da..0000000000 --- a/selfdrive/car/ford/tests/ford_fuzzy_fingerprint.ipynb +++ /dev/null @@ -1,378 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "kj/filesystem-disk-unix.c++:1703: warning: PWD environment variable doesn't match current directory; pwd = /mnt/c/Users/camer/AppData/Local/Programs/Microsoft VS Code\n" - ] - } - ], - "source": [ - "from openpilot.tools.lib.comma_car_segments import get_comma_car_segments_database\n", - "from openpilot.selfdrive.car.ford.values import CAR\n", - "\n", - "database = get_comma_car_segments_database()\n", - "\n", - "platforms = [c.value for c in CAR]" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "9ddb0675cd4a4f46a23b608252324ed4", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - " 0%| | 0/261 [00:00, ?it/s]" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "import random\n", - "\n", - "from tqdm.contrib.concurrent import thread_map\n", - "\n", - "from openpilot.tools.lib.logreader import LogReader\n", - "\n", - "\n", - "def process(segment):\n", - " CP = LogReader(segment).first(\"carParams\")\n", - " return CP.carVin, CP.carFw, CP.carFingerprint, CP.fuzzyFingerprint, CP.fingerprintSource\n", - "\n", - "\n", - "FW_TO_CHECK = set(thread_map(process, [\n", - " segment for platform in platforms\n", - " for segment in random.sample(database[platform], min(len(database[platform]), 50))\n", - "]))" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "vin: 3FTTW8E3XPRXXXXXX expected: FORD MAVERICK 1ST GEN fuzzy: mock correct: False\n", - " source: fw\n", - " fuzzy: True\n", - " car_fw:\n", - " abs b'PZ6C-2D053-ED'\n", - " engine b'PZ6A-14C204-JE'\n", - " eps b'NZ6C-14D003-AL'\n", - " fwdCamera b'NZ6T-14F397-AC'\n", - "vin: 3FTTW8E3XPRXXXXXX expected: FORD MAVERICK 1ST GEN fuzzy: mock correct: False\n", - " source: fw\n", - " fuzzy: True\n", - " car_fw:\n", - " abs b'PZ6C-2D053-ED'\n", - " engine b'PZ6A-14C204-JE'\n", - " eps b'NZ6C-14D003-AL'\n", - " fwdCamera b'NZ6T-14F397-AC'\n", - "Skipping vin: 00000000000XXXXXX platform: FORD F-150 14TH GEN, no car fw\n", - "Skipping vin: 00000000000XXXXXX platform: FORD F-150 14TH GEN, no car fw\n", - "vin: 3FTTW8E3XPRXXXXXX expected: FORD MAVERICK 1ST GEN fuzzy: mock correct: False\n", - " source: fw\n", - " fuzzy: True\n", - " car_fw:\n", - " abs b'PZ6C-2D053-ED'\n", - " engine b'PZ6A-14C204-JE'\n", - " eps b'NZ6C-14D003-AL'\n", - " fwdCamera b'NZ6T-14F397-AC'\n", - "vin: 3FTTW8E3XPRXXXXXX expected: FORD MAVERICK 1ST GEN fuzzy: mock correct: False\n", - " source: fw\n", - " fuzzy: True\n", - " car_fw:\n", - " abs b'PZ6C-2D053-ED'\n", - " engine b'PZ6A-14C204-JE'\n", - " eps b'NZ6C-14D003-AL'\n", - " fwdCamera b'NZ6T-14F397-AC'\n", - "vin: 3FTTW8E3XPRXXXXXX expected: FORD MAVERICK 1ST GEN fuzzy: mock correct: False\n", - " source: fw\n", - " fuzzy: True\n", - " car_fw:\n", - " abs b'PZ6C-2D053-ED'\n", - " engine b'PZ6A-14C204-JE'\n", - " eps b'NZ6C-14D003-AL'\n", - " fwdCamera b'NZ6T-14F397-AC'\n", - "Skipping vin: 00000000000XXXXXX platform: FORD F-150 14TH GEN, no car fw\n", - "vin: 3FTTW8E3XPRXXXXXX expected: FORD MAVERICK 1ST GEN fuzzy: mock correct: False\n", - " source: fw\n", - " fuzzy: True\n", - " car_fw:\n", - " abs b'PZ6C-2D053-ED'\n", - " engine b'PZ6A-14C204-JE'\n", - " eps b'NZ6C-14D003-AL'\n", - " fwdCamera b'NZ6T-14F397-AC'\n", - "vin: 3FTTW8E3XPRXXXXXX expected: FORD MAVERICK 1ST GEN fuzzy: mock correct: False\n", - " source: fw\n", - " fuzzy: True\n", - " car_fw:\n", - " abs b'PZ6C-2D053-ED'\n", - " engine b'PZ6A-14C204-JE'\n", - " eps b'NZ6C-14D003-AL'\n", - " fwdCamera b'NZ6T-14F397-AC'\n", - "vin: 3FTTW8E3XPRXXXXXX expected: FORD MAVERICK 1ST GEN fuzzy: mock correct: False\n", - " source: fw\n", - " fuzzy: True\n", - " car_fw:\n", - " abs b'PZ6C-2D053-ED'\n", - " engine b'PZ6A-14C204-JE'\n", - " eps b'NZ6C-14D003-AL'\n", - " fwdCamera b'NZ6T-14F397-AC'\n", - "Skipping vin: 00000000000XXXXXX platform: FORD F-150 14TH GEN, no car fw\n", - "Skipping vin: 00000000000XXXXXX platform: FORD F-150 14TH GEN, no car fw\n", - "vin: 3FTTW8E3XPRXXXXXX expected: FORD MAVERICK 1ST GEN fuzzy: mock correct: False\n", - " source: fw\n", - " fuzzy: True\n", - " car_fw:\n", - " abs b'PZ6C-2D053-ED'\n", - " engine b'PZ6A-14C204-JE'\n", - " eps b'NZ6C-14D003-AL'\n", - " fwdCamera b'NZ6T-14F397-AC'\n", - "vin: 3FTTW8E3XPRXXXXXX expected: FORD MAVERICK 1ST GEN fuzzy: mock correct: False\n", - " source: fw\n", - " fuzzy: True\n", - " car_fw:\n", - " abs b'PZ6C-2D053-ED'\n", - " engine b'PZ6A-14C204-JE'\n", - " eps b'NZ6C-14D003-AL'\n", - " fwdCamera b'NZ6T-14F397-AC'\n", - "vin: 3FTTW8E3XPRXXXXXX expected: FORD MAVERICK 1ST GEN fuzzy: mock correct: False\n", - " source: fw\n", - " fuzzy: True\n", - " car_fw:\n", - " abs b'PZ6C-2D053-ED'\n", - " engine b'PZ6A-14C204-JE'\n", - " eps b'NZ6C-14D003-AL'\n", - " fwdCamera b'NZ6T-14F397-AC'\n", - "Success rate: 95.70%\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - " | source | \n", - "expected | \n", - "fuzzy | \n", - "correct | \n", - "
---|---|---|---|---|
0 | \n", - "fw | \n", - "FORD BRONCO SPORT 1ST GEN | \n", - "FORD BRONCO SPORT 1ST GEN | \n", - "True | \n", - "
1 | \n", - "fw | \n", - "FORD ESCAPE 4TH GEN | \n", - "FORD ESCAPE 4TH GEN | \n", - "True | \n", - "
5 | \n", - "fixed | \n", - "FORD EXPLORER 6TH GEN | \n", - "FORD EXPLORER 6TH GEN | \n", - "True | \n", - "
8 | \n", - "fw | \n", - "FORD EXPLORER 6TH GEN | \n", - "FORD EXPLORER 6TH GEN | \n", - "True | \n", - "
11 | \n", - "fw | \n", - "FORD MAVERICK 1ST GEN | \n", - "FORD MAVERICK 1ST GEN | \n", - "True | \n", - "
12 | \n", - "fw | \n", - "FORD MAVERICK 1ST GEN | \n", - "mock | \n", - "False | \n", - "
17 | \n", - "fw | \n", - "FORD FOCUS 4TH GEN | \n", - "FORD FOCUS 4TH GEN | \n", - "True | \n", - "
103 | \n", - "fixed | \n", - "FORD MAVERICK 1ST GEN | \n", - "FORD MAVERICK 1ST GEN | \n", - "True | \n", - "
119 | \n", - "fw | \n", - "FORD F-150 LIGHTNING 1ST GEN | \n", - "FORD F-150 LIGHTNING 1ST GEN | \n", - "True | \n", - "
149 | \n", - "fw | \n", - "FORD MUSTANG MACH-E 1ST GEN | \n", - "FORD MUSTANG MACH-E 1ST GEN | \n", - "True | \n", - "