feat:完成场景资源的设置--原功能-不包括自动标注

main
chenzhirong 4 months ago
parent 11be39b5b1
commit 137f7b7da4

@ -14,6 +14,12 @@ class Scene(SQLModel,table=True):
id: str = Field(default_factory=get_uuid, max_length=32, primary_key=True)
scene_name: str = Field(max_length=256, description="事件名称", unique=True)
calib_json: List[dict] = Field(sa_type=JSON, nullable=True, description="calib是从点云到图像的校准矩阵。它是可选的但如果提供该框将投影在图像上以帮助注释。")
box_type: str = Field(default="psr", max_length=256, description="标注框类型")
camera_ext: str = Field(default=".jpg", max_length=256, description="标注的图片类型(后缀)")
lidar_ext: str = Field(default=".pcd", max_length=256)
radar_ext: str = Field(default=".pcd", max_length=256)
aux_lidar_ext: str = Field(default=".pcd", max_length=256)
desc: List[dict] = Field(sa_type=JSON, nullable=True, description="calib是从点云到图像的校准矩阵。它是可选的但如果提供该框将投影在图像上以帮助注释。")
class SceneWorldItem(SQLModel,table=True):
@ -22,14 +28,12 @@ class SceneWorldItem(SQLModel,table=True):
scene_id: str = Field(max_length=256, description="事件id")
scene_name: str = Field(max_length=256, description="事件名")
frame: str = Field(max_length=256, description="帧序号")
calib_json: List[dict] = Field(sa_type=JSON, nullable=True, description="calib是从点云到图像的校准矩阵。它是可选的但如果提供该框将投影在图像上以帮助注释。")
label_json: List[dict] = Field(sa_type=JSON, nullable=True, description="标注信息 == annotation")
ego_pose_json: List[dict] = Field(sa_type=JSON, nullable=True, description="")
front_img_path: str = Field(max_length=512, description="minio对应文件的路径")
left_img_path: str = Field(max_length=512, description="minio对应文件的路径")
right_img_path: str = Field(max_length=512, description="minio对应文件的路径")
lidar_pcd_path: str = Field(max_length=512, description="minio对应的pcd文件的路径")
# 初始化数据库表(异步执行)
SQLModel.metadata.create_all(engine)

