Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of Efficient-Net and Efficient-Det in Pytorch Lightning #1

Open
bilel-bj opened this issue Mar 30, 2020 · 15 comments
Open
Labels
enhancement New feature or request help wanted Extra attention is needed let's do it! Looking forward to have it implemented model

Comments

@bilel-bj
Copy link

bilel-bj commented Mar 30, 2020

🚀 Feature

Implementation of Efficient-Net and Efficient-Det in Pytorch Lightning

Motivation

These two algorithms are the state of the art in Image classification and Object detection. Providing an implementation in Pytorch LIghtning will attract many data scientist to adopt this promising framework

Alternatives

https://paperswithcode.com/paper/efficientdet-scalable-and-efficient-object

@bilel-bj bilel-bj added enhancement New feature or request help wanted Extra attention is needed labels Mar 30, 2020
@edgarriba
Copy link

when you say implementation means everything including the network from scratch, or just mixing lightning with e.g torchvision SOTA models ?

@bilel-bj
Copy link
Author

It is not actually provided in TorchVision. We can only find 8it in Torch Hub. It will be attractive that we find some easy way to use these algorithms in Lightning. Thanks for your support.

@danielkurniadi
Copy link

danielkurniadi commented Apr 27, 2020

Hi guys, is this still on? I can give a helping hand in starting the 6th of May and work for 2-4 weeks for this one.

@justusschock
Copy link
Member

I think so far, there is no-one working on this, so if you want to, we'd appreciate that :)

@danielkurniadi
Copy link

Will do that, but gimme some time. I'm on another finishing project. I'll let get back here asap I promise.

@justusschock
Copy link
Member

@iqDF Sorry for the late reply. Of course you can ping me whenever you need :) I recently get spammed with github notifications, so I mussed have missed this one :) As for documentation: Yes, a few doctest examples would be nice.

And for the hparams, just include a default that matches the hparams you used to achieve the reported results :)

@Borda
Copy link
Member

Borda commented May 28, 2020

@iqDF how is it going here?

@danielkurniadi
Copy link

@Borda Hi I almost thought this was abandoned due to delay inactivity in the forum. Anyway here is the progress:

  1. Currently I have used several detection models (efficient det included) in pytorch + lightning for my kaggle project.
  2. The implementation needs to be tidy up. I use it for competition currently but tidying up should be quick, but I'll take my time for one week.
  3. Performance wise, I'll just use pretrained one from https://github.com/google/automl

@Borda
Copy link
Member

Borda commented May 29, 2020

everyone is busy, but seeing this landed would be great, I personally would love to try it...
if you start a draft PR we can help you with some work... :]

@bguan
Copy link

bguan commented Aug 21, 2020

Any updates on this? Hoping to try this out.

@Borda
Copy link
Member

Borda commented Aug 21, 2020

Maybe @teddykoker would be interested in finishing this one.... 🐰

@stale
Copy link

stale bot commented Oct 21, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the won't fix This will not be worked on label Oct 21, 2020
@ydcjeff ydcjeff removed the won't fix This will not be worked on label Oct 21, 2020
@Borda Borda added the let's do it! Looking forward to have it implemented label Oct 21, 2020
Borda pushed a commit that referenced this issue Dec 14, 2020
* Revert "Merge pull request #1 from ganprad/warnings_fix"

This reverts commit 7c5aaf0.

* Fixes warning related np.integer in SklearnDataModule

Fixes this warning:
```DeprecationWarning: Converting `np.integer` or `np.signedinteger` to a dtype is deprecated. The current result is `np.dtype(np.int_)` which is not strictly correct. Note that the result depends on the system. To ensure stable results use may want to use `np.int64` or `np.int32````
chris-clem pushed a commit to chris-clem/pytorch-lightning-bolts that referenced this issue Dec 16, 2020
* Revert "Merge pull request Lightning-Universe#1 from ganprad/warnings_fix"

This reverts commit 7c5aaf0.

* Fixes warning related np.integer in SklearnDataModule

Fixes this warning:
```DeprecationWarning: Converting `np.integer` or `np.signedinteger` to a dtype is deprecated. The current result is `np.dtype(np.int_)` which is not strictly correct. Note that the result depends on the system. To ensure stable results use may want to use `np.int64` or `np.int32````
@JVGD
Copy link

