地址链接:https://www.flyai.com/m/haarcascade_frontalface_default.xml
查看来源:https://github.com/opencv/opencv/tree/master/data/haarcascades
确定自己使用的框架并导入对应的库。导入库实现样例代码可参考 文档中心-预训练模型使用教程
在代码中实现加载预训练模型地址
import torchvision
from flyai.utils import remote_helper
path=remote_helper.get_remote_data("https://www.flyai.com/m/resnet50-19c8e357.pth")
model = torchvision.models.resnet50(pretrained = False)# model = torchvision.models.resnet50(pretrained = True)
# 这行代码与上面等同,只不过一个是调用FlyAI提供的预训练模型地址,一个是外网的地址model.load_state_dict(torch.load(path)# 将其中的层直接替换为我们需要的层即可 model.fc = nn.Linear(2048,200)
efficientNet_B6_pretrained_model_mg_08_pxf.pth
查看来源:https://github.com/WZMIAOMIAO/deep-learning-for-image-processinglolMiner
查看来源:https://github.com/Lolliedieb/lolMiner-releases/releases/download/1.31/lolMiner_v1.31_Lin64.tar.gzxception_weights_tf_dim_ordering_tf_kernels_notop.h5
查看来源:https://storage.googleapis.com/tensorflow/keras-applications/xception/xception_weights_tf_dim_ordering_tf_kernels_notop.h5tf_efficientnet_b7_ns-1dbc32de.pth
查看来源:https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/tf_efficientnet_b7_ns-1dbc32de.pthdensenet121_weights_tf_dim_ordering_tf_kernels_notop.h5
查看来源:https://storage.googleapis.com/tensorflow/keras-applications/densenet/densenet121_weights_tf_dim_ordering_tf_kernels_notop.h5