未验证 提交 a5ccaae9 编写于 作者: K KP 提交者: GitHub

Merge pull request #1832 from rainyfly/fix_vision_utils_bug

Fix vision utils bug
......@@ -11,15 +11,17 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
from typing import Callable, Union, List, Tuple
from typing import Callable
from typing import List
from typing import Tuple
from typing import Union
import cv2
import paddle
import PIL
import numpy as np
import paddle
import paddle.nn.functional as F
import PIL.Image
from scipy.sparse import csr_matrix
......@@ -129,8 +131,7 @@ def draw_boxes_on_image(image_path: str,
x1, y1, x2, y2 = box[0], box[1], box[2], box[3]
rect = plt.Rectangle((x1, y1), x2 - x1, y2 - y1, fill=False, linewidth=2.0, edgecolor=colors[label])
ax.add_patch(rect)
ax.text(
x1,
ax.text(x1,
y1,
'{} {:.4f}'.format(label_names[label], score),
verticalalignment='bottom',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册