Views
No views yet
from_pretrained_keras:PerceptNet class where you will load the weights available here like this:1from perceptnet.networks import PerceptNet
2from tensorflow.keras.utils import get_file
3
4weights_path = get_file(fname='perceptnet_rgb.h5',
5 origin='https://huggingface.co/Jorgvt/PerceptNet/resolve/main/tf_model.h5')
6model = PerceptNet(kernel_initializer='ones', gdn_kernel_size=1, learnable_undersampling=False)
7model.build(input_shape=(None, 384, 512, 3))
8model.load_weights(weights_path) PerceptNet requireswandbto be installed. It's something we're looking into.
1from huggingface_hub import from_pretrained_keras
2model = from_pretrained_keras("Jorgvt/PerceptNet", compile=False)Keep in mind that the model uses grouped convolutions and, at least in Colab,Unimplemented Errorsmay arise when using it in CPU.