예제 #1
0
def train_top_ground_truth_fish_or_no_fish_resnet_network():
    """
    Train the top of the extended resnet fish or no fish network.
    """

    import network

    tl = network.TransferLearningFishOrNoFish(
        class_balance_method="batch",
        prediction_class_type="single",
        data_type="fish_no_fish_ground_truth_cropped")

    tl.build('resnet', input_shape=(300, 300, 3), summary=False)
    tl.train_top(epochs=100)
예제 #2
0
def train_top_fish_or_no_fish_network():
    """
    Train the top of the extended xception fish or no fish network.
    """

    import network

    tl = network.TransferLearningFishOrNoFish(
        class_balance_method="batch",
        prediction_class_type="single",
        data_type="fish_no_fish_candidates_cropped")

    tl.build('xception', summary=False)
    tl.train_top(epochs=70)
예제 #3
0
def fine_tune_fish_or_no_fish_vgg_network():
    """
    Fine-tune the extended inceptionv4 fish or no fish network. To do this, first the top
    of the extended inceptionv4 network must have been trained already.
    """

    import network

    tl = network.TransferLearningFishOrNoFish(
        class_balance_method="batch",
        prediction_class_type="single",
        data_type="fish_no_fish_candidates_cropped")

    tl.build('vgg19', input_shape=(300, 300, 3), summary=False)
    tl.fine_tune_extended(
        epochs=70,
        input_weights_name=
        "ext_vgg19.toptrained.e060-tloss0.5310-vloss0.5097.hdf5",
        n_layers=17)
예제 #4
0
def fine_tune_ground_truth_fish_or_no_fish_resnet_network():
    """
    Fine-tune the extended resnet fish or no fish network. To do this, first the top
    of the extended resnet network must have been trained already.
    """

    import network

    tl = network.TransferLearningFishOrNoFish(
        class_balance_method="batch",
        prediction_class_type="single",
        data_type="fish_no_fish_ground_truth_cropped")

    tl.build('resnet', input_shape=(300, 300, 3), summary=False)
    tl.fine_tune_extended(
        epochs=70,
        input_weights_name=
        "fishnofish.ground_truth.ext_resnet.toptrained.e041-tloss0.1008-vloss0.0756.hdf5",
        n_layers=75)
예제 #5
0
def fine_tune_fish_or_no_fish_network():
    """
    Fine-tune the extended xception fish or no fish network. To do this, first the top
    of the extended xception network must have been trained already.
    """

    import network

    tl = network.TransferLearningFishOrNoFish(
        class_balance_method="batch",
        prediction_class_type="single",
        data_type="fish_no_fish_candidates_cropped")

    tl.build('xception', summary=False)
    tl.fine_tune_extended(
        epochs=70,
        input_weights_name=
        "fishnofish.ext_xception.toptrained.e001-tloss0.3366-vloss0.2445.hdf5",
        n_layers=125)