-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsvhn.py
20 lines (17 loc) · 956 Bytes
/
svhn.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import os
import svhn_test
# This function when called should (a) download the training and test data, (b) train the model from scratch; and (c)
# perform analysis against test data. The final output of this function should be a production of average F1 scores
# across each class in your testset.
# Must return f1-score
def traintest():
os.system('python svhn_preprocessing.py')
os.system('python svhn_train_classifier.py')
os.system('python svhn_train_regressor.py')
# which takes the name of a JPEG or PNG file that is assumed to be the same dimensions as the standard SVHN test data
# and return an integer that corresponds to the most likely house number seen in the supplied image. This result
# should be produced according to a tensorflow model that you have pre-trained and included in the archive.
# Expect either PNG and JPG
# result must be returned (Not only printed)
def test(img_path):
return svhn_test.classify(img_path)