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 commitpull/23820/head
parent
768bea48d0
commit
48154703a7
|
@ -40,9 +40,10 @@ const mat3 fcam_intrinsic_matrix =
|
||||||
0.0, 2648.0, 1208.0 / 2,
|
0.0, 2648.0, 1208.0 / 2,
|
||||||
0.0, 0.0, 1.0}};
|
0.0, 0.0, 1.0}};
|
||||||
|
|
||||||
// without unwarp, focal length is for center portion only
|
// tici ecam focal probably wrong? magnification is not consistent across frame
|
||||||
const mat3 ecam_intrinsic_matrix = (mat3){{620.0, 0.0, 1928.0 / 2,
|
// Need to retrain model before this can be changed
|
||||||
0.0, 620.0, 1208.0 / 2,
|
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}};
|
0.0, 0.0, 1.0}};
|
||||||
|
|
||||||
static inline mat3 get_model_yuv_transform(bool bayer = true) {
|
static inline mat3 get_model_yuv_transform(bool bayer = true) {
|
||||||
|
|
|
@ -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,
|
-2.19780220e-03, 4.11497335e-19, 5.62637363e-01,
|
||||||
-5.46146580e-20, 1.80147721e-03, -2.73464241e-01).finished();
|
-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();
|
static const mat3 yuv_transform = get_model_yuv_transform();
|
||||||
|
|
||||||
auto ground_from_model_frame = bigmodel_frame ? ground_from_sbigmodel_frame : ground_from_medmodel_frame;
|
auto ground_from_model_frame = bigmodel_frame ? ground_from_sbigmodel_frame : ground_from_medmodel_frame;
|
||||||
|
|
|
@ -21,19 +21,21 @@ from selfdrive.version import get_commit
|
||||||
from tools.lib.framereader import FrameReader
|
from tools.lib.framereader import FrameReader
|
||||||
from tools.lib.logreader import LogReader
|
from tools.lib.logreader import LogReader
|
||||||
|
|
||||||
if TICI:
|
TICI_TEST_ROUTE = "4cf7a6ad03080c90|2021-09-29--13-46-36"
|
||||||
TEST_ROUTE = "4cf7a6ad03080c90|2021-09-29--13-46-36"
|
EON_TEST_ROUTE = "303055c0002aefd1|2021-11-22--18-36-32"
|
||||||
else:
|
|
||||||
TEST_ROUTE = "303055c0002aefd1|2021-11-22--18-36-32"
|
|
||||||
SEGMENT = 0
|
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"))
|
SEND_EXTRA_INPUTS = bool(os.getenv("SEND_EXTRA_INPUTS", "0"))
|
||||||
|
|
||||||
VIPC_STREAM = {"roadCameraState": VisionStreamType.VISION_STREAM_ROAD, "driverCameraState": VisionStreamType.VISION_STREAM_DRIVER,
|
VIPC_STREAM = {"roadCameraState": VisionStreamType.VISION_STREAM_ROAD, "driverCameraState": VisionStreamType.VISION_STREAM_DRIVER,
|
||||||
"wideRoadCameraState": VisionStreamType.VISION_STREAM_WIDE_ROAD}
|
"wideRoadCameraState": VisionStreamType.VISION_STREAM_WIDE_ROAD}
|
||||||
|
|
||||||
def get_log_fn(ref_commit):
|
def get_log_fn(ref_commit, test_route, tici=True):
|
||||||
return f"{TEST_ROUTE}_{'model_tici' if TICI else 'model'}_{ref_commit}.bz2"
|
return f"{test_route}_{'model_tici' if tici else 'model'}_{ref_commit}.bz2"
|
||||||
|
|
||||||
|
|
||||||
def replace_calib(msg, calib):
|
def replace_calib(msg, calib):
|
||||||
|
@ -159,7 +161,7 @@ if __name__ == "__main__":
|
||||||
if not update:
|
if not update:
|
||||||
with open(ref_commit_fn) as f:
|
with open(ref_commit_fn) as f:
|
||||||
ref_commit = f.read().strip()
|
ref_commit = f.read().strip()
|
||||||
log_fn = get_log_fn(ref_commit)
|
log_fn = get_log_fn(ref_commit, TEST_ROUTE, tici=TICI)
|
||||||
try:
|
try:
|
||||||
cmp_log = LogReader(BASE_URL + log_fn)
|
cmp_log = LogReader(BASE_URL + log_fn)
|
||||||
|
|
||||||
|
@ -191,7 +193,7 @@ if __name__ == "__main__":
|
||||||
print("Uploading new refs")
|
print("Uploading new refs")
|
||||||
|
|
||||||
new_commit = get_commit()
|
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)
|
save_log(log_fn, log_msgs)
|
||||||
try:
|
try:
|
||||||
upload_file(log_fn, os.path.basename(log_fn))
|
upload_file(log_fn, os.path.basename(log_fn))
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
b48904b48036aa0c023759f214740f226b52b5b8
|
19720e79b1c5136a882efd689651d9044e2e2007
|
||||||
|
|
Loading…
Reference in New Issue