GithubHelp home page GithubHelp logo

kentaroy47 / efficientdet.pytorch Goto Github PK

View Code? Open in Web Editor NEW
60.0 8.0 16.0 45.42 MB

:neckbeard:Unofficial implementation of EfficientDet

License: MIT License

Python 3.41% Jupyter Notebook 96.40% Shell 0.01% Cuda 0.18% C 0.01%
efficientdet pytorch apex retinanet ssd

efficientdet.pytorch's Introduction

Now training models..

backbone resolution VOCmAP COCOmAP Inference[ms] model
EfficientnetB0(wo/BiFPN) 512 77.0 TBD
EfficientnetB0(w/BiFPN) 512 77.2 TBD
EfficientnetB2(wo/BiFPN) 768 TBD TBD
EfficientnetB2(w/BiFPN) 768 TBD TBD
EfficientnetB4(wo/BiFPN) 1024 TBD TBD
EfficientnetB4(w/BiFPN) 1024 TBD TBD
EfficientnetB6(wo/BiFPN) 1408 TBD TBD
EfficientnetB6(w/BiFPN) 1408 TBD TBD

efficientdet.pytorch

unofficial implementation of efficientdet

  • supported efficientnet backbone (B0 for now)
  • supported resnet backbone.
  • supports BiFPN.
  • supports VOC and COCO training.

requirements

pip install --upgrade efficientnet-pytorch

PASCAL-VOC training

  • see train_efficientdet.ipynb
  • see eval.ipynb for evaluation

COCO training

  • see train_efficientdet.ipynb and configure MS-COCO dataset.

FP16 training

  • see train_fp16_apex.ipynb

configs

perf

efficientdet.pytorch's People

Contributors

kentaroy47 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

efficientdet.pytorch's Issues

why the BiFPN output channel is 256?

# using scaled BiFPN channels did not work in my implementation.
 # here, we use outc=256 for all settings.
outc = 256

In Google's paper the BiFPN channel is 64 in EfficientDet D0 and D2, it is 256 in your code, which confused me a lot. Please explain why you change it to 256. Thanks a lot.

ValueError: Cannot load file containing pickled data when allow_pickle=False

here is the error i got when execute python train.py --config configs/training/EcgResNet34.json

Trainer: Trainer1D <class 'trainers.trainers.Trainer1D'>
/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py:481: UserWarning: This DataLoader will create 3 worker processes in total. Our suggested max number of worker in current system is 2, which is smaller than what this DataLoader is going to create. Please be aware that excessive worker creation might get DataLoader running slow or even freeze, lower the worker number to avoid potential slowness/freeze if necessary.
cpuset_checked))
Epoch - 1
Traceback (most recent call last):
File "train.py", line 20, in
trainer.loop()
File "/content/drive/MyDrive/researchHub/ecg-classification/trainers/base_trainer.py", line 141, in loop
self.train_epoch()
File "/content/drive/MyDrive/researchHub/ecg-classification/trainers/base_trainer.py", line 65, in train_epoch
for i, batch in enumerate(self.train_loader):
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py", line 521, in next
data = self._next_data()
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py", line 1203, in _next_data
return self._process_data(data)
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py", line 1229, in _process_data
data.reraise()
File "/usr/local/lib/python3.7/dist-packages/torch/_utils.py", line 434, in reraise
raise exception
ValueError: Caught ValueError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/content/drive/MyDrive/researchHub/ecg-classification/dataloaders/dataset1d.py", line 17, in getitem
img = np.load(self.data[index]["path"]).astype("float32")
File "/usr/local/lib/python3.7/dist-packages/numpy/lib/npyio.py", line 445, in load
raise ValueError("Cannot load file containing pickled data "
ValueError: Cannot load file containing pickled data when allow_pickle=False

Training_issue

Hello,
Could you please tell me which version of pytorch you used ? Or you can give the details of the environment. I am getting the tensor size issue while training with VOC dataset.

issue

Best regards

ModuleNotFoundError: No module named 'efficientnet_pytorch'

File "train_efficientdet.py", line 111, in
from utils.efficientdet import EfficientDet
File "/EfficientDet/efficientdet.pytorch/utils/efficientdet.py", line 1, in
from efficientnet_pytorch import EfficientNet
ModuleNotFoundError: No module named 'efficientnet_pytorch'

Thanks!

Question training with own dataset and FPS

Hi Kentaroy,
Thank you for your great job.

  • I would like train my own dataset. Do I change my dataset to COCO and there is different to modify the scale anchor?
  • Do you have train with D1 and D2 and how is the result of FPS ans score?

Thank you again.

efficient net as feature extractor

Thanks for your torch implementation. I am interested in getting features of image same as we do in Resnet. Is it possible to do via your implementation? If yes, can you please let me know how to use that.
Like in resnet I can do like this way-

from model.res50 import ResNet
 self.encoder = ResNet()
self.fc = nn.Linear(hidden_dim, num_classes)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.