Skip to content

Commit f2cc76d

Browse files
authored
Update Pillow version and py3 fix (#351)
1 parent 2aa6204 commit f2cc76d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

benchmarks/common/tensorflow/start.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ function maskrcnn() {
449449
if [ ${NOINSTALL} != "True" ]; then
450450
# install dependencies
451451
pip3 install -r ${MOUNT_EXTERNAL_MODELS_SOURCE}/requirements.txt
452-
pip3 install --force-reinstall scipy==1.2.1
452+
pip3 install --force-reinstall scipy==1.2.1 Pillow==5.3.0
453453

454454
# install cocoapi
455455
get_cocoapi ${MOUNT_EXTERNAL_MODELS_SOURCE}/coco ${MOUNT_EXTERNAL_MODELS_SOURCE}/samples/coco
@@ -551,6 +551,7 @@ function rfcn() {
551551
if [ ${NOINSTALL} != "True" ]; then
552552
# install dependencies
553553
pip install -r "${MOUNT_BENCHMARK}/object_detection/tensorflow/rfcn/requirements.txt"
554+
554555
original_dir=$(pwd)
555556

556557
cd "${MOUNT_EXTERNAL_MODELS_SOURCE}/research"
@@ -561,6 +562,10 @@ function rfcn() {
561562
get_cocoapi ${MOUNT_EXTERNAL_MODELS_SOURCE}/cocoapi ${MOUNT_EXTERNAL_MODELS_SOURCE}/research/
562563
fi
563564

565+
# Fix the object_detection_evaluation.py file to change unicode() to str() so that it works in py3
566+
chmod -R 777 ${MOUNT_EXTERNAL_MODELS_SOURCE}/research/object_detection/utils/object_detection_evaluation.py
567+
sed -i.bak "s/unicode(/str(/g" ${MOUNT_EXTERNAL_MODELS_SOURCE}/research/object_detection/utils/object_detection_evaluation.py
568+
564569
split_arg=""
565570
if [ -n "${split}" ] && [ ${ACCURACY_ONLY} == "True" ]; then
566571
split_arg="--split=${split}"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Cython
22
contextlib2
3-
pillow
3+
pillow==5.3.0
44
lxml
55
jupyter
66
matplotlib

0 commit comments

Comments
 (0)