araffin / srl-zoo

State Representation Learning (SRL) zoo with PyTorch - Part of S-RL Toolbox
https://srl-zoo.readthedocs.io/en/latest/
MIT License
162 stars 18 forks source link

A major (performance) update on the submodule: srl-zoo #26

Closed ncble closed 5 years ago

ncble commented 5 years ago

Image rotated by 90 degrees

Image preprocessing

Instead of using specific image preprocessing (mode='imagenet') as

    x[..., 0] -= 0.485
    x[..., 1] -= 0.456
    x[..., 2] -= 0.406
    # Scaling
    x[..., 0] /= 0.229
    x[..., 1] /= 0.224
    x[..., 2] /= 0.225

the mode='tf' that rescale pixel value to [-1,1] is preferable and could avoid unwanted effect when applying training with the other datasets/networks.

ncble commented 5 years ago

Since the srl_zoo is less popular than robotic-rl-srl, I decided to post the changelog here:

Highlights

  1. 2~5 times speed-up (overall) (srl_zoo) compared to the current version of origin/master
  2. Better SRL training mechanism (more intuitive, better modularity) that support sophisticated update (e.g. GAN)
  3. Add GAN to srl_zoo
  4. Scalable SRL models (support any image shape, see the detail below)
  5. ~9 times faster DataLoader which is also simpler, since it's natively supported by pytorch.
  6. Remove several redundant codes to speed-up training.
  7. Fix several issues of (robotics-rl_srl): #41, #42, #43, #46, #47, #48, #49...

Note: Before, we need to modify 8 scripts in order to add one new model, now only two scripts (at most three): models/modules.py and models/my_custom_model.py (see the template models/new_model_template.py)

Changelog

SRL part

araffin commented 5 years ago

Btw, why did you use a branch on your repo where you could create a branch on the original repo? (you are part of the collaborators), same for srl-robotics repo

ncble commented 5 years ago

The original version (master) of srl_zoo has 5719 lines of code. My pull-request has already added and removed +4145/-1453 lines of code, thus 5598 lines of code have been modified (~97% of code). There is no need to be merged to the master branch.