@ -24,11 +24,11 @@ class SceneService:
item = {
"scene": scene.scene_name,
"frames": [scene_world.frame for scene_world in scene_worlds],
"lidar_ext": ".pcd",
"camera_ext": ".jpg",
"radar_ext": ".pcd",
"aux_lidar_ext": ".pcd",
"boxtype": "psr",
"lidar_ext": scene.lidar_ext,
"camera_ext": scene.camera_ext,
"radar_ext": scene.radar_ext,
"aux_lidar_ext": scene.aux_lidar_ext,
"boxtype": scene.box_type,
"camera": [
"right",
"left",

@ -86,9 +86,9 @@ class MinioServer:
r = self.conn.get_object(bucket, filename)
return r
except Exception:
logging.exception(f"Fail to get {bucket}/{filename}")
logging.exception(f"Fail to get {bucket}{filename}")
self.__open__()
time.sleep(1)
time.sleep(0.5)
return None
def obj_exist(self, bucket, filename):
try:

@ -1,9 +0,0 @@
{
"extrinsic": [-0.9994466143126584, 0.033033376071303994, -0.003906559137689193, 0.20487898588180542,
0.0025198193977806005, -0.0419178508124942, -0.9991178830816032, 0.0013696063542738557,
-0.033167991334523576, -0.9985748293686324, 0.04181141593201179, -0.10943480581045151,
0, 0, 0, 1],
"intrinsic": [1.2100629810000000e+03, 0.0, 1.0224299030000000e+03,
0.0,1.2058507139999999e+03, 7.9254164400000002e+02,
0.0, 0.0, 1.0]
}

@ -1,18 +0,0 @@
{
"extrinsic_ok": [0.000795916642330613, -0.9994847331424607, 0.03208792189972302, -0.5,
0.05182623470216488, -0.03200358149726322, -0.9981431821977967, 0.0013696063542738557,
0.998655800520527, 0.002457434941619845, 0.05177405817794394, -0.10943480581045151,
0, 0, 0, 1],
"extrinsic": [ -3.9384503688273731e-02, -9.9721160654039998e-01,
6.3386691429213382e-02, 1.2484878301620483e-01,
5.0218947462187857e-02, -6.5331141114291447e-02,
-9.9659916682510530e-01, -1.8440222740173340e-01,
9.9796138110901755e-01, -3.6067350634868045e-02,
5.2651951845710920e-02, -3.9436036348342896e-01, 0, 0, 0, 1],
"intrinsic": [1.2100629810000000e+03, 0.0, 1.0224299030000000e+03,
0.0,1.2058507139999999e+03, 7.9254164400000002e+02,
0.0, 0.0, 1.0]
}

@ -1,11 +0,0 @@
{
"extrinsic": [3.5640002421153172e-02, 9.9786432954622106e-01,
-5.4740935749134578e-02, 1.0951525717973709e-01,
-9.7262110862409989e-03, -5.4426799113952706e-02,
-9.9847039232824297e-01, -3.1793252564966679e-03,
-9.9931736252570236e-01, 3.6117909096182677e-02,
7.7656678524001821e-03, -3.9152929186820984e-01, 0, 0, 0, 1],
"intrinsic": [1.2100629810000000e+03, 0.0, 1.0224299030000000e+03,
0.0,1.2058507139999999e+03, 7.9254164400000002e+02,
0.0, 0.0, 1.0]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 275 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 275 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 297 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 262 KiB

@ -1,401 +0,0 @@
[
{
"obj_id": "1",
"obj_type": "Car",
"psr": {
"position": {
"x": 3.529868076024286,
"y": -20.977179189290187,
"z": 0.2729166298029867
},
"rotation": {
"x": -0.06410093347106911,
"y": 0.019216916140136837,
"z": -1.4922565104551522
},
"scale": {
"x": 3.9244923848790014,
"y": 1.865599097293131,
"z": 1.7888008346377304
}
}
},
{
"obj_id": "3",
"obj_type": "Bus",
"psr": {
"position": {
"x": 8.558005738090287,
"y": -43.42623181315385,
"z": 2.2127436169999997
},
"rotation": {
"x": -0.05043085100891321,
"y": 0.00034744616962805586,
"z": 1.4537329581202632
},
"scale": {
"x": 10.607773093776615,
"y": 3.2364406462431763,
"z": 3.2164060563210306
}
}
},
{
"obj_id": "5",
"obj_type": "Rider",
"psr": {
"position": {
"x": 2.5209829273189825,
"y": -42.68335076021329,
"z": 1.584129100000001
},
"rotation": {
"x": 0,
"y": 0,
"z": 4.336244465085028
},
"scale": {
"x": 1.6596497400399342,
"y": 0.6739244576664531,
"z": 1.7
}
}
},
{
"obj_id": "6",
"obj_type": "Rider",
"psr": {
"position": {
"x": -10.771864568778255,
"y": -15.93655177072094,
"z": 0.24457627000000032
},
"rotation": {
"x": 0,
"y": 0,
"z": -1.9517015556769242
},
"scale": {
"x": 1.6596497400399342,
"y": 0.6739244576664531,
"z": 1.7
}
}
},
{
"obj_id": "8",
"obj_type": "Car",
"psr": {
"position": {
"x": 4.1449631260256865,
"y": -49.72015370499495,
"z": 1.8306930000000008
},
"rotation": {
"x": -0.05381384131006369,
"y": 0.0026916304823240986,
"z": 1.449489444900611
},
"scale": {
"x": 4.5,
"y": 1.6788924984728437,
"z": 1.656933188116807
}
}
},
{
"obj_id": "13",
"obj_type": "Car",
"psr": {
"position": {
"x": 4.782968954281387,
"y": -38.264784793961525,
"z": 1.2062180000000002
},
"rotation": {
"x": -0.053129458150669544,
"y": 0,
"z": 1.4605105607601199
},
"scale": {
"x": 4.590450000000001,
"y": 1.8,
"z": 1.4558852218914666
}
}
},
{
"obj_id": "14",
"obj_type": "Pedestrian",
"psr": {
"position": {
"x": 21.764847842841846,
"y": 19.67531983340936,
"z": -2.3684009999999995
},
"rotation": {
"x": 0,
"y": 0,
"z": -1.4134299092031593
},
"scale": {
"x": 0.941235148478231,
"y": 0.8223159109219417,
"z": 1.9347585767365922
}
}
},
{
"obj_id": "15",
"obj_type": "Car",
"psr": {
"position": {
"x": 24.92262785789717,
"y": -31.23023375697396,
"z": 0.346809
},
"rotation": {
"x": 0,
"y": 0,
"z": -0.2819996471249957
},
"scale": {
"x": 4.5,
"y": 1.6458116836318435,
"z": 1.5
}
}
},
{
"obj_id": "20",
"obj_type": "Car",
"psr": {
"position": {
"x": -2.717663507885487,
"y": -28.242388522408124,
"z": 0.918762822918971
},
"rotation": {
"x": -0.06517306244786299,
"y": 0.00010959092045555565,
"z": 4.658312072236952
},
"scale": {
"x": 4.921583727079626,
"y": 4.030003022236565,
"z": 2.0017558148508505
}
}
},
{
"obj_id": "23",
"obj_type": "Car",
"psr": {
"position": {
"x": 15.708570068829054,
"y": 22.8816763991485,
"z": -2.823972376959448
},
"rotation": {
"x": -0.06287060419300494,
"y": 0.044058144173183246,
"z": 1.5608175536652484
},
"scale": {
"x": 4.723135139885376,
"y": 1.6295165184473699,
"z": 1.9629544517990642
}
}
},
{
"obj_id": "27",
"obj_type": "Car",
"psr": {
"position": {
"x": 36.659412470409734,
"y": -34.404139500162444,
"z": 0.8085990000000003
},
"rotation": {
"x": 0,
"y": 0,
"z": 6.04508466163526
},
"scale": {
"x": 4.5,
"y": 1.8,
"z": 1.5
}
}
},
{
"obj_id": "31",
"obj_type": "Pedestrian",
"psr": {
"position": {
"x": -20.783288738584815,
"y": -35.12896563418934,
"z": 1.858591100000001
},
"rotation": {
"x": -0.005200816595089385,
"y": 0,
"z": 1.471107993095347
},
"scale": {
"x": 0.5181025259869625,
"y": 0.7083013780156343,
"z": 1.7341699999999998
}
}
},
{
"obj_id": "50",
"obj_type": "Rider",
"psr": {
"position": {
"x": 15.9087829430282,
"y": -40.12813618888572,
"z": 1.2355839999999998
},
"rotation": {
"x": 0,
"y": 0,
"z": 1.3266865299729125
},
"scale": {
"x": 1.797162849996143,
"y": 1.3257591556815653,
"z": 1.8592649635634135
}
}
},
{
"obj_id": "51",
"obj_type": "Pedestrian",
"psr": {
"position": {
"x": 22.8371355483323,
"y": 4.90188930510908,
"z": -1.7500000000000009
},
"rotation": {
"x": 0,
"y": 0,
"z": 4.482388980384684
},
"scale": {
"x": 0.6015009483696415,
"y": 0.6285815091742153,
"z": 1.7
}
}
},
{
"obj_id": "53",
"obj_type": "Pedestrian",
"psr": {
"position": {
"x": 19.123480909896898,
"y": 1.5139745995868878,
"z": -1.3000000000000005
},
"rotation": {
"x": 0,
"y": 0,
"z": 4.71238898038469
},
"scale": {
"x": 0.7412849208820917,
"y": 0.6806637022431177,
"z": 1.7
}
}
},
{
"obj_id": "54",
"obj_type": "Motor",
"psr": {
"position": {
"x": 24.253720531058207,
"y": 15.162416511901782,
"z": -2.4499999999999993
},
"rotation": {
"x": 0,
"y": 0,
"z": 0.047350384707351756
},
"scale": {
"x": 1.7485658990665154,
"y": 1.0208318215505217,
"z": 1.5
}
}
},
{
"obj_id": "81",
"obj_type": "Pedestrian",
"psr": {
"position": {
"x": -8.085881877042993,
"y": -6.2551993211908155,
"z": -0.1914089000000001
},
"rotation": {
"x": -0.005200816595089385,
"y": 0,
"z": 4.61270064668514
},
"scale": {
"x": 0.6448904310729859,
"y": 0.7083013780156343,
"z": 1.7341699999999998
}
}
},
{
"obj_id": "82",
"obj_type": "Pedestrian",
"psr": {
"position": {
"x": -6.645859750894334,
"y": -4.976769948383015,
"z": 0.7114255483000865
},
"rotation": {
"x": -0.16631359886906968,
"y": 0,
"z": -1.669189425167795
},
"scale": {
"x": 3.302160998965941,
"y": 2.0051437367936247,
"z": 1.9156025512243486
}
}
},
{
"obj_id": "1001",
"obj_type": "Truck",
"psr": {
"position": {
"x": -22.386071618064307,
"y": -21.994698203384374,
"z": 0.8958240400000002
},
"rotation": {
"x": -0.06061705351581413,
"y": 0.0005575736396516535,
"z": 3.082377014838373
},
"scale": {
"x": 5.083309851403533,
"y": 1.7025087091290587,
"z": 2.2705067053039354
}
}
}
]

@ -1,443 +0,0 @@
[
{
"obj_id": "1",
"obj_type": "Car",
"psr": {
"position": {
"x": 4.503374840671313,
"y": -15.877214498771757,
"z": -0.3460004979550271
},
"rotation": {
"x": 0,
"y": 0,
"z": -1.5446163880149815
},
"scale": {
"x": 4.177141189575195,
"y": 1.7932285025511971,
"z": 1.678846906459218
}
}
},
{
"obj_id": "3",
"obj_type": "Bus",
"psr": {
"position": {
"x": 10.521892170327192,
"y": -30.12354183191181,
"z": 1.0691971370000002
},
"rotation": {
"x": -0.05043085100891321,
"y": 0.00034744616962805586,
"z": 1.4962921107974831
},
"scale": {
"x": 10.4060401,
"y": 2.6116105531799785,
"z": 3.2164060563210306
}
}
},
{
"obj_id": "4",
"obj_type": "Car",
"psr": {
"position": {
"x": 5.585192027760058,
"y": -48.75586246676285,
"z": 1.4203556999999993
},
"rotation": {
"x": -0.053810528807219656,
"y": 0.0053141924483858785,
"z": 1.4025025217488531
},
"scale": {
"x": 4.500000000000001,
"y": 1.7126382376921478,
"z": 1.7071399206499345
}
}
},
{
"obj_id": "5",
"obj_type": "Rider",
"psr": {
"position": {
"x": 3.635891386798903,
"y": -35.527682658837875,
"z": 0.8730890000000007
},
"rotation": {
"x": 0,
"y": 0,
"z": 4.166373105671871
},
"scale": {
"x": 1.6596497400399342,
"y": 0.6739244576664531,
"z": 1.7
}
}
},
{
"obj_id": "6",
"obj_type": "Rider",
"psr": {
"position": {
"x": -9.92745449121503,
"y": -11.280291087150871,
"z": -0.3301027299999997
},
"rotation": {
"x": 0,
"y": 0,
"z": 4.8108484679662915
},
"scale": {
"x": 1.6596497400399342,
"y": 0.6739244576664531,
"z": 1.7
}
}
},
{
"obj_id": "8",
"obj_type": "Car",
"psr": {
"position": {
"x": 6.345250193364336,
"y": -38.390702547377195,
"z": 0.938608
},
"rotation": {
"x": -0.05381384131006369,
"y": 0.0026916304823240986,
"z": 1.4440701421438633
},
"scale": {
"x": 4.5,
"y": 1.6788924984728437,
"z": 1.656933188116807
}
}
},
{
"obj_id": "12",
"obj_type": "ScooterRider",
"psr": {
"position": {
"x": 14.820338434030418,
"y": 3.435544743843195,
"z": -1.6107520845526528
},
"rotation": {
"x": -0.053440348687811355,
"y": 0.035967629937501557,
"z": 1.6076175054396962
},
"scale": {
"x": 4.379977656992434,
"y": 1.8005836314652388,
"z": 1.7880874763364236
}
}
},
{
"obj_id": "15",
"obj_type": "Car",
"psr": {
"position": {
"x": 26.014664657890535,
"y": -22.961017751495092,
"z": -0.359602
},
"rotation": {
"x": 0,
"y": 0,
"z": -0.2716148841733539
},
"scale": {
"x": 4.5,
"y": 1.6458116836318435,
"z": 1.5
}
}
},
{
"obj_id": "20",
"obj_type": "Car",
"psr": {
"position": {
"x": -0.7670059417760058,
"y": -30.939386273400487,
"z": 0.7940450000000004
},
"rotation": {
"x": -0.06517306244786299,
"y": 0.00010959092045555565,
"z": 4.66849627543049
},
"scale": {
"x": 4.921583727079626,
"y": 1.6458116836318435,
"z": 2.0017558148508505
}
}
},
{
"obj_id": "23",
"obj_type": "Car",
"psr": {
"position": {
"x": 15.14633855082866,
"y": 30.611494570558676,
"z": -2.9500175400000015
},
"rotation": {
"x": -0.06287060419300494,
"y": 0.044058144173183246,
"z": 1.6023625854728965
},
"scale": {
"x": 4.281595594230369,
"y": 1.6295165184473699,
"z": 1.7242113198564337
}
}
},
{
"obj_id": "27",
"obj_type": "Car",
"psr": {
"position": {
"x": 36.9113921044227,
"y": -25.68832836540986,
"z": 0.008700000000000027
},
"rotation": {
"x": 0,
"y": 0,
"z": 6.024547645659967
},
"scale": {
"x": 4.5,
"y": 1.8,
"z": 1.5
}
}
},
{
"obj_id": "31",
"obj_type": "Pedestrian",
"psr": {
"position": {
"x": -19.401334152866184,
"y": -28.11937218362243,
"z": 1.0960769000000004
},
"rotation": {
"x": -0.005200816595089385,
"y": 0,
"z": 1.6579219608677465
},
"scale": {
"x": 0.5181025259869625,
"y": 0.7083013780156343,
"z": 1.7341699999999998
}
}
},
{
"obj_id": "50",
"obj_type": "Rider",
"psr": {
"position": {
"x": 18.173753849361674,
"y": -30.367500823003894,
"z": 0.2726954
},
"rotation": {
"x": 0,
"y": 0,
"z": 1.3263297456296164
},
"scale": {
"x": 1.797162849996143,
"y": 1.3257591556815653,
"z": 1.8592649635634135
}
}
},
{
"obj_id": "51",
"obj_type": "Pedestrian",
"psr": {
"position": {
"x": 22.97686177419746,
"y": 11.40824442499958,
"z": -1.8135980000000007
},
"rotation": {
"x": 0,
"y": 0,
"z": 4.604303626171054
},
"scale": {
"x": 0.4,
"y": 0.5,
"z": 1.7
}
}
},
{
"obj_id": "53",
"obj_type": "Pedestrian",
"psr": {
"position": {
"x": 19.431924798827822,
"y": 7.5874583524613115,
"z": -1.5661729000000006
},
"rotation": {
"x": 0,
"y": 0,
"z": 4.94889022902884
},
"scale": {
"x": 0.7412849208820917,
"y": 0.6806637022431177,
"z": 1.7
}
}
},
{
"obj_id": "54",
"obj_type": "Motor",
"psr": {
"position": {
"x": 23.871463015599147,
"y": 23.441630667210575,
"z": -2.7554859999999994
},
"rotation": {
"x": 0,
"y": 0,
"z": 0.022992675932349105
},
"scale": {
"x": 1.7485658990665154,
"y": 1.0208318215505217,
"z": 1.5
}
}
},
{
"obj_id": "55",
"obj_type": "Pedestrian",
"psr": {
"position": {
"x": 31.439284482588846,
"y": -4.193343996232173,
"z": -0.9135979999999999
},
"rotation": {
"x": 0,
"y": 0,
"z": 4.604303626171054
},
"scale": {
"x": 0.5285163867593005,
"y": 0.4571699121199565,
"z": 1.7515116999999998
}
}
},
{
"obj_id": "56",
"obj_type": "Pedestrian",
"psr": {
"position": {
"x": 31.391454285232612,
"y": -9.776642501469652,
"z": -0.6135979999999996
},
"rotation": {
"x": 0,
"y": 0,
"z": 4.604303626171054
},
"scale": {
"x": 0.4,
"y": 0.5,
"z": 1.7
}
}
},
{
"obj_id": "81",
"obj_type": "Pedestrian",
"psr": {
"position": {
"x": -8.238199666011496,
"y": -1.2778094076889062,
"z": -0.5347769000000001
},
"rotation": {
"x": -0.005200816595089385,
"y": 0,
"z": 4.42995090230805
},
"scale": {
"x": 0.6448904310729859,
"y": 0.7083013780156343,
"z": 1.7341699999999998
}
}
},
{
"obj_id": "82",
"obj_type": "Pedestrian",
"psr": {
"position": {
"x": -8.833678431936278,
"y": -0.8071350377079227,
"z": -0.3652358000000001
},
"rotation": {
"x": -0.005200816595089385,
"y": 0,
"z": 4.364731468834899
},
"scale": {
"x": 1.693008699814737,
"y": 0.7746587857577377,
"z": 1.9156025512243486
}
}
},
{
"obj_id": "1001",
"obj_type": "Truck",
"psr": {
"position": {
"x": -21.54366493847192,
"y": -15.28593041581101,
"z": 0.31162861999999997
},
"rotation": {
"x": -0.06061705351581413,
"y": 0.0005575736396516535,
"z": 3.1487339004759765
},
"scale": {
"x": 5.083309851403533,
"y": 1.7025087091290587,
"z": 2.2705067053039354
}
}
}
]

@ -1,485 +0,0 @@
[
{
"obj_id": "1",
"obj_type": "Car",
"psr": {
"position": {
"x": 4.784003790176939,
"y": -13.454661395730007,
"z": -0.5538587820529938
},
"rotation": {
"x": 0,
"y": 0,
"z": -1.5446163880149815
},
"scale": {
"x": 4.167753219604492,
"y": 1.9812848567962646,
"z": 1.858795166015625
}
}
},
{
"obj_id": "2",
"obj_type": "Car",
"psr": {
"position": {
"x": 3.586074486432309,
"y": -2.372378855929234,
"z": -1.0705697530267009
},
"rotation": {
"x": -0.06819227924229494,
"y": 0.002044793837571052,
"z": 4.740576049921166
},
"scale": {
"x": 5.076940947017958,
"y": 1.9168826499425866,
"z": 1.5
}
}
},
{
"obj_id": "4",
"obj_type": "Car",
"psr": {
"position": {
"x": 6.165892665278079,
"y": -44.80607990532485,
"z": 1.132732699999999
},
"rotation": {
"x": -0.053810528807219656,
"y": 0.0053141924483858785,
"z": 1.4369887449182623
},
"scale": {
"x": 4.500000000000001,
"y": 1.7126382376921478,
"z": 1.7071399206499345
}
}
},
{
"obj_id": "5",
"obj_type": "Rider",
"psr": {
"position": {
"x": 3.770858943291387,
"y": -32.91325129317749,
"z": 0.6915870000000004
},
"rotation": {
"x": 0,
"y": 0,
"z": 4.005606121419104
},
"scale": {
"x": 1.6596497400399342,
"y": 0.6739244576664531,
"z": 1.7
}
}
},
{
"obj_id": "6",
"obj_type": "Rider",
"psr": {
"position": {
"x": -9.866532331438066,
"y": -9.670873180843602,
"z": -0.46593372999999966
},
"rotation": {
"x": 0,
"y": 0,
"z": 4.638826826395679
},
"scale": {
"x": 1.6596497400399342,
"y": 0.6739244576664531,
"z": 1.7
}
}
},
{
"obj_id": "8",
"obj_type": "Car",
"psr": {
"position": {
"x": 7.053143610148254,
"y": -33.90999396215142,
"z": 0.603445
},
"rotation": {
"x": -0.05381384131006369,
"y": 0.0026916304823240986,
"z": 1.4802022338780045
},
"scale": {
"x": 4.5,
"y": 1.6788924984728437,
"z": 1.656933188116807
}
}
},
{
"obj_id": "11",
"obj_type": "Rider",
"psr": {
"position": {
"x": 11.308020884323923,
"y": -38.0037315949891,
"z": 0.6589369999999996
},
"rotation": {
"x": 0,
"y": 0,
"z": 1.6856137335188808
},
"scale": {
"x": 2.02508808259896,
"y": 0.6606454834491257,
"z": 1.7
}
}
},
{
"obj_id": "12",
"obj_type": "ScooterRider",
"psr": {
"position": {
"x": 14.859489880080266,
"y": 6.447929590857548,
"z": -1.5666677722506137
},
"rotation": {
"x": -0.05336847556558379,
"y": 0.0310775824138393,
"z": 1.5861208514888574
},
"scale": {
"x": 4.399971022524501,
"y": 1.7647274273743618,
"z": 2.3011966721519643
}
}
},
{
"obj_id": "13",
"obj_type": "Car",
"psr": {
"position": {
"x": 7.384257014309696,
"y": -17.53127955603184,
"z": -0.4020345000000003
},
"rotation": {
"x": -0.053129458150669544,
"y": 0,
"z": 1.561265466896798
},
"scale": {
"x": 4.590450000000001,
"y": 1.8,
"z": 1.4558852218914666
}
}
},
{
"obj_id": "15",
"obj_type": "Car",
"psr": {
"position": {
"x": 26.501654719824728,
"y": -20.017881528365823,
"z": -0.483382
},
"rotation": {
"x": 0,
"y": 0,
"z": -0.2570466758939278
},
"scale": {
"x": 4.5,
"y": 1.6458116836318435,
"z": 1.5
}
}
},
{
"obj_id": "20",
"obj_type": "Car",
"psr": {
"position": {
"x": -0.4221746774346684,
"y": -31.822508595860747,
"z": 0.8377380100000005
},
"rotation": {
"x": -0.06517306244786299,
"y": 0.00010959092045555565,
"z": 4.6871396826216944
},
"scale": {
"x": 4.921583727079626,
"y": 1.6458116836318435,
"z": 2.0017558148508505
}
}
},
{
"obj_id": "23",
"obj_type": "Car",
"psr": {
"position": {
"x": 14.86459317241679,
"y": 33.555465961537415,
"z": -3.1861439999999983
},
"rotation": {
"x": -0.06287060419300494,
"y": 0.044058144173183246,
"z": 1.6095676840298194
},
"scale": {
"x": 4.281595594230369,
"y": 1.6295165184473699,
"z": 1.7242113198564337
}
}
},
{
"obj_id": "27",
"obj_type": "Car",
"psr": {
"position": {
"x": 36.97714857076062,
"y": -22.4487879566715,
"z": -0.18954880000000002
},
"rotation": {
"x": 0,
"y": 0,
"z": 6.0389682435723016
},
"scale": {
"x": 4.5,
"y": 1.8,
"z": 1.5
}
}
},
{
"obj_id": "31",
"obj_type": "Pedestrian",
"psr": {
"position": {
"x": -18.973385988607333,
"y": -25.573029990466267,
"z": 0.9052889000000002
},
"rotation": {
"x": -0.005200816595089385,
"y": 0,
"z": 1.6649168109660173
},
"scale": {
"x": 0.5129727980068935,
"y": 0.5634125150659849,
"z": 1.7
}
}
},
{
"obj_id": "50",
"obj_type": "Rider",
"psr": {
"position": {
"x": 18.940376259623008,
"y": -25.913100597094086,
"z": -0.064444
},
"rotation": {
"x": 0,
"y": 0,
"z": 1.45273445713904
},
"scale": {
"x": 1.797162849996143,
"y": 1.3257591556815653,
"z": 1.8592649635634135
}
}
},
{
"obj_id": "51",
"obj_type": "Pedestrian",
"psr": {
"position": {
"x": 23.136293201736407,
"y": 13.815515606019003,
"z": -1.9757900000000008
},
"rotation": {
"x": 0,
"y": 0,
"z": 4.42358809379019
},
"scale": {
"x": 0.5285163867593005,
"y": 0.4571699121199565,
"z": 1.7515116999999998
}
}
},
{
"obj_id": "53",
"obj_type": "Pedestrian",
"psr": {
"position": {
"x": 19.483984140064422,
"y": 9.991123444156456,
"z": -1.680906800000001
},
"rotation": {
"x": 0,
"y": 0,
"z": 4.653458477625549
},
"scale": {
"x": 0.7412849208820917,
"y": 0.6806637022431177,
"z": 1.7
}
}
},
{
"obj_id": "54",
"obj_type": "Motor",
"psr": {
"position": {
"x": 23.854108593626734,
"y": 26.472013961329335,
"z": -2.765640999999999
},
"rotation": {
"x": 0,
"y": 0,
"z": -0.037857281871391146
},
"scale": {
"x": 1.7485658990665154,
"y": 1.0208318215505217,
"z": 1.5
}
}
},
{
"obj_id": "55",
"obj_type": "Pedestrian",
"psr": {
"position": {
"x": 31.86102411918546,
"y": -1.7469702631273432,
"z": -0.9479467999999999
},
"rotation": {
"x": 0,
"y": 0,
"z": 4.6225851649863845
},
"scale": {
"x": 0.5285163867593005,
"y": 0.4571699121199565,
"z": 1.7515116999999998
}
}
},
{
"obj_id": "56",
"obj_type": "Pedestrian",
"psr": {
"position": {
"x": 31.376673016919085,
"y": -6.1856712753724,
"z": -0.8114728499999998
},
"rotation": {
"x": 0,
"y": 0,
"z": 4.644110482942937
},
"scale": {
"x": 0.4,
"y": 0.5,
"z": 1.7
}
}
},
{
"obj_id": "81",
"obj_type": "Pedestrian",
"psr": {
"position": {
"x": -8.48876171313168,
"y": 0.6505407628575157,
"z": -0.6298729000000001
},
"rotation": {
"x": -0.005200816595089385,
"y": 0,
"z": 4.201519019875148
},
"scale": {
"x": 0.8668083543246112,
"y": 0.711262079972739,
"z": 1.7341699999999998
}
}
},
{
"obj_id": "82",
"obj_type": "Pedestrian",
"psr": {
"position": {
"x": -9.083890529840573,
"y": 1.1163202105149936,
"z": -0.5397099000000001
},
"rotation": {
"x": -0.005200816595089385,
"y": 0,
"z": 4.348478208149016
},
"scale": {
"x": 1.693008699814737,
"y": 0.7746587857577377,
"z": 1.9156025512243486
}
}
},
{
"obj_id": "1001",
"obj_type": "Truck",
"psr": {
"position": {
"x": -21.140372247155955,
"y": -12.74937781725756,
"z": 0.172017060029561
},
"rotation": {
"x": -0.06061705351581413,
"y": 0.0005575736396516535,
"z": 3.099867333931262
},
"scale": {
"x": 4.773545657333631,
"y": 1.7025087091290587,
"z": 2.2705067053039354
}
}
}
]

@ -1,506 +0,0 @@
[
{
"obj_id": "1",
"obj_type": "Van",
"psr": {
"position": {
"x": 4.850941318672994,
"y": -10.956022473988245,
"z": -0.48761864042484254
},
"rotation": {
"x": -0.002674811961455094,
"y": 0.10965160628151722,
"z": -1.544461511948178
},
"scale": {
"x": 4.13408170964613,
"y": 1.8086255198874306,
"z": 1.8003957009824072
}
}
},
{
"obj_id": "2",
"obj_type": "Car",
"psr": {
"position": {
"x": 3.88139926311851,
"y": -0.39950599842594453,
"z": -1.1686621480000001
},
"rotation": {
"x": -0.06819227924229494,
"y": 0.002044793837571052,
"z": 4.725015963715173
},
"scale": {
"x": 4.23920355864393,
"y": 1.7529416688834956,
"z": 1.5
}
}
},
{
"obj_id": "3",
"obj_type": "Bus",
"psr": {
"position": {
"x": 11.301814142992953,
"y": -20.922855153597094,
"z": 0.546278617
},
"rotation": {
"x": 0,
"y": 0.040543441913022456,
"z": 1.5018046754088288
},
"scale": {
"x": 10.4060401,
"y": 2.6116105531799785,
"z": 3.2164060563210306
}
}
},
{
"obj_id": "4",
"obj_type": "Car",
"psr": {
"position": {
"x": 6.557943947489548,
"y": -40.68523378018685,
"z": 1.0285126999999994
},
"rotation": {
"x": -0.053810528807219656,
"y": 0.0053141924483858785,
"z": 1.441521147905804
},
"scale": {
"x": 4.500000000000001,
"y": 1.7126382376921478,
"z": 1.7071399206499345
}
}
},
{
"obj_id": "5",
"obj_type": "Rider",
"psr": {
"position": {
"x": 3.3830302707647206,
"y": -30.362142126316222,
"z": 0.5857520000000003
},
"rotation": {
"x": 0,
"y": 0,
"z": 3.681492040356453
},
"scale": {
"x": 1.6596497400399342,
"y": 0.6739244576664531,
"z": 1.7
}
}
},
{
"obj_id": "6",
"obj_type": "Rider",
"psr": {
"position": {
"x": -9.976679027386126,
"y": -8.148731228418796,
"z": -0.5460304529047654
},
"rotation": {
"x": -0.06317162162260596,
"y": 0.015318565742633352,
"z": 4.474803464032996
},
"scale": {
"x": 1.5452174321894951,
"y": 0.5578088167506243,
"z": 1.5933563922247365
}
}
},
{
"obj_id": "8",
"obj_type": "Car",
"psr": {
"position": {
"x": 7.373873177974019,
"y": -29.272960420773632,
"z": 0.432106
},
"rotation": {
"x": -0.05381384131006369,
"y": 0.0026916304823240986,
"z": 1.5055063419654435
},
"scale": {
"x": 4.5,
"y": 1.6788924984728437,
"z": 1.656933188116807
}
}
},
{
"obj_id": "11",
"obj_type": "Rider",
"psr": {
"position": {
"x": 11.466985368202586,
"y": -33.377379928349065,
"z": 0.4561529999999994
},
"rotation": {
"x": 0,
"y": 0,
"z": 1.357548794704233
},
"scale": {
"x": 2.02508808259896,
"y": 0.6606454834491257,
"z": 1.7
}
}
},
{
"obj_id": "12",
"obj_type": "ScooterRider",
"psr": {
"position": {
"x": 15.002234320061689,
"y": 9.128632504918388,
"z": -2.0087403000000004
},
"rotation": {
"x": -0.05336847556558379,
"y": 0.0310775824138393,
"z": 1.5905931753624516
},
"scale": {
"x": 4.3676556656744,
"y": 1.6295165184473699,
"z": 1.7942212135299977
}
}
},
{
"obj_id": "13",
"obj_type": "Car",
"psr": {
"position": {
"x": 7.788851466328197,
"y": -10.98265509509204,
"z": -0.7437820000000004
},
"rotation": {
"x": -0.053129458150669544,
"y": 0,
"z": 1.56051056076012
},
"scale": {
"x": 4.590450000000001,
"y": 1.8,
"z": 1.4558852218914666
}
}
},
{
"obj_id": "15",
"obj_type": "Car",
"psr": {
"position": {
"x": 26.57291603721751,
"y": -17.15000239835484,
"z": -0.6
},
"rotation": {
"x": 0,
"y": 0,
"z": -0.22920367320510482
},
"scale": {
"x": 4.5,
"y": 1.6458116836318435,
"z": 1.5
}
}
},
{
"obj_id": "20",
"obj_type": "Car",
"psr": {
"position": {
"x": -0.4326601345492236,
"y": -32.81936725268655,
"z": 0.9197633000000003
},
"rotation": {
"x": -0.06517306244786299,
"y": 0.00010959092045555565,
"z": 4.668461499912884
},
"scale": {
"x": 4.921583727079626,
"y": 1.6458116836318435,
"z": 2.0017558148508505
}
}
},
{
"obj_id": "23",
"obj_type": "Car",
"psr": {
"position": {
"x": 14.854084900533053,
"y": 36.31688425244575,
"z": -3.494144999999998
},
"rotation": {
"x": -0.06287060419300494,
"y": 0.044058144173183246,
"z": 1.6017988530736593
},
"scale": {
"x": 4.281595594230369,
"y": 1.6295165184473699,
"z": 1.7242113198564337
}
}
},
{
"obj_id": "27",
"obj_type": "Car",
"psr": {
"position": {
"x": 36.95999624850447,
"y": -19.576731641457386,
"z": -0.39999999999999997
},
"rotation": {
"x": 0,
"y": 0,
"z": 6.052388980384655
},
"scale": {
"x": 4.5,
"y": 1.8,
"z": 1.5
}
}
},
{
"obj_id": "31",
"obj_type": "Pedestrian",
"psr": {
"position": {
"x": -18.866816697627655,
"y": -22.86282125027274,
"z": 0.8500000000000002
},
"rotation": {
"x": -0.005200816595089385,
"y": 0,
"z": 1.5907963267948966
},
"scale": {
"x": 0.5129727980068935,
"y": 0.5634125150659849,
"z": 1.7
}
}
},
{
"obj_id": "50",
"obj_type": "Rider",
"psr": {
"position": {
"x": 19.040406728319795,
"y": -21.31166831033424,
"z": -0.1791146
},
"rotation": {
"x": 0,
"y": 0,
"z": 1.6039243132190473
},
"scale": {
"x": 1.797162849996143,
"y": 1.3257591556815653,
"z": 1.8592649635634135
}
}
},
{
"obj_id": "51",
"obj_type": "Pedestrian",
"psr": {
"position": {
"x": 23.278827197860664,
"y": 16.02511764426481,
"z": -2.1734700000000005
},
"rotation": {
"x": 0,
"y": 0,
"z": 4.882149425192646
},
"scale": {
"x": 0.4,
"y": 0.5,
"z": 1.7
}
}
},
{
"obj_id": "53",
"obj_type": "Pedestrian",
"psr": {
"position": {
"x": 19.721963692594727,
"y": 12.073706740754263,
"z": -1.957951600000001
},
"rotation": {
"x": 0,
"y": 0,
"z": 4.550175243538672
},
"scale": {
"x": 0.7412849208820917,
"y": 0.6806637022431177,
"z": 1.7
}
}
},
{
"obj_id": "54",
"obj_type": "Motor",
"psr": {
"position": {
"x": 23.91011734575295,
"y": 29.285895469113342,
"z": -3.1570029999999982
},
"rotation": {
"x": 0,
"y": 0,
"z": 0.11633170712167873
},
"scale": {
"x": 1.7485658990665154,
"y": 1.0208318215505217,
"z": 1.5
}
}
},
{
"obj_id": "55",
"obj_type": "Pedestrian",
"psr": {
"position": {
"x": 32.297311349146185,
"y": 0.47968242174995096,
"z": -0.9565367999999999
},
"rotation": {
"x": 0,
"y": 0,
"z": 4.37493354637721
},
"scale": {
"x": 0.5285163867593005,
"y": 0.4571699121199565,
"z": 1.7515116999999998
}
}
},
{
"obj_id": "56",
"obj_type": "Pedestrian",
"psr": {
"position": {
"x": 31.34751781797604,
"y": -2.787654273957376,
"z": -0.9473519999999997
},
"rotation": {
"x": 0,
"y": 0,
"z": 1.2405159345228731
},
"scale": {
"x": 0.4,
"y": 0.5,
"z": 1.7
}
}
},
{
"obj_id": "81",
"obj_type": "Pedestrian",
"psr": {
"position": {
"x": -8.663487089328555,
"y": 2.770711530826073,
"z": -0.7839459000000002
},
"rotation": {
"x": -0.005200816595089385,
"y": 0,
"z": 4.300758489293951
},
"scale": {
"x": 0.76374659526974,
"y": 0.7083013780156343,
"z": 1.7341699999999998
}
}
},
{
"obj_id": "82",
"obj_type": "Pedestrian",
"psr": {
"position": {
"x": -9.424296512588144,
"y": 2.881378801540134,
"z": -0.6853220949094945
},
"rotation": {
"x": -0.005200816595089385,
"y": 0,
"z": 4.370040436014779
},
"scale": {
"x": 2.377152468109147,
"y": 0.7746587857577377,
"z": 1.9156025512243486
}
}
},
{
"obj_id": "1001",
"obj_type": "Truck",
"psr": {
"position": {
"x": -21.12969353464381,
"y": -9.232904261081396,
"z": -0.37339159297459545
},
"rotation": {
"x": 0.025047730911594995,
"y": -0.0015804909276805725,
"z": 3.1166765109083716
},
"scale": {
"x": 5.083309851403533,
"y": 1.7025087091290587,
"z": 2.2705067053039354
}
}
}
]

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -104,7 +104,7 @@ def get_all_scene_desc():
def objs_of_scene(scene: str):
"""获取场景中的所有对象"""
# todo从数据库查询图片列表
return SceneService.get_all_objs(os.path.join("./data", scene))
return SceneService.get_all_objs(os.path.join("data", scene))
# 无须修改
@router.post("/cropscene")
@ -132,7 +132,7 @@ async def cropscene(request_data: CropSceneRequest):
return {"code": code, "log": log}
# todo 修改完成一半
# 已修改完成
@router.get("/scenemeta")
def scenemeta(scene: str):
# 获取s目录下的所有文件信息
@ -143,10 +143,12 @@ def scenemeta(scene: str):
def auto_annotate(scene: str, frame: str):
"""自动标注"""
print(f"Auto annotate {scene}, {frame}")
file_path = f'./data/{scene}/lidar/{frame}.pcd'
file_path = f'data/{scene}/lidar/{frame}.pcd'
if not os.path.exists(file_path):
raise HTTPException(status_code=404, detail=f"File not found: {file_path}")
return pre_annotate.annotate_file(file_path)
# 原始静态资源获取
@router.get("/data/{file:path}")
def get_file(file):
file_path = f'/data/{file}'
@ -173,25 +175,3 @@ def get_file(file):
media_type=media_type,
headers=headers
)
# @router.get("/get_file")
def get_file(file_path:str):
"""获取文件"""
conn=MinioServer()
minio_file=conn.get_file(MINIO_BUCKET, file_path)
# media_type, _ = mimetypes.guess_type(minio_file)
# if media_type is None:
media_type = 'application/octet-stream' # 默认二进制流
# 设置响应头,告诉浏览器这是一个附件,并建议文件名
headers = {
'Content-Disposition': f'attachment; filename="{os.path.basename(file_path)}"',
"Content-Type": media_type,
}
# 使用 StreamingResponse 进行流式响应
# response.data 是一个类似文件的对象,可以被直接读取
return Response(
minio_file.read(), # 将整个文件读入内存后返回(简单但内存占用高)
# 更优的流式方式见下方说明
media_type=media_type,
headers=headers
)

Loading…
Cancel
Save