@@ -1601,6 +1601,7 @@ def testAddEvalDict(self):
1601
1601
groundtruth_boxes = tf .placeholder (tf .float32 , shape = (None , 4 ))
1602
1602
groundtruth_classes = tf .placeholder (tf .float32 , shape = (None ))
1603
1603
groundtruth_masks = tf .placeholder (tf .uint8 , shape = (None , None , None ))
1604
+ original_image_spatial_shape = tf .placeholder (tf .int32 , shape = (None , 2 ))
1604
1605
detection_scores = tf .placeholder (tf .float32 , shape = (None ))
1605
1606
detection_classes = tf .placeholder (tf .float32 , shape = (None ))
1606
1607
detection_masks = tf .placeholder (tf .uint8 , shape = (None , None , None ))
@@ -1612,6 +1613,8 @@ def testAddEvalDict(self):
1612
1613
input_data_fields .groundtruth_boxes : groundtruth_boxes ,
1613
1614
input_data_fields .groundtruth_classes : groundtruth_classes ,
1614
1615
input_data_fields .groundtruth_instance_masks : groundtruth_masks ,
1616
+ input_data_fields .original_image_spatial_shape :
1617
+ original_image_spatial_shape ,
1615
1618
detection_fields .detection_scores : detection_scores ,
1616
1619
detection_fields .detection_classes : detection_classes ,
1617
1620
detection_fields .detection_masks : detection_masks ,
@@ -1637,6 +1640,7 @@ def testAddEvalDict(self):
1637
1640
np .ones ([50 , 50 ], dtype = np .uint8 ), ((0 , 70 ), (0 , 70 )),
1638
1641
mode = 'constant' )
1639
1642
]),
1643
+ original_image_spatial_shape : np .array ([[120 , 120 ]]),
1640
1644
detection_scores :
1641
1645
np .array ([.9 , .8 ]),
1642
1646
detection_classes :
@@ -1661,6 +1665,7 @@ def testGetOneMAPWithMatchingGroundtruthAndDetections(self):
1661
1665
groundtruth_boxes = tf .placeholder (tf .float32 , shape = (None , 4 ))
1662
1666
groundtruth_classes = tf .placeholder (tf .float32 , shape = (None ))
1663
1667
groundtruth_masks = tf .placeholder (tf .uint8 , shape = (None , None , None ))
1668
+ original_image_spatial_shape = tf .placeholder (tf .int32 , shape = (None , 2 ))
1664
1669
detection_scores = tf .placeholder (tf .float32 , shape = (None ))
1665
1670
detection_classes = tf .placeholder (tf .float32 , shape = (None ))
1666
1671
detection_masks = tf .placeholder (tf .uint8 , shape = (None , None , None ))
@@ -1672,6 +1677,8 @@ def testGetOneMAPWithMatchingGroundtruthAndDetections(self):
1672
1677
input_data_fields .groundtruth_boxes : groundtruth_boxes ,
1673
1678
input_data_fields .groundtruth_classes : groundtruth_classes ,
1674
1679
input_data_fields .groundtruth_instance_masks : groundtruth_masks ,
1680
+ input_data_fields .original_image_spatial_shape :
1681
+ original_image_spatial_shape ,
1675
1682
detection_fields .detection_scores : detection_scores ,
1676
1683
detection_fields .detection_classes : detection_classes ,
1677
1684
detection_fields .detection_masks : detection_masks ,
@@ -1701,6 +1708,7 @@ def testGetOneMAPWithMatchingGroundtruthAndDetections(self):
1701
1708
np .ones ([50 , 50 ], dtype = np .uint8 ), ((0 , 70 ), (0 , 70 )),
1702
1709
mode = 'constant' )
1703
1710
]),
1711
+ original_image_spatial_shape : np .array ([[120 , 120 ], [120 , 120 ]]),
1704
1712
detection_scores :
1705
1713
np .array ([.9 , .8 ]),
1706
1714
detection_classes :
@@ -1725,6 +1733,7 @@ def testGetOneMAPWithMatchingGroundtruthAndDetections(self):
1725
1733
dtype = np .uint8 ),
1726
1734
((0 , 0 ), (10 , 10 ), (10 , 10 )),
1727
1735
mode = 'constant' ),
1736
+ original_image_spatial_shape : np .array ([[70 , 70 ]]),
1728
1737
detection_scores : np .array ([.8 ]),
1729
1738
detection_classes : np .array ([1 ]),
1730
1739
detection_masks : np .pad (np .ones ([1 , 50 , 50 ], dtype = np .uint8 ),
@@ -1740,6 +1749,7 @@ def testGetOneMAPWithMatchingGroundtruthAndDetections(self):
1740
1749
dtype = np .uint8 ),
1741
1750
((0 , 0 ), (10 , 10 ), (10 , 10 )),
1742
1751
mode = 'constant' ),
1752
+ original_image_spatial_shape : np .array ([[45 , 45 ]]),
1743
1753
detection_scores : np .array ([.8 ]),
1744
1754
detection_classes : np .array ([1 ]),
1745
1755
detection_masks : np .pad (np .ones ([1 , 25 , 25 ],
@@ -1778,6 +1788,7 @@ def testGetOneMAPWithMatchingGroundtruthAndDetectionsBatched(self):
1778
1788
groundtruth_classes = tf .placeholder (tf .float32 , shape = (batch_size , None ))
1779
1789
groundtruth_masks = tf .placeholder (
1780
1790
tf .uint8 , shape = (batch_size , None , None , None ))
1791
+ original_image_spatial_shape = tf .placeholder (tf .int32 , shape = (None , 2 ))
1781
1792
detection_scores = tf .placeholder (tf .float32 , shape = (batch_size , None ))
1782
1793
detection_classes = tf .placeholder (tf .float32 , shape = (batch_size , None ))
1783
1794
detection_masks = tf .placeholder (
@@ -1790,6 +1801,8 @@ def testGetOneMAPWithMatchingGroundtruthAndDetectionsBatched(self):
1790
1801
input_data_fields .groundtruth_boxes : groundtruth_boxes ,
1791
1802
input_data_fields .groundtruth_classes : groundtruth_classes ,
1792
1803
input_data_fields .groundtruth_instance_masks : groundtruth_masks ,
1804
+ input_data_fields .original_image_spatial_shape :
1805
+ original_image_spatial_shape ,
1793
1806
detection_fields .detection_scores : detection_scores ,
1794
1807
detection_fields .detection_classes : detection_classes ,
1795
1808
detection_fields .detection_masks : detection_masks ,
@@ -1826,6 +1839,8 @@ def testGetOneMAPWithMatchingGroundtruthAndDetectionsBatched(self):
1826
1839
mode = 'constant' )
1827
1840
],
1828
1841
axis = 0 ),
1842
+ original_image_spatial_shape : np .array (
1843
+ [[100 , 100 ], [100 , 100 ], [100 , 100 ]]),
1829
1844
detection_scores :
1830
1845
np .array ([[.8 ], [.8 ], [.8 ]]),
1831
1846
detection_classes :
0 commit comments