diff --git a/fluid/PaddleCV/image_classification/README.md b/fluid/PaddleCV/image_classification/README.md index 3a20bdf4aa44e2752b8939bfa49886e7c0d5f6f0..864163997d21528f833e6795f3210193a47aca02 100644 --- a/fluid/PaddleCV/image_classification/README.md +++ b/fluid/PaddleCV/image_classification/README.md @@ -168,7 +168,6 @@ Inference is used to get prediction score or image features based on trained mod ``` python infer.py \ --model=SE_ResNeXt50_32x4d \ - --batch_size=32 \ --class_dim=1000 \ --image_shape=3,224,224 \ --with_mem_opt=True \ diff --git a/fluid/PaddleCV/image_classification/README_cn.md b/fluid/PaddleCV/image_classification/README_cn.md index c9f553e311ff07e76eab2274646270f5de9b8fa2..803bdc99fc607105813f509d69119b3d117dc2e1 100644 --- a/fluid/PaddleCV/image_classification/README_cn.md +++ b/fluid/PaddleCV/image_classification/README_cn.md @@ -164,7 +164,6 @@ Testbatch 80,loss 0.0969972759485, acc1 1.0,acc5 1.0,time 0.41 sec ``` python infer.py \ --model=SE_ResNeXt50_32x4d \ - --batch_size=32 \ --class_dim=1000 \ --image_shape=3,224,224 \ --with_mem_opt=True \ diff --git a/fluid/PaddleCV/image_classification/reader.py b/fluid/PaddleCV/image_classification/reader.py index d9559df09ba34f3a6512f1c4628d454cd33c9ee2..f79d87b0dc35db0d1a397daefc5e17e6c1a5f917 100644 --- a/fluid/PaddleCV/image_classification/reader.py +++ b/fluid/PaddleCV/image_classification/reader.py @@ -156,11 +156,13 @@ def _reader_creator(file_list, for line in lines: if mode == 'train' or mode == 'val': img_path, label = line.split() - img_path = img_path.replace("JPEG", "jpeg") + #img_path = img_path.replace("JPEG", "jpeg") img_path = os.path.join(data_dir, img_path) yield img_path, int(label) elif mode == 'test': - img_path = os.path.join(data_dir, line) + img_path, label = line.split() + #img_path = img_path.replace("JPEG", "jpeg") + img_path = os.path.join(data_dir, img_path) yield [img_path] mapper = functools.partial(