Commit e90a7f76 authored by Mario Pasquato's avatar Mario Pasquato
Browse files


parent 39ca20bc
You need to make a folder train and a folder test.
Then make train/zero and train/five and put 500 images from category 0 in train/zero, 500 images from category 5 in train/five
Then put 99 images from category 0 in test/zero and 99 images from category 5 in test/five
The images you put in test and in train must be different.
You will be left with 0 images from category 0, but with some images from category 5
run python
It will show you training progress, it should take not more than 20 minutes on a decent GPU (I train with a Titan V).
In training you see four numbers: loss, accuracy, val. loss, val. acc.
At the start accuracy is about 0.5, at the end should be about 0.9, val. loss at the start is also about 0.5, at the end gets to about 0.8.
At the end the trained model is saved in model.hd5 file
If you run python it uses that model to predict the type of
the images in test/zero (most should turn out to be regular galaxies, e.g. you can get 72 regular, 27 jellyfish) and in test/five (most will turn out to be jellyfish)
If you use the pre-trained model that I saved in model.hd5 you can run without doing the training first.
......@@ -42,4 +42,4 @@ def predict_on_folder(folder):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment