| 237 | return outputs |
| 238 | ''' |
| 239 | def _call(self, inputs): |
| 240 | coord = inputs |
| 241 | X = inputs[:, 0] |
| 242 | Y = inputs[:, 1] |
| 243 | Z = inputs[:, 2] |
| 244 | |
| 245 | h = 250 * tf.divide(-Y, -Z) + 112 |
| 246 | w = 250 * tf.divide(X, -Z) + 112 |
| 247 | |
| 248 | h = tf.minimum(tf.maximum(h, 0), 223) |
| 249 | w = tf.minimum(tf.maximum(w, 0), 223) |
| 250 | |
| 251 | x = h/(224.0/56) |
| 252 | y = w/(224.0/56) |
| 253 | out1 = project(self.img_feat[0], x, y, 64) |
| 254 | |
| 255 | x = h/(224.0/28) |
| 256 | y = w/(224.0/28) |
| 257 | out2 = project(self.img_feat[1], x, y, 128) |
| 258 | |
| 259 | x = h/(224.0/14) |
| 260 | y = w/(224.0/14) |
| 261 | out3 = project(self.img_feat[2], x, y, 256) |
| 262 | |
| 263 | x = h/(224.0/7) |
| 264 | y = w/(224.0/7) |
| 265 | out4 = project(self.img_feat[3], x, y, 512) |
| 266 | outputs = tf.concat([coord,out1,out2,out3,out4], 1) |
| 267 | return outputs |