JVGD commented Jan 14, 2021

Hi people. What's the state of the EfficientDet implementation? I took a look at this WIP branch but it only seems to have the BiFPN module implemented. As you know EfficientDet is EfficientNet + BiFPN... If we can implement this it would attract lots of users since EfficientDets are still SOTA in object detection while being very lightweight to fit into edge devices.

@akihironitta
Copy link
Contributor

@oke-aditya I'm sure your PRs like #475 are waiting for our reviews for so long, but let me mention you here since you might be interested in this one.

@oke-aditya
Copy link
Contributor

oke-aditya commented Jan 16, 2021

😅 No worries @akihironitta reviewing takes time.

I think efficient net will be added to torchvision soon. Have a look here.

Once efficient net is supported by torchvision adding efficient det will be easier.

#31 BiFPN block can then be added to create efficient det. We should rather avoid timm dependency for efficient net and use from torchvision when it supports.

Since efficient net, ResNet, ResNext, mobilenet all are classification models directly from torchvision, it might make sense to add classification trainer ?

There are other recent classification approaches such as DeiT (FB research)
Lambda Networks etc
So maybe a Classification API is worth adding for bolts ?

Borda added a commit that referenced this issue Jan 18, 2021
* Add DCGAN module

* Undo black on conf.py

* Add tests for DCGAN

* Fix flake8 and codefactor

* Add types and small refactoring

* Make image sampler callback work

