[Python] ValueError: Only images with two spatial dimensions are supported. If using with...

Discussão em 'Python' iniciado por Stack, Abril 16, 2025.

  1. Stack

    Stack Membro Participativo

    fd = hog(x.numpy() * 255,
    orientations=self.orientations,
    pixels_per_cell=self.pixels_per_cell,
    cells_per_block=(1, 1),
    channel_axis=-1)
    return fd.astype(np.float32)

    hog_features = tf.py_function(hog_transform, [inputs], Tout=tf.float32)
    hog_features.set_shape([None, 7 * 7 * self.orientations])
    return hog_features


    I have tried changing the axis as mentioned in the error but still not working.

    Continue reading...

Compartilhe esta Página