未验证 提交 32be7960 编写于 作者: W wangguanzhong 提交者: GitHub

fix unittest & whl (#6820)

上级 747c02a7
......@@ -21,6 +21,7 @@ import unittest
from ppdet.core.workspace import load_config
from ppdet.engine import Trainer
class TestMultiScaleInference(unittest.TestCase):
def setUp(self):
self.set_config()
......@@ -48,12 +49,13 @@ class TestMultiScaleInference(unittest.TestCase):
tests_img_root = os.path.join(os.path.dirname(__file__), 'imgs')
# input images to predict
imgs = ['coco2017_val2017_000000000139.jpg', 'coco2017_val2017_000000000724.jpg']
imgs = [
'coco2017_val2017_000000000139.jpg',
'coco2017_val2017_000000000724.jpg'
]
imgs = [os.path.join(tests_img_root, img) for img in imgs]
trainer.predict(imgs,
draw_threshold=0.5,
output_dir='output',
save_txt=True)
trainer.predict(
imgs, draw_threshold=0.5, output_dir='output', save_results=False)
if __name__ == '__main__':
......
......@@ -26,6 +26,7 @@ EGG_DIR="paddledet.egg-info"
CFG_DIR="configs"
TEST_DIR=".tests"
DATA_DIR="dataset"
# command line log config
RED='\033[0;31m'
......@@ -86,6 +87,7 @@ function unittest() {
# make sure installed paddledet is used
mkdir $TEST_DIR
cp -r $CFG_DIR $TEST_DIR
cp -r $DATA_DIR $TEST_DIR
cd $TEST_DIR
if [ $? != 0 ]; then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册