mirror of https://github.com/commaai/openpilot.git
who is ready for big model?
This commit is contained in:
parent
12af1f9175
commit
144b37728f
|
@ -44,24 +44,15 @@ medmodel_intrinsics = np.array(
|
|||
|
||||
# BIG model
|
||||
|
||||
BIGMODEL_INPUT_SIZE = (864, 288)
|
||||
BIGMODEL_INPUT_SIZE = (1024, 512)
|
||||
BIGMODEL_YUV_SIZE = (BIGMODEL_INPUT_SIZE[0], BIGMODEL_INPUT_SIZE[1] * 3 // 2)
|
||||
|
||||
bigmodel_zoom = 1.
|
||||
bigmodel_intrinsics = np.array(
|
||||
[[ eon_focal_length / bigmodel_zoom, 0. , 0.5 * BIGMODEL_INPUT_SIZE[0]],
|
||||
[ 0. , eon_focal_length / bigmodel_zoom, 0.2 * BIGMODEL_INPUT_SIZE[1]],
|
||||
[ 0. , eon_focal_length / bigmodel_zoom, 256+MEDMODEL_CY],
|
||||
[ 0. , 0. , 1.]])
|
||||
|
||||
|
||||
bigmodel_border = np.array([
|
||||
[0,0,1],
|
||||
[BIGMODEL_INPUT_SIZE[0], 0, 1],
|
||||
[BIGMODEL_INPUT_SIZE[0], BIGMODEL_INPUT_SIZE[1], 1],
|
||||
[0, BIGMODEL_INPUT_SIZE[1], 1],
|
||||
])
|
||||
|
||||
|
||||
model_frame_from_road_frame = np.dot(model_intrinsics,
|
||||
get_view_frame_from_road_frame(0, 0, 0, model_height))
|
||||
|
||||
|
@ -72,6 +63,7 @@ medmodel_frame_from_road_frame = np.dot(medmodel_intrinsics,
|
|||
get_view_frame_from_road_frame(0, 0, 0, model_height))
|
||||
|
||||
model_frame_from_bigmodel_frame = np.dot(model_intrinsics, np.linalg.inv(bigmodel_intrinsics))
|
||||
medmodel_frame_from_bigmodel_frame = np.dot(medmodel_intrinsics, np.linalg.inv(bigmodel_intrinsics))
|
||||
|
||||
# 'camera from model camera'
|
||||
def get_model_height_transform(camera_frame_from_road_frame, height):
|
||||
|
|
|
@ -2,14 +2,20 @@
|
|||
|
||||
# Question: Can a human drive from this data?
|
||||
|
||||
import os
|
||||
import cv2
|
||||
import numpy as np
|
||||
import cereal.messaging as messaging
|
||||
from common.window import Window
|
||||
from common.transformations.model import MEDMODEL_INPUT_SIZE
|
||||
if os.getenv("BIG") is not None:
|
||||
from common.transformations.model import BIGMODEL_INPUT_SIZE as MEDMODEL_INPUT_SIZE
|
||||
from common.transformations.model import get_camera_frame_from_bigmodel_frame as get_camera_frame_from_medmodel_frame
|
||||
else:
|
||||
from common.transformations.model import MEDMODEL_INPUT_SIZE
|
||||
from common.transformations.model import get_camera_frame_from_medmodel_frame
|
||||
|
||||
from common.transformations.camera import FULL_FRAME_SIZE, eon_intrinsics
|
||||
|
||||
from common.transformations.model import get_camera_frame_from_medmodel_frame
|
||||
from tools.replay.lib.ui_helpers import CalibrationTransformsForWarpMatrix
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Reference in New Issue