Commit Graph

1048 Commits (adcb74f87f09cb9db75b62a8690b53ae1552dda5)
 

Author SHA1 Message Date
Ross Wightman c1a84ecb22 dataset not passed through PrefetchLoader for inference script. Fix #10
* also, make top5 configurable for lower class count cases
2019-06-11 21:59:56 -07:00
Ross Wightman 2060e433c0 Add native PyTorch weights for SE-MnasNet aka MnasNet-A1 2019-06-11 08:54:54 -07:00
Ross Wightman 7dab6d1ec7 Default to img_size in model default_cfg, defer output folder creation until later in the init sequence 2019-06-10 13:34:42 -07:00
Ross Wightman 7d17394bdc Add native PyTorch weights for EfficientNet-B0 w/ top-1 > 76.9
* also add pooling details to default cfg for efficiennets so testtimepool wrapper works
2019-06-10 13:11:36 -07:00
Ross Wightman 9bcd65181b Add exponential moving average for model weights + few other additions and cleanup
* ModelEma class added to track an EMA set of weights for the model being trained
* EMA handling added to train, validation and clean_checkpoint scripts
* Add multi checkpoint or multi-model validation support to validate.py
* Add syncbn option (APEX) to train script for experimentation
* Cleanup interface of CheckpointSaver while adding ema functionality
2019-06-07 15:39:36 -07:00
Ross Wightman 105d5702d7
Update README.md 2019-06-04 10:23:36 -07:00
Ross Wightman 6688d0669f PyTorch trained MobileNetV3 weights that match/best paper. Update fbnetc weights to improved copy. 2019-06-04 09:51:05 -07:00
Ross Wightman 89e77ec049
Merge pull request #7 from zhunzhong07/patch-2
Correct name
2019-06-03 13:00:19 -07:00
Zhun Zhong b32361c9f8
Correct name 2019-06-03 20:33:04 +10:00
Ross Wightman ff99625603 Missed a few models in the model/_all_ list for senet 2019-05-31 10:51:18 -07:00
Ross Wightman 99122aac1c Replace ResNet-34 default weights with a great result from my experiments. 2019-05-31 10:42:46 -07:00
Ross Wightman 48ab3cf070 Add Apache LICENSE file 2019-05-31 07:24:03 -07:00
Ross Wightman 4bb5e9b224 Ported Tensorflow pretrained EfficientNet weights and some model cleanup
* B0-B3 weights ported from TF with close to paper accuracy
* Renamed gen_mobilenet to gen_efficientnet since scaling params go well beyond 'mobile' specific
* Add Tensorflow preprocessing option for closer images to source repo
2019-05-30 17:55:35 -07:00
Ross Wightman 4efecfdc47 Add drop_connect impl to try during training, fix a few comments 2019-05-30 08:42:12 -07:00
Ross Wightman 0fc4cca2ff Cleanup unused member with old name 2019-05-29 23:44:01 -07:00
Ross Wightman 7a6d61566e Add EfficientNet impl, change existing depth_multipler -> channel_multiplier as definitions have been confused 2019-05-29 23:32:52 -07:00
Ross Wightman 6bff9c75dc Cleanup model_factory imports, consistent __all__ for models, fixed inception_v4 weight url 2019-05-28 21:41:10 -07:00
Ross Wightman e6c14427c0 More appropriate/correct loss name 2019-05-28 21:41:10 -07:00
Ross Wightman 99ab1b1276
Update README.md 2019-05-26 18:48:35 -07:00
Ross Wightman c2de3a922b
Update README.md 2019-05-26 18:46:12 -07:00
Ross Wightman 337702d51b
Merge pull request #2 from zhunzhong07/patch-1
Fix bug for prefetcher
2019-05-26 09:31:40 -07:00
Zhun Zhong 127487369f
Fix bug for prefetcher
Set input and target to Cuda when without using prefetcher.
2019-05-26 15:37:19 +10:00
Ross Wightman e8cf619005
Update gluon_resnet.py
Update header comment
2019-05-24 00:01:37 -07:00
Ross Wightman 7419e9835f Add MxNet Gluon ResNet variants w/ converted pretrained weights. Very well trained set of models. 2019-05-23 23:52:23 -07:00
Ross Wightman 2da0b4dbc1 Add inception_v3 models via torchvision, 4 different pretrained weight choices 2019-05-23 11:07:06 -07:00
Ross Wightman af1a68d2e1
Update README.md 2019-05-20 14:55:56 -07:00
Ross Wightman 8ceceef889 Densenet should default to bicubic interpolation, update model links to 'cpu fix' from long ago 2019-05-20 11:47:30 -07:00
Ross Wightman a4516fe0fb Add pretrained weights for FBNet-C 2019-05-20 11:05:25 -07:00
Ross Wightman a72e9b67ee
Update README.md 2019-05-18 22:27:42 -07:00
Ross Wightman 4d2056722a Mixup and prefetcher improvements
* Do mixup in custom collate fn if prefetcher enabled, reduces performance impact
* Move mixup code to own file
* Add arg to disable prefetcher
* Fix no cuda transfer when prefetcher off
* Random erasing when prefetcher off wasn't changed to match new args, fixed
* Default random erasing to off (prob = 0.) for train
2019-05-18 22:17:51 -07:00
Ross Wightman 780c0a96a4 Change args for RandomErasing so only one required for pixel/color mode 2019-05-18 12:29:30 -07:00
Ross Wightman 76539d905e Some transform/data/loader refactoring, hopefully didn't break things
* factor out data related constants to own file
* move data related config helpers to own file
* add a variant of RandomResizeCrop that randomizes interpolation method
* remove old Numpy version of RandomErasing
* cleanup torch version of RandomErasing and use it in either GPU loader batch mode or single image cpu Transform
2019-05-16 22:52:17 -07:00
Ross Wightman e3377b0409 Add some info to README 2019-05-15 09:54:07 -07:00
Ross Wightman db8ad25a23 MobileNetV3 appears correct based on paper update, cleaned up comments and compacted last block def 2019-05-15 08:53:27 -07:00
Ross Wightman 20d66beead Move RMSpropTF another step closer to Tensorflow impl
* init square_avg with one instead of zero as per TF
* match TF order of ops for square_avg accumulation
* move LR scaling to momentum buffer accumulator as per TF
* add decoupled weight decay flag (not in TF)
2019-05-14 18:35:43 -07:00
Ross Wightman 89147a91e6 Remove adabound optimizer, never got it working well on larger datasets 2019-05-14 18:35:43 -07:00
Ross Wightman 0a84dd5890
Merge pull request #1 from cclauss/patch-1
Identity is not the same thing as equality in Python
2019-05-14 08:52:37 -07:00
cclauss 51f85702a7
Identity is not the same thing as equality in Python
Identity is not the same thing as equality in Python.  In these instances, we want the latter.

