Spaces:
Running
on
Zero
Running
on
Zero
File size: 5,099 Bytes
38e3f9b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
import ast
CAMERA_MODE = ["Traj2Cam", "Rotate", "Clockwise", "Translate"]
def sync_points(points_str):
return ast.literal_eval(points_str) # convert string to list
examples = [
# Traj2Cam
[
{"image": "./assets/images/image_1.png"}, # raw_input
1.0, # rescale
1.0, # speed
60, # angle
0, # Tx
0, # Ty
0, # Tz
CAMERA_MODE[0], # camera_option
"Fixed", # bg_mode
False, # shared_wapring_latents
True, # scale_wise_masks
0.5, # ds
0.5, # dt
"42", # seed
"[[231, 122], [413, 154]]"
],
# Cloud
[
{"image": "./assets/images/image_6.png"}, # raw_input
0, # rescale
4.0, # speed
60, # angle
0, # Tx
0, # Ty
-1, # Tz
CAMERA_MODE[3], # camera_option
"Fixed", # bg_mode
False, # shared_wapring_latents
True, # scale_wise_masks
0.5, # ds
0.5, # dt
"42", # seed
[] # points
],
[
{"image": "./assets/images/image_6.png"}, # raw_input
0, # rescale
4.0, # speed
60, # angle
1, # Tx
0, # Ty
0, # Tz
CAMERA_MODE[3], # camera_option
"Fixed", # bg_mode
False, # shared_wapring_latents
True, # scale_wise_masks
0.5, # ds
0.5, # dt
"42", # seed
[] # points
],
[
{"image": "./assets/images/image_6.png"}, # raw_input
0, # rescale
4.0, # speed
60, # angle
-1, # Tx
0, # Ty
0, # Tz
CAMERA_MODE[3], # camera_option
"Fixed", # bg_mode
False, # shared_wapring_latents
True, # scale_wise_masks
0.5, # ds
0.5, # dt
"42", # seed
[] # points
],
# ACW
[
{"image": "./assets/images/00043.png"}, # raw_input
0, # rescale
1.0, # speed
60, # angle
0, # Tx
0, # Ty
0, # Tz
CAMERA_MODE[2], # camera_option
"Fixed", # bg_mode
True, # shared_wapring_latents
True, # scale_wise_masks
0.5, # ds
0.5, # dt
"42", # seed
[] # points
],
# Rotation
[
{"image": "./assets/images/rose_320x576.png"}, # raw_input
0, # rescale
1.0, # speed
60, # angle
0, # Tx
0, # Ty
0, # Tz
CAMERA_MODE[1], # camera_option
"Fixed", # bg_mode
False, # shared_wapring_latents
True, # scale_wise_masks
0.5, # ds
0.5, # dt
"42", # seed
[] # points
],
[
{"image": "./assets/images/00051.png"}, # raw_input
0, # rescale
1.0, # speed
60, # angle
0, # Tx
0, # Ty
0, # Tz
CAMERA_MODE[1], # camera_option
"Fixed", # bg_mode
False, # shared_wapring_latents
True, # scale_wise_masks
0.5, # ds
0.5, # dt
"42", # seed
[] # points
],
# bg
# Traj2Cam
[
{"image": "./assets/images/00034.png"}, # raw_input
1.0, # rescale
1.0, # speed
60, # angle
0, # Tx
0, # Ty
0, # Tz
CAMERA_MODE[0], # camera_option
"Fixed", # bg_mode
False, # shared_wapring_latents
True, # scale_wise_masks
0.5, # ds
0.5, # dt
"42", # seed
[[33, 285], [35, 279], [37, 276], [39, 273], [42, 269], [44, 267], [47, 264], [50, 260], [51, 257], [55, 254], [57, 252], [62, 248], [68, 245], [74, 241]] # points
],
# Traj2Cam
[
{"image": "./assets/images/00034.png"}, # raw_input
1.0, # rescale
1.0, # speed
60, # angle
0, # Tx
0, # Ty
0, # Tz
CAMERA_MODE[0], # camera_option
"Reverse", # bg_mode
False, # shared_wapring_latents
True, # scale_wise_masks
0.5, # ds
0.5, # dt
"42", # seed
[[33, 285], [35, 279], [37, 276], [39, 273], [42, 269], [44, 267], [47, 264], [50, 260], [51, 257], [55, 254], [57, 252], [62, 248], [68, 245], [74, 241]] # points
],
# Traj2Cam
[
{"image": "./assets/images/00034.png"}, # raw_input
1.0, # rescale
1.0, # speed
60, # angle
0, # Tx
0, # Ty
0, # Tz
CAMERA_MODE[0], # camera_option
"Free", # bg_mode
False, # shared_wapring_latents
True, # scale_wise_masks
0.5, # ds
0.5, # dt
"42", # seed
[[33, 285], [35, 279], [37, 276], [39, 273], [42, 269], [44, 267], [47, 264], [50, 260], [51, 257], [55, 254], [57, 252], [62, 248], [68, 245], [74, 241]] # points
],
] |