import numpy as np def hist_match ( source , template ): """ Adjust the pixel values of a grayscale image such that its histogram matches that of a target image Arguments: ----------- source: np.ndarray Image to transform; the histogram is computed over the flattened array template: np.ndarray Template image; can have different dimensions to source Returns: ----------- matched: np.ndarray The transformed output image """ oldshape = source . shape source = source . ravel () template = template . ravel () # get the set of unique pixel values and their corresponding indices and # counts s_values , bin_idx , s_counts = np . unique ( source , return_inverse = True , return_counts = True ) t_values , t_counts = np . unique ( template , return_counts = True ) ...
th main.lua -retrain resnet-50.t7 -data ./data -resetClassifier true -nClasses 80
답글삭제Transfer Learning:
https://github.com/facebook/fb.resnet.torch/tree/master/pretrained
th classify.lua model_5.t7 ../data/val/Attacks/ics1_ax.png Classes for ../data/val/Attacks/ics1_ax.png
pretrained/classify.lua 의 n 변경
resnet TL by TF
답글삭제https://github.com/kwotsin/transfer_learning_tutorial.git
https://github.com/guoyongcs/auxnet.git
답글삭제resnet + aux output = auxNet by torch
Besides the vanishing gradient problem, very deep networks also suffer from a vanishing supervision signal problem.
In the course of the investigation we presented a novel model, called AuxNet, which addresses the vanishing supervision signal problem through the use of additional auxiliary outputs.