Commit 43487caa authored by kiegeland's avatar kiegeland
Browse files

Update README.md

parent 7ddcbe35
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -38,14 +38,14 @@ The pretrained model is retrained onto the 80 categories from coco.

* How to retrain Singlelabel:  
For training with default hyperparameters you need to pass a directory with all the images.  
The directory has to contain subdirectories which have the name of the label and contain all image which are tagged with the label.   
The directory has to contain subdirectories which each are named after one of the labels and contain only images with that label.   
  
```
python3 retrain.py \  
--image_dir /softpro/ss18/caption/cocoapi/train_all_objects/  
```
  
You can also pass different hyperparamters as arguments:
You can also pass different hyperparameters as arguments:
```
python3 retrain.py \  
--image_dir /softpro/ss18/caption/cocoapi/train_all_objects/ \  
@@ -86,13 +86,14 @@ python3 retrain.py \
##### Multilabel Model (InceptionV3)

* How to retrain multilabel:  
For starting the training just call:  
  
```
bash retrain.sh
```
  
the retrain.sh calls the multilabel version of retrain.py which is quite different from the singlelabel retrain.py.  
It is possible to change hyperparamters in the retrain.sh but not the Inception model as in the singlelabel version.  
The retrain.sh calls the version of the retrain.py which is modified for multilabel training.  
It is possible to change the hyperparamters in the retrain.sh.  
Example for retrain.sh with tuned hyperparameters:
  
```
@@ -110,10 +111,10 @@ python retrain.py \
--image_dir=/softpro/ss18/caption/cocoapi/multilabel_outer/ 
```
  
The image directory this time contains all the training images without subdirectories.  
The image directory contains all the training images without them being in subdirectories.  
Additionally you have to open the the retrain.py and change the path of IMAGE_LABELS_DIR and ALL_LABELS_FILE.  
IMAGE_LABELS_DIR is a directory which contains a .txt file for every image describing all labels on that image.  
ALL_LABELS_FILE is a .txt file that contains all labels.
IMAGE_LABELS_DIR is a directory which contains a text file for every image in image_dir describing all labels on that image.  
ALL_LABELS_FILE is a text file that contains all the labels.

* **Results:**  
[Trained model (default)](/models/multilabel_default/)