如何繪製邊界框而不使用tensorflow object-detection api中的歸一化座標?在object_detection_tutorial.ipynb中,我注意到默認座標是在標準化座標中,框的形式是[xmin,ymin,xmax,ymax]以及如何將它們轉換爲[image_length xmin,image_width ymin,image_length xmax,image_width ymax ]? 我嘗試使用如何繪製邊界框而不使用張量流對象檢測api中的歸一化座標
boxes[0]=boxes[0]*200
boxes[1]=boxes[1]*100
boxes[2]=boxes[2]*200
boxes[3]=boxes[3]*100
但發生錯誤:
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-72-efcec9615ee3> in <module>()
30 feed_dict={image_tensor: image_np_expanded})
31 boxes[0]=boxes[0]*200
---> 32 boxes[1]=boxes[1]*100
33 boxes[2]=boxes[2]*200
34 boxes[3]=boxes[3]*100
IndexError: index 1 is out of bounds for axis 0 with size 1
檢查盒子變暗的變量。在索引0處是圖像1的bboxes。在索引1是第二個圖像的Bbox的Nx4矩陣,等等...... –