Fix tici bigmodel (#23817)

* Fix bigmodel on tici: cam intrinsics arent static

* Give TICI route own name for import

* Make function useable in offline test

* typo

* change tici ecam focal to trained focal

* No shadow variable

* Fixed ref

* Force update this time

* Update model replay ref commit
pull/23820/head
HaraldSchafer 2022-02-21 19:57:04 -08:00 committed by GitHub
parent 768bea48d0
commit 48154703a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 13 deletions

View File

@ -40,9 +40,10 @@ const mat3 fcam_intrinsic_matrix =
0.0, 2648.0, 1208.0 / 2,
0.0, 0.0, 1.0}};
// without unwarp, focal length is for center portion only
const mat3 ecam_intrinsic_matrix = (mat3){{620.0, 0.0, 1928.0 / 2,
0.0, 620.0, 1208.0 / 2,
// tici ecam focal probably wrong? magnification is not consistent across frame
// Need to retrain model before this can be changed
const mat3 ecam_intrinsic_matrix = (mat3){{567.0, 0.0, 1928.0 / 2,
0.0, 567.0, 1208.0 / 2,
0.0, 0.0, 1.0}};
static inline mat3 get_model_yuv_transform(bool bayer = true) {

View File

@ -33,7 +33,7 @@ mat3 update_calibration(Eigen::Matrix<float, 3, 4> &extrinsics, bool wide_camera
-2.19780220e-03, 4.11497335e-19, 5.62637363e-01,
-5.46146580e-20, 1.80147721e-03, -2.73464241e-01).finished();
static const auto cam_intrinsics = Eigen::Matrix<float, 3, 3, Eigen::RowMajor>(wide_camera ? ecam_intrinsic_matrix.v : fcam_intrinsic_matrix.v);
const auto cam_intrinsics = Eigen::Matrix<float, 3, 3, Eigen::RowMajor>(wide_camera ? ecam_intrinsic_matrix.v : fcam_intrinsic_matrix.v);
static const mat3 yuv_transform = get_model_yuv_transform();
auto ground_from_model_frame = bigmodel_frame ? ground_from_sbigmodel_frame : ground_from_medmodel_frame;

View File

@ -21,19 +21,21 @@ from selfdrive.version import get_commit
from tools.lib.framereader import FrameReader
from tools.lib.logreader import LogReader
if TICI:
TEST_ROUTE = "4cf7a6ad03080c90|2021-09-29--13-46-36"
else:
TEST_ROUTE = "303055c0002aefd1|2021-11-22--18-36-32"
TICI_TEST_ROUTE = "4cf7a6ad03080c90|2021-09-29--13-46-36"
EON_TEST_ROUTE = "303055c0002aefd1|2021-11-22--18-36-32"
SEGMENT = 0
if TICI:
TEST_ROUTE = TICI_TEST_ROUTE
else:
TEST_ROUTE = EON_TEST_ROUTE
SEND_EXTRA_INPUTS = bool(os.getenv("SEND_EXTRA_INPUTS", "0"))
VIPC_STREAM = {"roadCameraState": VisionStreamType.VISION_STREAM_ROAD, "driverCameraState": VisionStreamType.VISION_STREAM_DRIVER,
"wideRoadCameraState": VisionStreamType.VISION_STREAM_WIDE_ROAD}
def get_log_fn(ref_commit):
return f"{TEST_ROUTE}_{'model_tici' if TICI else 'model'}_{ref_commit}.bz2"
def get_log_fn(ref_commit, test_route, tici=True):
return f"{test_route}_{'model_tici' if tici else 'model'}_{ref_commit}.bz2"
def replace_calib(msg, calib):
@ -159,7 +161,7 @@ if __name__ == "__main__":
if not update:
with open(ref_commit_fn) as f:
ref_commit = f.read().strip()
log_fn = get_log_fn(ref_commit)
log_fn = get_log_fn(ref_commit, TEST_ROUTE, tici=TICI)
try:
cmp_log = LogReader(BASE_URL + log_fn)
@ -191,7 +193,7 @@ if __name__ == "__main__":
print("Uploading new refs")
new_commit = get_commit()
log_fn = get_log_fn(new_commit)
log_fn = get_log_fn(new_commit, TEST_ROUTE, tici=TICI)
save_log(log_fn, log_msgs)
try:
upload_file(log_fn, os.path.basename(log_fn))

View File

@ -1 +1 @@
b48904b48036aa0c023759f214740f226b52b5b8
19720e79b1c5136a882efd689651d9044e2e2007