Cadene/pretrained-models.pytorch là một trong những repo tích hợp AI mà TopGit theo dõi, hiện có 9.1k sao, viết chủ yếu bằng Python. Pretrained ConvNets for pytorch: NASNet, ResNeXt, ResNet, InceptionV4, InceptionResnetV2, Xception, DPN, etc.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
model_name = 'nasnetalarge' # could be fbresnet152 or inceptionresnetv2
model = pretrainedmodels.__dict__[model_name](num_classes=1000, pretrained='imagenet')
model.eval()
Note: By default, models will be downloaded to your $HOME/.torch folder. You can modify this behavior using the $TORCH_HOME variable as follow: export TORCH_HOME="/local/pretrainedmodels"
To load an image and do a complete forward pass:
import torch
import pretrainedmodels.utils as utils
load_img = utils.LoadImage()
# transformations depending on the model
# rescale, center crop, normalize, and others (ex: ToBGR, ToRange255)
tf_img = utils.TransformImage(model)
path_img = 'data/cat.jpg'
input_img = load_img(path_img)
input_tensor = tf_img(input_img) # 3x400x225 -> 3x299x299 size may differ
input_tensor = input_tensor.unsqueeze(0) # 3x299x299 -> 1x3x299x299
input = torch.autograd.Variable(input_tensor,
requires_grad=False)
output_logits = model(input) # 1x1000
To extract features (beware this API is not available for all networks):
Results were obtained using (center cropped) images of the same size than during the training process.
Model
Version
Acc@1
Acc@5
PNASNet-5-Large
Tensorflow
82.858
96.182
PNASNet-5-Large
Our porting
82.736
95.992
NASNet-A-Large
Tensorflow
82.693
96.163
NASNet-A-Large
Our porting
82.566
96.086
SENet154
Caffe
81.32
95.53
SENet154
Our porting
81.304
95.498
PolyNet
Caffe
81.29
95.75
PolyNet
Our porting
81.002
95.624
InceptionResNetV2
Tensorflow
80.4
95.3
InceptionV4
Tensorflow
80.2
95.3
SE-ResNeXt101_32x4d
Our porting
80.236
95.028
SE-ResNeXt101_32x4d
Caffe
80.19
95.04
InceptionResNetV2
Our porting
80.170
95.234
InceptionV4
Our porting
80.062
94.926
DualPathNet107_5k
Our porting
79.746
94.684
ResNeXt101_64x4d
Torch7
79.6
94.7
DualPathNet131
Our porting
79.432
94.574
DualPathNet92_5k
Our porting
79.400
94.620
DualPathNet98
Our porting
79.224
94.488
SE-ResNeXt50_32x4d
Our porting
79.076
94.434
SE-ResNeXt50_32x4d
Caffe
79.03
94.46
Xception
Keras
79.000
94.500
ResNeXt101_64x4d
Our porting
78.956
94.252
Xception
Our porting
78.888
94.292
ResNeXt101_32x4d
Torch7
78.8
94.4
SE-ResNet152
Caffe
78.66
94.46
SE-ResNet152
Our porting
78.658
94.374
ResNet152
Pytorch
78.428
94.110
SE-ResNet101
Our porting
78.396
94.258
SE-ResNet101
Caffe
78.25
94.28
ResNeXt101_32x4d
Our porting
78.188
93.886
FBResNet152
Torch7
77.84
93.84
SE-ResNet50
Caffe
77.63
93.64
SE-ResNet50
Our porting
77.636
93.752
DenseNet161
Pytorch
77.560
93.798
ResNet101
Pytorch
77.438
93.672
FBResNet152
Our porting
77.386
93.594
InceptionV3
Pytorch
77.294
93.454
DenseNet201
Pytorch
77.152
93.548
DualPathNet68b_5k
Our porting
77.034
93.590
CaffeResnet101
Caffe
76.400
92.900
CaffeResnet101
Our porting
76.200
92.766
DenseNet169
Pytorch
76.026
92.992
ResNet50
Pytorch
76.002
92.980
DualPathNet68
Our porting
75.868
92.774
DenseNet121
Pytorch
74.646
92.136
VGG19_BN
Pytorch
74.266
92.066
NASNet-A-Mobile
Tensorflow
74.0
91.6
NASNet-A-Mobile
Our porting
74.080
91.740
ResNet34
Pytorch
73.554
91.456
BNInception
Our porting
73.524
91.562
VGG16_BN
Pytorch
73.518
91.608
VGG19
Pytorch
72.080
90.822
VGG16
Pytorch
71.636
90.354
VGG13_BN
Pytorch
71.508
90.494
VGG11_BN
Pytorch
70.452
89.818
ResNet18
Pytorch
70.142
89.274
VGG13
Pytorch
69.662
89.264
VGG11
Pytorch
68.970
88.746
SqueezeNet1_1
Pytorch
58.250
80.800
SqueezeNet1_0
Pytorch
58.108
80.428
Alexnet
Pytorch
56.432
79.194
Notes:
the Pytorch version of ResNet152 is not a porting of the Torch7 but has been retrained by facebook.
For the PolyNet evaluation each image was resized to 378x378 without preserving the aspect ratio and then the central 331×331 patch from the resulting image was used.
Beware, the accuracy reported here is not always representative of the transferable capacity of the network on other tasks and datasets. You must try them all! :P
The porting has been made possible by Ross Wightman in his PyTorch repo.
As you can see here DualPathNetworks allows you to try different scales. The default one in this repo is 0.875 meaning that the original input size is 256 before croping to 224.
Cadene/pretrained-models.pytorch có bao nhiêu sao?
Cadene/pretrained-models.pytorch có 9.1k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/Cadene/pretrained-models.pytorch. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
Cadene/pretrained-models.pytorch có phải mã nguồn mở không?
Có — Cadene/pretrained-models.pytorch phát hành theo license BSD-3-Clause, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/Cadene/pretrained-models.pytorch.
Cadene/pretrained-models.pytorch còn đang phát triển không?
Commit gần nhất trên Cadene/pretrained-models.pytorch là 4.3 năm trước (theo timestamp GitHub). Repo có 1.8k fork — một chỉ báo về mức độ quan tâm của cộng đồng.
Cadene/pretrained-models.pytorch dùng license gì?
Cadene/pretrained-models.pytorch phát hành theo license BSD-3-Clause. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
Cadene/pretrained-models.pytorch là gì?
Cadene/pretrained-models.pytorch (Cadene/pretrained-models.pytorch) là dự án Python trên GitHub. Theo mô tả gốc: Pretrained ConvNets for pytorch: NASNet, ResNeXt, ResNet, InceptionV4, InceptionResnetV2, Xception, DPN, etc.
Cadene/pretrained-models.pytorch viết bằng ngôn ngữ gì?
Cadene/pretrained-models.pytorch chủ yếu viết bằng Python. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Cùng nhóm AI Tools còn repo nào?
Cadene/pretrained-models.pytorch thuộc nhóm AI Tools trên TopGit, cùng 6 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về Cadene/pretrained-models.pytorch ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/Cadene/pretrained-models.pytorch là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về pretrained-models.pytorch?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về pretrained-models.pytorch.