Use ==/!= to compare str, bytes, and int literals.

$ __python__
```python
>>> proj = "pro"
>>> proj += 'j'
>>> proj
'proj'
>>> proj == 'proj'
True
>>> proj is 'proj'
False
>>> 0 == 0.0
True
>>> 0 is 0.0
False
```
[flake8](http://flake8.pycqa.org) testing of https://github.com/rwightman/pytorch-image-models on Python 3.7.1

$ __flake8 . --count --select=E9,F63,F72,F82 --show-source --statistics__
```
./data/loader.py:48:23: F823 local variable 'input' defined as a builtin referenced before assignment
                yield input, target
                      ^
./models/dpn.py:170:12: F632 use ==/!= to compare str, bytes, and int literals
        if block_type is 'proj':
           ^
./models/dpn.py:173:14: F632 use ==/!= to compare str, bytes, and int literals
        elif block_type is 'down':
             ^
./models/dpn.py:177:20: F632 use ==/!= to compare str, bytes, and int literals
            assert block_type is 'normal'
                   ^
3     F632 use ==/!= to compare str, bytes, and int literals
1     F823 local variable 'input' defined as a builtin referenced before assignment
4
```
__E901,E999,F821,F822,F823__ are the "_showstopper_" [flake8](http://flake8.pycqa.org) issues that can halt the runtime with a SyntaxError, NameError, etc. These 5 are different from most other flake8 issues which are merely "style violations" -- useful for readability but they do not effect runtime safety.
* F821: undefined name `name`
* F822: undefined name `name` in `__all__`
* F823: local variable name referenced before assignment
* E901: SyntaxError or IndentationError
* E999: SyntaxError -- failed to compile a file into an Abstract Syntax Tree
2019-05-14 17:19:57 +02:00
Ross Wightman fee607edf6 Mixup implemention in progress
* initial impl w/ label smoothing converging, but needs more testing
2019-05-13 19:05:40 -07:00
Ross Wightman c3fbdd4655 Fix efficient head for MobileNetV3 2019-05-11 11:23:11 -07:00
Ross Wightman 17da1adaca A few MobileNetV3 tweaks
* fix expansion ratio on early block
* change comment re stride mistake in paper
* fix rounding not being called properly for all multipliers != 1.0
2019-05-11 10:23:40 -07:00
Ross Wightman 6523e4abe4 More appropriate name for se channel 2019-05-10 23:32:18 -07:00
Ross Wightman db056d97e2 Add MobileNetV3 and associated changes hard-swish, hard-sigmoid, efficient head, etc 2019-05-10 23:28:13 -07:00
Ross Wightman 02abeb95bf Add the url for tflite mnasnet ported weights 2019-04-28 23:21:35 -07:00
Ross Wightman 0956cd4b66
Update README.md
Add notes for latest mobile model weights...
2019-04-28 18:06:20 -07:00
Ross Wightman 4663fc2132 Add support for tflite mnasnet pretrained weights and included spnasnet pretrained weights of my own.
* tensorflow 'SAME' padding support added to GenMobileNet models for tflite pretrained weights
* folded batch norm support (made batch norm optional and enable conv bias) for tflite pretrained weights
* add url for spnasnet1_00 weights that I recently trained
* fix SE reduction size for semnasnet models
2019-04-28 17:45:07 -07:00
Ross Wightman afb357ff68 Make genmobilenet weight init switchable, fix fan_out in google style linear init 2019-04-22 17:46:17 -07:00
Ross Wightman 0a853990e7 Add distributed sampler that maintains order of original dataset (for validation) 2019-04-22 17:44:53 -07:00
Ross Wightman 8fbd62a169 Exclude batchnorm and bias params from weight_decay by default 2019-04-22 17:33:22 -07:00
Ross Wightman 34cd76899f Add Single-Path NAS pixel1 model 2019-04-22 12:43:45 -07:00