Using the tutorial on multiclass adaboost, I\'m trying to classify some images that have two classes (but I don\'t suppose the algorithm shouldn\'t work if the problem is binary
try:
imgs = []
tmp_hogs = np.zeros((17, 256))
# 13 of the images are with vehicles, 4 are without
labels = [1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0]
i = 0
for file in out:
filepath = "C:\PATH_TO_SAMPLE_IMAGES\\" + file
curr_img = color.rgb2gray(io.imread(filepath))
imgs.append(resize(curr_img,(60,40)))
fd, hog_image = hog(curr_img, orientations=8, pixels_per_cell=(16, 16),
cells_per_block=(1, 1), visualise=True)
tmp_hogs[i,:] = fd
i+=1
img_hogs = tmp_hogs