In this chapter, I list all materials related to the trained classifier which is used to classify an image into 5 different types of boats:

  • iceboat
  • shrimper
  • patrol boat
  • fishing boat
  • weather ship

0. Trained model

The trained model consists of two files:

1. Downloaded Dataset

  • Training dataset (475.6 MB) Download
    Class Number of images
    iceboat 1692
    shrimper 2380
    patrol_boat 1820
    fishing_boat 1320
    weather_ship 1101
    In total 8313
  • Testing dataset (34.7 MB, 1532 images) Download

2. Test trained model

After we downloaded the trained model and Testing dataset, can use this code to test this model by type the following command in a terminal:

> python predict.py \
--models_folder='./models' \
--test_image_folder='./testing_images' \
--display_image=False

3. Use trained model on Android

This android demo loads our trained boat classifier and classify the camera video frame.

This figure is the screenshot:



If you do not want to know more details about how did I collect the data, you can skip the following part of this chapter.



Image Collection

  1. All training images are downloaded from ImageNet. In order to make it easier, I wrote a python script (download_image.py) to download images automatically. (PS: some time the it takes a long time to access ImageNet, which causes a time out error of the script. We need to login the ImageNet (easy to register an account) in our browser first.)
  2. There are some links not accessable any more, which results in some downloaded files are not images. Thus, I wrote another python script (remove.py) to remove them. In addition, some images are error message and we need to manually remove them.
  3. I used this tool to augment the training images.
Previous