|
--- |
|
extra_gated_prompt: "You agree not to use the dataset for commercial purposes." |
|
extra_gated_fields: |
|
Company: text |
|
Name: text |
|
Purpose_of_data: text |
|
Contact_Info: text |
|
|
|
I want to use this model for: |
|
type: select |
|
options: |
|
- Research |
|
- Education |
|
- label: Other |
|
value: other |
|
I agree to use this dataset for non-commercial use ONLY: checkbox |
|
|
|
extra_gated_heading: "Acknowledge license to accept the repository" |
|
extra_gated_description: "Our team may take 2-3 days to process your request" |
|
extra_gated_button_content: "Acknowledge license" |
|
|
|
--- |
|
|
|
**Acquisition Process** |
|
|
|
- Please fill out all required information truthfully. |
|
- Personal verification will be completed within two days. |
|
- Once approved, you will be granted access to download the content. |
|
|
|
___ |
|
|
|
# source code of CPICANN |
|
|
|
## Instructions for replication |
|
|
|
This directory contains all the source code needed to reproduce this work. |
|
|
|
### Data preparation |
|
|
|
To directly run the train and validation script in this directory, data preparation needs to be done. The [huggingface link](https://huggingface.co/datasets/caobin/datasetCPICANN) contains all the training and synthetic testing data used in this work, stored in data.zip. This link also contains the pretrained model for single-phase and di-phase identification. |
|
|
|
File single-phase_checkpoint_0200.pth and file bi-phase_checkpoint_2000.pth from the link above is the pretrained model, place them under directory "pretrained". |
|
|
|
File data.zip contains the data and the annotaion file. Place directory "train" and "val" from data.zip under directory "data", place the annotation files anno_train.csv and anno_val.csv under directory "annotation". |
|
|
|
### Model Trianing |
|
|
|
#### Single-phase |
|
|
|
Run ```python train_single-phase.py``` to train the single-phase identification model from scratch. To train the model on your data, addtional parameters need to be set: ```python train_single-phase.py --data_dir_train=[your training data] --data_dir_val=[your validation data] --anno_train=[your anno file for training data] --anno_val=[your anno file for validation data]```. |
|
|
|
#### Bi-phase |
|
|
|
Run ```python train_bi-phase.py``` to train the bi-phase identification model. The bi-phase identification model is trained based on single-phase model, you can change the default setting by set the parameter ```load_path=[your pretrained single-phase model]```. |
|
|
|
### Model validation |
|
|
|
Run ```python train_single-phase.py``` and ```python val_bi-phase.py``` to run the validation code at default setting. |
|
|
|
If you wish to validate the model on your data, plase format your data using data_format.py |
|
|