# PAN.pytorch **Repository Path**: soleso/PAN.pytorch ## Basic Information - **Project Name**: PAN.pytorch - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-05-06 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Efficient and Accurate Arbitrary-Shaped Text Detection with Pixel Aggregation Network  ## Requirements * pytorch 1.1+ * torchvision 0.3+ * pyclipper * opencv3 * gcc 4.9+ ## Download `PAN_resnet18_FPEM_FFM` and `PAN_resnet18_FPEM_FFM` on icdar2015: the updated model(resnet18:78.8,shufflenetv2: 72.4,lr:le-3) is not the best model [google drive](https://drive.google.com/drive/folders/1bKPQEEOJ5kgSSRMpnDB8HIRecnD_s4bR?usp=sharing) ## Data Preparation train: prepare a text in the following format, use '\t' as a separator ```bash /path/to/img.jpg path/to/label.txt ... ``` val: use a folder ```bash img/ store img gt/ store gt file ``` ## Train 1. config the `train_data_path`,`val_data_path`in [config.json](config.json) 2. use following script to run ```sh python3 train.py ``` ## Test [eval.py](eval.py) is used to test model on test dataset 1. config `model_path`, `img_path`, `gt_path`, `save_path` in [eval.py](eval.py) 2. use following script to test ```sh python3 eval.py ``` ## Predict [predict.py](predict.py) is used to inference on single image 1. config `model_path`, `img_path`, in [predict.py](predict.py) 2. use following script to predict ```sh python3 predict.py ``` The project is still under development.