diff --git a/deploy/pptracking/python/visualize.py b/deploy/pptracking/python/visualize.py index 58de0a966f5c69eeef035fe6e2cafbf3f7ffbc8f..86dc0e9ad4d5a2b8b98bd5456bbc60754d530d83 100644 --- a/deploy/pptracking/python/visualize.py +++ b/deploy/pptracking/python/visualize.py @@ -17,7 +17,8 @@ from __future__ import division import os import cv2 import numpy as np -from PIL import Image, ImageDraw +from PIL import Image, ImageDraw, ImageFile +ImageFile.LOAD_TRUNCATED_IMAGES = True from collections import deque diff --git a/deploy/python/visualize.py b/deploy/python/visualize.py index c49068930a9c3e1d846222deb919c84eb956a278..7e322973d48407df676600a26a718e2317d4f77b 100644 --- a/deploy/python/visualize.py +++ b/deploy/python/visualize.py @@ -18,7 +18,8 @@ from __future__ import division import os import cv2 import numpy as np -from PIL import Image, ImageDraw +from PIL import Image, ImageDraw, ImageFile +ImageFile.LOAD_TRUNCATED_IMAGES = True import math diff --git a/ppdet/engine/trainer.py b/ppdet/engine/trainer.py index 157be4e3132f9d966777d4ed65de14db4cb34678..0d073d028102d509edc0cb489b4abb915f8b717d 100644 --- a/ppdet/engine/trainer.py +++ b/ppdet/engine/trainer.py @@ -23,7 +23,8 @@ import time import numpy as np import typing -from PIL import Image, ImageOps +from PIL import Image, ImageOps, ImageFile +ImageFile.LOAD_TRUNCATED_IMAGES = True import paddle import paddle.distributed as dist