lukemelas / EfficientNet-PyTorch

TOP 1 ACCURACY TOP 5 ACCURACY
SPEED
MODEL CODE PAPER
ε-REPR
CODE PAPER
ε-REPR
PAPER
GLOBAL RANK
EfficientNet-B0
76.8% 76.3%
93.2% 93.2% 314.4 #206
EfficientNet-B1
78.7% 78.8% 94.2% 94.4% 352.1 #136
EfficientNet-B2
79.8% 79.8% 94.7% 94.9% 346.5 #85
EfficientNet-B3
81.1% 81.1% 95.3% 95.5% 304.1 #56
EfficientNet-B4
82.3% 82.6% 96.0% 96.3% 229.6 #37
EfficientNet-B5
83.5% 83.3% 96.7% 96.7% 119.9 #25
EfficientNet-B6
83.9% 84.0% 96.8% 96.9% 69.9 #20
EfficientNet-B7
84.1% 84.4% 96.7% 97.1% 40.4 #17
See Full Build Details +get badge code
[![SotaBench](https://img.shields.io/endpoint.svg?url=https://sotabench.com/api/v0/badge/gh/deepparrot/EfficientNet-PyTorch)](https://sotabench.com/user/PartyParrot/repos/deepparrot/EfficientNet-PyTorch)

How the Repository is Evaluated

The full sotabench.py file - source
from efficientnet_pytorch.model import EfficientNet
from torchbench.image_classification import ImageNet
import torchvision.transforms as transforms
import PIL

# Define Transforms    
normalize = transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
b0_input_transform = transforms.Compose([
    transforms.Resize(256, PIL.Image.BICUBIC),
    transforms.CenterCrop(224),
    transforms.ToTensor(),
    normalize,
])

# Run Evaluation
ImageNet.benchmark(
    model=EfficientNet.from_pretrained(model_name='efficientnet-b0'),
    paper_model_name='EfficientNet-B0',
    paper_arxiv_id='1905.11946',
    paper_pwc_id='efficientnet-rethinking-model-scaling-for',
    input_transform=b0_input_transform,
    batch_size=256,
    num_gpu=1
)

# Define Transforms    
b1_input_transform = transforms.Compose([
    transforms.Resize(273, PIL.Image.BICUBIC),
    transforms.CenterCrop(240),
    transforms.ToTensor(),
    normalize,
])

# Run Evaluation
ImageNet.benchmark(
    model=EfficientNet.from_pretrained(model_name='efficientnet-b1'),
    paper_model_name='EfficientNet-B1',
    paper_arxiv_id='1905.11946',
    paper_pwc_id='efficientnet-rethinking-model-scaling-for',
    input_transform=b1_input_transform,
    batch_size=256,
    num_gpu=1
)

# Define Transforms    
b2_input_transform = transforms.Compose([
    transforms.Resize(292, PIL.Image.BICUBIC),
    transforms.CenterCrop(260),
    transforms.ToTensor(),
    normalize,
])

# Run Evaluation
ImageNet.benchmark(
    model=EfficientNet.from_pretrained(model_name='efficientnet-b2'),
    paper_model_name='EfficientNet-B2',
    paper_arxiv_id='1905.11946',
    paper_pwc_id='efficientnet-rethinking-model-scaling-for',
    input_transform=b2_input_transform,
    batch_size=256,
    num_gpu=1
)

# Define Transforms    
b3_input_transform = transforms.Compose([
    transforms.Resize(332, PIL.Image.BICUBIC),
    transforms.CenterCrop(300),
    transforms.ToTensor(),
    normalize,
])

# Run Evaluation
ImageNet.benchmark(
    model=EfficientNet.from_pretrained(model_name='efficientnet-b3'),
    paper_model_name='EfficientNet-B3',
    paper_arxiv_id='1905.11946',
    paper_pwc_id='efficientnet-rethinking-model-scaling-for',
    input_transform=b3_input_transform,
    batch_size=256,
    num_gpu=1
)

# Efficient Net B4

# Define Transforms    
b4_input_transform = transforms.Compose([
    transforms.Resize(427, PIL.Image.BICUBIC),
    transforms.CenterCrop(380),
    transforms.ToTensor(),
    normalize,
])

# Run Evaluation
ImageNet.benchmark(
    model=EfficientNet.from_pretrained(model_name='efficientnet-b4'),
    paper_model_name='EfficientNet-B4',
    paper_arxiv_id='1905.11946',
    paper_pwc_id='efficientnet-rethinking-model-scaling-for',
    input_transform=b4_input_transform,
    batch_size=128,
    num_gpu=1
)


# Efficient Net B5

# Define Transforms    
b5_input_transform = transforms.Compose([
    transforms.Resize(512, PIL.Image.BICUBIC),
    transforms.CenterCrop(456),
    transforms.ToTensor(),
    normalize,
])

# Run Evaluation
ImageNet.benchmark(
    model=EfficientNet.from_pretrained(model_name='efficientnet-b5'),
    paper_model_name='EfficientNet-B5',
    paper_arxiv_id='1905.11946',
    paper_pwc_id='efficientnet-rethinking-model-scaling-for',
    input_transform=b5_input_transform,
    batch_size=64,
    num_gpu=1
)

# Efficient Net B6

# Define Transforms    
b6_input_transform = transforms.Compose([
    transforms.Resize(593, PIL.Image.BICUBIC),
    transforms.CenterCrop(528),
    transforms.ToTensor(),
    normalize,
])

# Run Evaluation
ImageNet.benchmark(
    model=EfficientNet.from_pretrained(model_name='efficientnet-b6'),
    paper_model_name='EfficientNet-B6',
    paper_arxiv_id='1905.11946',
    paper_pwc_id='efficientnet-rethinking-model-scaling-for',
    input_transform=b6_input_transform,
    batch_size=64,
    num_gpu=1
)

# Efficient Net B7

# Define Transforms    
b7_input_transform = transforms.Compose([
    transforms.Resize(674, PIL.Image.BICUBIC),
    transforms.CenterCrop(600),
    transforms.ToTensor(),
    normalize,
])

# Run Evaluation
ImageNet.benchmark(
    model=EfficientNet.from_pretrained(model_name='efficientnet-b7'),
    paper_model_name='EfficientNet-B7',
    paper_arxiv_id='1905.11946',
    paper_pwc_id='efficientnet-rethinking-model-scaling-for',
    input_transform=b7_input_transform,
    batch_size=32,
    num_gpu=1
)
STATUS
BUILD
COMMIT MESSAGE
RUN TIME
0h:11m:38s
1h:00m:16s
Update sotabench.py
deepparrot   8e14bf5  ·  Oct 03 2019
0h:41m:39s
Update sotabench.py
deepparrot   8f9774d  ·  Oct 03 2019
0h:15m:23s
Update sotabench.py
deepparrot   dd13842  ·  Oct 03 2019
0h:14m:26s
0h:11m:14s