Python object_detection.core.keypoint_ops.to_normalized_coordinates() Examples
The following are 30
code examples of object_detection.core.keypoint_ops.to_normalized_coordinates().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
object_detection.core.keypoint_ops
, or try the search function
.
Example #1
Source File: keypoint_ops_test.py From MAX-Object-Detector with Apache License 2.0 | 5 votes |
def test_to_normalized_coordinates(self): keypoints = tf.constant([ [[10., 30.], [30., 45.]], [[20., 0.], [40., 60.]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) expected_keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) with self.test_session() as sess: output_, expected_keypoints_ = sess.run([output, expected_keypoints]) self.assertAllClose(output_, expected_keypoints_)
Example #2
Source File: keypoint_ops_test.py From hands-detection with MIT License | 5 votes |
def test_to_normalized_coordinates(self): keypoints = tf.constant([ [[10., 30.], [30., 45.]], [[20., 0.], [40., 60.]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) expected_keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) with self.test_session() as sess: output_, expected_keypoints_ = sess.run([output, expected_keypoints]) self.assertAllClose(output_, expected_keypoints_)
Example #3
Source File: keypoint_ops_test.py From hands-detection with MIT License | 5 votes |
def test_to_normalized_coordinates_already_normalized(self): keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) with self.test_session() as sess: with self.assertRaisesOpError('assertion failed'): sess.run(output)
Example #4
Source File: keypoint_ops_test.py From object_detection_kitti with Apache License 2.0 | 5 votes |
def test_to_normalized_coordinates(self): keypoints = tf.constant([ [[10., 30.], [30., 45.]], [[20., 0.], [40., 60.]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) expected_keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) with self.test_session() as sess: output_, expected_keypoints_ = sess.run([output, expected_keypoints]) self.assertAllClose(output_, expected_keypoints_)
Example #5
Source File: keypoint_ops_test.py From object_detection_kitti with Apache License 2.0 | 5 votes |
def test_to_normalized_coordinates_already_normalized(self): keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) with self.test_session() as sess: with self.assertRaisesOpError('assertion failed'): sess.run(output)
Example #6
Source File: keypoint_ops_test.py From MBMD with MIT License | 5 votes |
def test_to_normalized_coordinates(self): keypoints = tf.constant([ [[10., 30.], [30., 45.]], [[20., 0.], [40., 60.]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) expected_keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) with self.test_session() as sess: output_, expected_keypoints_ = sess.run([output, expected_keypoints]) self.assertAllClose(output_, expected_keypoints_)
Example #7
Source File: keypoint_ops_test.py From MBMD with MIT License | 5 votes |
def test_to_normalized_coordinates_already_normalized(self): keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) with self.test_session() as sess: with self.assertRaisesOpError('assertion failed'): sess.run(output)
Example #8
Source File: keypoint_ops_test.py From Elphas with Apache License 2.0 | 5 votes |
def test_to_normalized_coordinates(self): keypoints = tf.constant([ [[10., 30.], [30., 45.]], [[20., 0.], [40., 60.]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) expected_keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) with self.test_session() as sess: output_, expected_keypoints_ = sess.run([output, expected_keypoints]) self.assertAllClose(output_, expected_keypoints_)
Example #9
Source File: keypoint_ops_test.py From Elphas with Apache License 2.0 | 5 votes |
def test_to_normalized_coordinates_already_normalized(self): keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) with self.test_session() as sess: with self.assertRaisesOpError('assertion failed'): sess.run(output)
Example #10
Source File: keypoint_ops_test.py From object_detection_with_tensorflow with MIT License | 5 votes |
def test_to_normalized_coordinates(self): keypoints = tf.constant([ [[10., 30.], [30., 45.]], [[20., 0.], [40., 60.]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) expected_keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) with self.test_session() as sess: output_, expected_keypoints_ = sess.run([output, expected_keypoints]) self.assertAllClose(output_, expected_keypoints_)
Example #11
Source File: keypoint_ops_test.py From object_detection_with_tensorflow with MIT License | 5 votes |
def test_to_normalized_coordinates_already_normalized(self): keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) with self.test_session() as sess: with self.assertRaisesOpError('assertion failed'): sess.run(output)
Example #12
Source File: keypoint_ops_test.py From object_detection_with_tensorflow with MIT License | 5 votes |
def test_to_normalized_coordinates(self): keypoints = tf.constant([ [[10., 30.], [30., 45.]], [[20., 0.], [40., 60.]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) expected_keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) with self.test_session() as sess: output_, expected_keypoints_ = sess.run([output, expected_keypoints]) self.assertAllClose(output_, expected_keypoints_)
Example #13
Source File: keypoint_ops_test.py From object_detection_with_tensorflow with MIT License | 5 votes |
def test_to_normalized_coordinates_already_normalized(self): keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) with self.test_session() as sess: with self.assertRaisesOpError('assertion failed'): sess.run(output)
Example #14
Source File: keypoint_ops_test.py From AniSeg with Apache License 2.0 | 5 votes |
def test_to_normalized_coordinates(self): keypoints = tf.constant([ [[10., 30.], [30., 45.]], [[20., 0.], [40., 60.]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) expected_keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) with self.test_session() as sess: output_, expected_keypoints_ = sess.run([output, expected_keypoints]) self.assertAllClose(output_, expected_keypoints_)
Example #15
Source File: keypoint_ops_test.py From AniSeg with Apache License 2.0 | 5 votes |
def test_to_normalized_coordinates_already_normalized(self): keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) with self.test_session() as sess: with self.assertRaisesOpError('assertion failed'): sess.run(output)
Example #16
Source File: keypoint_ops_test.py From moveo_ros with MIT License | 5 votes |
def test_to_normalized_coordinates_already_normalized(self): keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) with self.test_session() as sess: with self.assertRaisesOpError('assertion failed'): sess.run(output)
Example #17
Source File: keypoint_ops_test.py From MAX-Object-Detector with Apache License 2.0 | 5 votes |
def test_to_normalized_coordinates_already_normalized(self): keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) with self.test_session() as sess: with self.assertRaisesOpError('assertion failed'): sess.run(output)
Example #18
Source File: keypoint_ops_test.py From Accident-Detection-on-Indian-Roads with GNU Affero General Public License v3.0 | 5 votes |
def test_to_normalized_coordinates(self): keypoints = tf.constant([ [[10., 30.], [30., 45.]], [[20., 0.], [40., 60.]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) expected_keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) with self.test_session() as sess: output_, expected_keypoints_ = sess.run([output, expected_keypoints]) self.assertAllClose(output_, expected_keypoints_)
Example #19
Source File: keypoint_ops_test.py From Accident-Detection-on-Indian-Roads with GNU Affero General Public License v3.0 | 5 votes |
def test_to_normalized_coordinates_already_normalized(self): keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) with self.test_session() as sess: with self.assertRaisesOpError('assertion failed'): sess.run(output)
Example #20
Source File: keypoint_ops_test.py From g-tensorflow-models with Apache License 2.0 | 5 votes |
def test_to_normalized_coordinates(self): keypoints = tf.constant([ [[10., 30.], [30., 45.]], [[20., 0.], [40., 60.]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) expected_keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) with self.test_session() as sess: output_, expected_keypoints_ = sess.run([output, expected_keypoints]) self.assertAllClose(output_, expected_keypoints_)
Example #21
Source File: keypoint_ops_test.py From g-tensorflow-models with Apache License 2.0 | 5 votes |
def test_to_normalized_coordinates_already_normalized(self): keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) with self.test_session() as sess: with self.assertRaisesOpError('assertion failed'): sess.run(output)
Example #22
Source File: keypoint_ops_test.py From models with Apache License 2.0 | 5 votes |
def test_to_normalized_coordinates(self): def graph_fn(): keypoints = tf.constant([ [[10., 30.], [30., 45.]], [[20., 0.], [40., 60.]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) expected_keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) return output, expected_keypoints output, expected_keypoints = self.execute(graph_fn, []) self.assertAllClose(output, expected_keypoints)
Example #23
Source File: keypoint_ops_test.py From models with Apache License 2.0 | 5 votes |
def test_to_normalized_coordinates_already_normalized(self): if self.has_tpu(): return def graph_fn(): keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) return output with self.assertRaisesOpError('assertion failed'): self.execute_cpu(graph_fn, [])
Example #24
Source File: keypoint_ops_test.py From motion-rcnn with MIT License | 5 votes |
def test_to_normalized_coordinates(self): keypoints = tf.constant([ [[10., 30.], [30., 45.]], [[20., 0.], [40., 60.]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) expected_keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) with self.test_session() as sess: output_, expected_keypoints_ = sess.run([output, expected_keypoints]) self.assertAllClose(output_, expected_keypoints_)
Example #25
Source File: keypoint_ops_test.py From motion-rcnn with MIT License | 5 votes |
def test_to_normalized_coordinates_already_normalized(self): keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) with self.test_session() as sess: with self.assertRaisesOpError('assertion failed'): sess.run(output)
Example #26
Source File: keypoint_ops_test.py From mtl-ssl with Apache License 2.0 | 5 votes |
def test_to_normalized_coordinates(self): keypoints = tf.constant([ [[10., 30.], [30., 45.]], [[20., 0.], [40., 60.]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) expected_keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) with self.test_session() as sess: output_, expected_keypoints_ = sess.run([output, expected_keypoints]) self.assertAllClose(output_, expected_keypoints_)
Example #27
Source File: keypoint_ops_test.py From mtl-ssl with Apache License 2.0 | 5 votes |
def test_to_normalized_coordinates_already_normalized(self): keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) with self.test_session() as sess: with self.assertRaisesOpError('assertion failed'): sess.run(output)
Example #28
Source File: keypoint_ops_test.py From multilabel-image-classification-tensorflow with MIT License | 5 votes |
def test_to_normalized_coordinates(self): keypoints = tf.constant([ [[10., 30.], [30., 45.]], [[20., 0.], [40., 60.]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) expected_keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) with self.test_session() as sess: output_, expected_keypoints_ = sess.run([output, expected_keypoints]) self.assertAllClose(output_, expected_keypoints_)
Example #29
Source File: keypoint_ops_test.py From multilabel-image-classification-tensorflow with MIT License | 5 votes |
def test_to_normalized_coordinates_already_normalized(self): keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) with self.test_session() as sess: with self.assertRaisesOpError('assertion failed'): sess.run(output)
Example #30
Source File: keypoint_ops_test.py From yolo_v2 with Apache License 2.0 | 5 votes |
def test_to_normalized_coordinates_already_normalized(self): keypoints = tf.constant([ [[0.25, 0.5], [0.75, 0.75]], [[0.5, 0.0], [1.0, 1.0]] ]) output = keypoint_ops.to_normalized_coordinates( keypoints, 40, 60) with self.test_session() as sess: with self.assertRaisesOpError('assertion failed'): sess.run(output)