google-research

Форк
0
83 строки · 2.9 Кб
1
// Copyright 2024 The Google Research Authors.
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
//     http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14

15
syntax = "proto2";
16

17
package keypose;
18

19
// 4x4 transform matrix, row major order.
20
// Transform is cam_T_world, from world to camera coordinates.
21
message Transform {
22
  repeated float element = 1;
23
}
24

25
message Camera {
26
  optional float fx = 1;  // In pixels.
27
  optional float fy = 2;
28
  optional float cx = 3;
29
  optional float cy = 4;
30
  optional float baseline = 5;  // In meters.
31
  optional float resx = 6;      // Image resolution in pixels.
32
  optional float resy = 7;
33
}
34

35
// Targets are assocated with an image:
36
//   Transform from world to camera, cam_T_world.
37
//   Camera parameters.
38
//   Keypoints in the image.
39
message Target {
40
  optional keypose.Transform transform = 1;
41
  optional keypose.Camera camera = 2;
42

43
  message KeyPoint {
44
    optional float u = 1;  // Image coords (pixels) of kp.
45
    optional float v = 2;
46
    optional float x = 3;  // x,y are normalized image coords of kp, NOT 3D x,y.
47
    optional float y = 4;  // Normalized coords are in [0, 1].
48
    optional float z = 5;  // Distance from camera (m) of kp.
49
    optional float visible = 6 [default = 1.0];  // 1.0 if kp is onscreen.
50
  }
51

52
  repeated KeyPoint keypoints = 3;
53
}
54

55
// Keypoint and projection targets for an image.
56
// This is the top-level pb for stereo samples.
57
message KeyTargets {
58
  optional keypose.Target kp_target = 1;
59
  repeated keypose.Target proj_targets = 2;
60
  optional bool mirrored = 3 [default = false];
61
}
62

63
// Dataset parameters.
64
message DataParams {
65
  // TODO: resx, resy are redundant given the camera.
66
  optional int32 resx = 1;
67
  optional int32 resy = 2;
68
  optional int32 num_kp = 3;
69
  optional keypose.Camera camera = 4;
70
}
71

72
// TFRecord sets for training and evaluation
73
message TfSet {
74
  optional string name = 1;  // Output will be in keypose/tfrecords/<name>.
75
  optional string common_dir = 2;  // Directory prefix common to all files,
76
                                   // e.g. keypose/data/bottle_0.
77
  repeated string train = 3;  // Training tfrecord dirs (e.g. */756x424_fl400).
78
  repeated string val = 4;    // Val tfrecord dirs (texture_5_*/756x424_fl400).
79
                              // Note: val dirs are excluded from train dirs.
80
  repeated string exclude = 5;     // Exclude these dirs from train/val.
81
  optional string image_size = 6;  // Resized image, e.g., 756x424_fl400.
82
                                   // fl400 means focal length 400 pixels.
83
}
84

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.