* Upgrade DQN to use .log (#404)

* Upgrade DQN to use .log

* remove unused

* pep8

* fixed other dqn

* fix loss test case for batch size variation (#402)

* Decouple DataModules from Models - CPCV2 (#386)

* Decouple dms from CPCV2

* Update tests

* Add docstrings, fix import, and update changelog

* Update transforms

* bugfix: batch_size parameter for DataModules remaining (#344)

* bugfix: batch_size for DataModules remaining

* Update sklearn datamodule tests

* Fix default_transforms. Keep internal for every data module

* fix typo on binary_mnist_datamodule

thanks @akihironitta

Co-authored-by: Akihiro Nitta <nitta@akihironitta.com>

Co-authored-by: Akihiro Nitta <nitta@akihironitta.com>

* Fix a typo/copy paste error (#415)

* Just a Typo (#413)

missing a ' at the end of dataset='stl10

* Remove unused arguments (#418)

* tests: Use cached datasets in LitMNIST and the doctests (#414)

* Use cached datasets

* Use cached datasets in doctests

* clear replay buffer after trajectory (#425)

* stale: update label

* bugfix: Add missing imports to pl_bolts/__init__.py (#430)

* Add missing imports

* Add missing imports

* Apply isort

* Fix CIFAR num_samples (#432)

* Add static type checker mypy to the tests and pre-commit hooks (#433)

* Add mypy check to GitHub Actions

* Run mypy on pl_bolts only

* Add mypy check to pre-commit

* Add an empty line at the end of files

* Update mypy config

* Update mypy config

* Update mypy config

* show

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>

* missing logo

* Add type annotations to pl_bolts/__init__.py (#435)

* Run mypy on pl_bolts only

* Update mypy config

* Add type hints to pl_bolts/__init__.py

* mypy

Co-authored-by: Jirka Borovec <jirka.borovec@seznam.cz>

* skip hanging (#437)

* Option to normalize latent interpolation images (#438)

* add option to normalize latent interpolation images

* linspace

* update

Co-authored-by: ananyahjha93 <ananya@pytorchlightning.ai>

* 0.2.6rc1

* Warnings fix (#449)

* Revert "Merge pull request #1 from ganprad/warnings_fix"

This reverts commit 7c5aaf0.

* Fixes warning related np.integer in SklearnDataModule

Fixes this warning:
```DeprecationWarning: Converting `np.integer` or `np.signedinteger` to a dtype is deprecated. The current result is `np.dtype(np.int_)` which is not strictly correct. Note that the result depends on the system. To ensure stable results use may want to use `np.int64` or `np.int32````

* Refactor datamodules/datasets (#338)

* Remove try: ... except: ...

* Fix experience_source

* Fix imagenet

* Fix kitti

* Fix sklearn

* Fix vocdetection

* Fix typo

* Remove duplicate

* Fix by flake8

* Add optional packages availability vars

* binary_mnist

* Use pl_bolts._SKLEARN_AVAILABLE

* Apply isort

* cifar10

* mnist

* cityscapes

* fashion mnist

* ssl_imagenet

* stl10

* cifar10

* dummy

* fix city

* fix stl10

* fix mnist

* ssl_amdim

* remove unused DataLoader and fix docs

* use from ... import ...

* fix pragma: no cover

* Fix forward reference in annotations

* binmnist

* Same order as imports

* Move vars from __init__ to utils/__init__

* Remove vars from __init__

* Update vars

* Apply isort

* update min requirements - PL 1.1.1 (#448)

* update min requirements

* rc0

* imports

* isort

* flake8

* 1.1.1

* flake8

* docs

* Add missing optional packages to `requirements/*.txt` (#450)

* Import matplotlib at the top

* Add missing optional packages

* Update wandb

* Add mypy to requirements

* update Isort (#457)

* Adding flags to datamodules (#388)

* Adding flags to datamodules

* Finishing up changes

* Fixing syntax error

* More syntax errors

* More

* Adding drop_last flag to sklearn test

* Adding drop_last flag to sklearn test

* Updating doc for reflect drop_last=False

* Adding flags to datamodules

* Finishing up changes

* Fixing syntax error

* More syntax errors

* More

* Adding drop_last flag to sklearn test

* Adding drop_last flag to sklearn test

* Updating doc for reflect drop_last=False

* Cleaning up parameters and docstring

* Fixing syntax error

* Fixing documentation

* Hardcoding shuffle=False for val and test

* Add DCGAN module

* Small fixes

* Remove DataModules

* Update docs

* Update docs

* Update torchvision import

* Import gym as optional package to build docs successfully (#458)

* Import gym as optional package

* Fix import

* Apply isort

* bugfix: batch_size parameter for DataModules remaining (#344)

* bugfix: batch_size for DataModules remaining

* Update sklearn datamodule tests

* Fix default_transforms. Keep internal for every data module

* fix typo on binary_mnist_datamodule

thanks @akihironitta

Co-authored-by: Akihiro Nitta <nitta@akihironitta.com>

Co-authored-by: Akihiro Nitta <nitta@akihironitta.com>

* Option to normalize latent interpolation images (#438)

* add option to normalize latent interpolation images

* linspace

* update

Co-authored-by: ananyahjha93 <ananya@pytorchlightning.ai>

* update min requirements - PL 1.1.1 (#448)

* update min requirements

* rc0

* imports

* isort

* flake8

* 1.1.1

* flake8

* docs

* Apply suggestions from code review

* Apply suggestions from code review

* Add docs

* Use LSUN instead of CIFAR10

* Update TensorboardGenerativeModelImageSampler

* Update docs with lsun

* Update test

* Revert TensorboardGenerativeModelImageSampler changes

* Remove ModelCheckpoint callback and nrow=5 arg

* Apply suggestions from code review

* Fix test_dcgan

* Apply yapf

* Apply suggestions from code review

Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
Co-authored-by: Sidhant Sundrani <sidhant96@outlook.com>
Co-authored-by: Akihiro Nitta <nitta@akihironitta.com>
Co-authored-by: Héctor Laria <hector_laria@hotmail.com>
Co-authored-by: Bartol Karuza <bartol.k@gmail.com>
Co-authored-by: Happy Sugar Life <777Jonathansum@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Jirka Borovec <jirka.borovec@seznam.cz>
Co-authored-by: ananyahjha93 <ananya@pytorchlightning.ai>
Co-authored-by: Pradeep Ganesan <ganprad@users.noreply.github.com>
Co-authored-by: Brian Ko <briankosw@gmail.com>
Co-authored-by: Christoph Clement <christoph.clement@artorg.unibe.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed let's do it! Looking forward to have it implemented model
Projects
None yet
Development

No branches or pull requests