This tage will segment the image to line refer to the paper 'A Statistical approach to line segmentation in handwritten documents'.Taking image [ Historical_WI/59-IMG_MAX_1006290.jpg] for example as follow,and the more line-image at https://github.com/KiM55/Writer-Identification/tree/master/image
This stage will generate new image with DCGAN
python main.py --dataset=[dataname] --train --input_height=256 --output_height=256 --options=1
python main.py --dataset=[dataname] --options=5 --output_path=[output_path] --sample_size=8000 --input_height=256 --output_height=256
Before training,you should take your dataset in the 'data' direction.
This stage is to combine the original data and generated data to train the resnet_52 network.We used the code provided in https://github.com/layumi/Person-reID_GAN and modify the loss function and some hyper-parameters.
Before train your network,your should configure the matconvnet to your matlab. The concrete steps refer to http://www.vlfeat.org/matconvnet/install/
- Add your dataset path into prepare_data.m and run it. Make sure the code outputs the right image path.
- Run
train_id_net_res_market_new.m
. - Add your generated data path into
prepare_data_gan.m
and run it. It will add generated image path into the original image database. - Run
train_id_net_res_market_lsro.m
for training the proposed method.
- Run
test/test_gallery_query_crazy.m
to extract the features of images in the gallery and query set. They will store in a .mat file. Then you can use it to do evaluation. - Evaluate feature on your dataset. Run
evaluation/WI_evaluation_res_fast.m
.