twiiks / phd08-conversion

Save the phd08 dataset as .png or convert it to a npy file format

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHD08 Conversion

Save the phd08 dataset as .png or convert it to a npy file format that can be converted directly into a numpy array. The image / text will be blurred with the Gaussian filter that was in the original binary.

Requirements

  • python3
  • numpy
  • matplotlib
  • scipy

Usage

phd08_to_png.py

  • help
python phd08_to_png.py --help
  • phd08 to png
python phd08_to_png.py --data_dir=DATA_DIR [--width=WIDTH] 
                       [--height=HEIGHT] [--gaussian_sigma=GAUSSIAN_SIGMA]  

result in ./phd08_png_results/

phd08_to_np_arr.py

  • help
python phd08_to_np_arr.py --help
  • phd08 to npy
phd08_to_npy.py [-h] --data_dir DATA_DIR [--one_hot] [--width WIDTH]
                     [--height HEIGHT] [--gaussian_sigma GAUSSIAN_SIGMA]

result in ./phd08_npy_results/

Example & Screenshot

python phd08_to_png.py --data_dir=phd08_png_results --width=10 --height=10

screenshot2

screenshot1

About

Save the phd08 dataset as .png or convert it to a npy file format


Languages

Language:Python 100.0%