diff --git a/test1/MANIFEST.in b/test1/MANIFEST.in index 2961e722b7cebe8e1912be2dd903fcdecb694019..203e97d3104e5be44a4e58f87fbae08d59d3f537 100644 --- a/test1/MANIFEST.in +++ b/test1/MANIFEST.in @@ -5,5 +5,5 @@ recursive-include ppocr/utils *.txt utility.py logging.py network.py recursive-include ppocr/data/ *.py recursive-include ppocr/postprocess *.py recursive-include tools/infer *.py -recursive-include ppstructure *.py +recursive-include test1 *.py diff --git a/test1/paddlestructure.py b/test1/paddlestructure.py index d8199101bb2d97b7bad063c4bec66eeea656c1fa..bbe69d40460b72def4e4098001638414f80e4f19 100644 --- a/test1/paddlestructure.py +++ b/test1/paddlestructure.py @@ -146,23 +146,3 @@ def main(): logger.info(item['res']) save_res(result, save_folder, img_name) logger.info('result save to {}'.format(os.path.join(save_folder, img_name))) - -if __name__ == '__main__': - table_engine = PaddleStructure(show_log=True) - - img_path = '../test/test_imgs/PMC1173095_006_00.png' - img = cv2.imread(img_path) - result = table_engine(img) - save_res(result, '/Users/zhoujun20/Desktop/工作相关/table/table_pr/PaddleOCR/output/table', - os.path.basename(img_path).split('.')[0]) - - for line in result: - print(line) - - from PIL import Image - - font_path = '../doc/fonts/simfang.ttf' - image = Image.open(img_path).convert('RGB') - im_show = draw_result(image, result, font_path=font_path) - im_show = Image.fromarray(im_show) - im_show.save('result.jpg') \ No newline at end of file diff --git a/test1/setup.py b/test1/setup.py index 0b092c49a4db98def28a7c2942993806b0ffc27c..1d07517790716717d65088ccd854a2557adc8888 100644 --- a/test1/setup.py +++ b/test1/setup.py @@ -20,8 +20,6 @@ import shutil with open('../requirements.txt', encoding="utf-8-sig") as f: requirements = f.readlines() requirements.append('tqdm') - requirements.append('layoutparser') - requirements.append('iopath') def readme():