Model designed to recognize a number with two digits, trained on SVHN dataset, implemented using PyTorch. Automatic parameter searching using NNI.
-
torch 1.0.1
-
torchvision 0.2.1
-
Pillow
-
protobuf
-
lmdb
-
h5py
$ sudo apt-get install libhdf5-dev $ pip install h5py
-
NNI (for AutoML)
-
Download SVHN Dataset format 1
-
Extract to data folder, now your folder structure should be like below:
SVHNClassifier - data - extra - 1.png - 2.png - ... - digitStruct.mat - test - 1.png - 2.png - ... - digitStruct.mat - train - 1.png - 2.png - ... - digitStruct.mat
-
Convert to LMDB format
$ python convert_to_lmdb.py --data_dir ./data
Please note that I have cut picture to 2 digits, resize them to 5454 and suppressed all pictures small than 5454, you may make changes in order to meet your requirement.
-
(Optional) Test for reading LMDBs
Open
read_lmdb_sample.ipynb
in Jupyter
链接: https://pan.baidu.com/s/1Q7d1BrFzn7l5eLAnD8ckyQ 密码: owdc
Open `mobilenet.ipynb` in Jupyter
- (Optional) modify parameters in
search_space.json
and inconfig.yml
$ nnictl create --config ./config.yml