1
0
Fork 0
mirror of synced 2024-06-26 18:20:26 +12:00
Commit graph

259 commits

Author SHA1 Message Date
nagadomi c2e4bb4380 Support for multi-thread in training
And remove `sys`,`image` and `graphicsmagicks.conveter` from the training code because those causes the deadlock on thread package.
2016-09-11 06:31:44 +09:00
nagadomi f7e83e4465 performance tuning 2016-09-08 22:35:27 +09:00
nagadomi 382d493514 no confidence change for #128 2016-07-27 22:55:56 +09:00
nagadomi b3c968ef11 Fix a bug in user method when scale=2 2016-07-20 14:06:17 +09:00
nagadomi 9563d84302 No bias at FullConvolution 2016-07-12 11:15:12 +09:00
nagadomi 81df729a8a Remove -loss option 2016-07-09 15:05:11 +09:00
nagadomi a0d8826779 Merge branch 'master' into upconv 2016-07-09 09:58:48 +09:00
nagadomi 8e90a44d30 noise0 2016-07-09 09:08:04 +09:00
nagadomi 06e073089b Fix for edac608f 2016-07-06 08:04:24 +09:00
nagadomi 14330e919c tuning a little 2016-07-06 08:03:24 +09:00
nagadomi deae802267 Fix a bug in noise reduction when using Y model 2016-07-06 00:47:58 +09:00
nagadomi edac608f18 Add support for user specified pairwise data for universal filter 2016-07-05 02:42:40 +09:00
nagadomi 9ec1f5159b Fix a bug in ClippedMSECriterion 2016-07-04 11:16:04 +09:00
nagadomi eeb90dc39b Fix a bug in preprocessing when filters=box only 2016-06-22 00:37:29 +09:00
nagadomi d8fcde46f3 Change default -validation_crops to 200. 2016-06-20 15:56:26 +09:00
nagadomi fb3636c3b7 Change noise rate in jpeg training 2016-06-20 15:55:43 +09:00
nagadomi f61d59d28a Change default params. enabling jpeg_chroma_subsampling by default 2016-06-18 20:27:34 +09:00
nagadomi 9d3e1a241e refactor 2016-06-18 20:25:15 +09:00
nagadomi 2e26122a9e performance tuning 2016-06-17 20:40:03 +09:00
nagadomi e50c7d1478 Remove unused modules 2016-06-13 12:48:11 +09:00
nagadomi 3b1b2d03fe Change default -nr_rate to 0.65 2016-06-13 12:44:32 +09:00
nagadomi 25e293202a Add support for tta_level=1; Add support for TTA to web.lua 2016-06-12 16:55:05 +09:00
nagadomi af74a67bd1 Add -force_cudnn option; support for cuDNN in waifu2x.lua/web.lua 2016-06-12 16:33:50 +09:00
nagadomi 6be1479710 Fix a block_size issue when using upconv_7 model 2016-06-12 05:15:24 +09:00
nagadomi 9103d393fe Fix a performance issue 2016-06-12 05:13:40 +09:00
nagadomi b8ff8c6787 Remove -gamma_correction option 2016-06-10 07:37:39 +09:00
nagadomi 01b2e6d441 Remove -upsampling_filter option 2016-06-10 07:34:11 +09:00
nagadomi afac4b52ab Add -batch_size option to waifu2x.lua/web.lua 2016-06-09 14:03:18 +09:00
nagadomi 0b949c05a7 Add support for TTA level 2016-06-09 13:09:28 +09:00
nagadomi 9514027f65 Fix a bug that -nr_rate is not used 2016-06-09 02:44:22 +09:00
nagadomi e5cfd3dfce Add -resume option 2016-06-09 02:39:52 +09:00
nagadomi 51914b894a change weight initialization and upconv_7 2016-06-08 06:58:46 +09:00
nagadomi 307ae40883 Add noise_scale training 2016-06-08 06:39:36 +09:00
nagadomi d0630d3a20 individual filters and box-only support 2016-06-06 14:04:13 +09:00
nagadomi 0349fc774c refactor 2016-06-02 10:12:04 +09:00
nagadomi c89fd7249a Add learning_rate_decay 2016-06-02 10:11:15 +09:00
nagadomi 70eb2b508f Fix a performance problem in resampling 2016-05-30 19:15:54 +09:00
nagadomi 70a2849e39 Fix missing file 2016-05-30 06:48:26 +09:00
nagadomi 99e6dd1a57 Fix border removing 2016-05-28 10:25:08 +09:00
nagadomi 8a65db7bab Change the evaluation metric 2016-05-27 16:57:14 +09:00
nagadomi 8088460a20 Add oracle_rate option 2016-05-27 16:54:29 +09:00
nagadomi 7814691cbf Add resize_blur parameter
latest graphicsmagick is required
2016-05-21 09:54:12 +09:00
nagadomi 145b47dbf5 Add use_transparent_png option 2016-05-19 23:02:02 +09:00
nagadomi f6a37b66c3 Add support for Transparent PNG in convert_data.lua 2016-05-15 12:34:03 +09:00
nagadomi 8d3950b90a Change the default parameter (epoch, downsampling_filters) 2016-05-15 11:33:34 +09:00
nagadomi c028ce6e4f Fix a bug in reconstrct.scale() when inner_scale > 1 && y only model 2016-05-15 11:31:14 +09:00
nagadomi a210090033 Convert model files; Add new pretrained model
- Add new pretrained model to ./models/upconv_7
- Move old models to ./models/vgg_7
- Use nn.LeakyReLU instead of w2nn.LeakyReLU
- Add useful attribute to .json

New JSON attribute:
The first layer has `model_config` attribute.
It contains:
  model_arch: architecture name of model. see `lib/srcnn.lua`
  scale_factor: if scale_factor > 1, model:forward() changes image resolution with scale_factor.
  channels: input/output channels. if channels == 3, model is RGB model.
  offset: pixel size that is to be removed from output.
          for example:
            (scale_factor=1, offset=7, input=100x100) => output=(100-7)x(100-7)
            (scale_factor=2, offset=12, input=100x100) => output=(100*2-12)x(100*2-12)
And each layer has `class_name` attribute.
2016-05-15 03:04:08 +09:00
nagadomi 48411a4dde refactor 2016-05-14 16:51:36 +09:00
nagadomi 51ae485cd1 Add new models
upconv_7 is 2.3x faster than previous model
2016-05-13 09:49:53 +09:00
nagadomi e62305377f Add compression.size() 2016-05-13 09:35:53 +09:00
nagadomi 958dcfaeb8 Add more informative message for CUDA error 2016-05-06 21:48:53 +09:00
nagadomi 5bfe504de1 Add error message when the CUDA module loading fails 2016-05-06 02:20:54 +09:00
nagadomi 8da52d5fb9 Merge from master 2016-04-23 12:48:24 +09:00
nagadomi 7af5c9443d Add model option and 12 layers net 2016-04-23 09:19:03 +09:00
nagadomi da03209d3e Remove PNG compression option 2016-04-20 18:53:31 +09:00
nagadomi 68a6d4cef5 Use MSE instead of PSNR
PSNR depends on the minibatch size and those group.
2016-04-17 02:08:38 +09:00
nagadomi 3a27e122ac Add support for grayscale output 2016-04-15 13:29:50 +09:00
nagadomi ba2fe8d9c1 Improve alpha channel detection
latest `graphicsmagick` is required.
2016-04-15 13:14:10 +09:00
nagadomi fbad30c031 Fix embed gamma handling 2016-04-15 09:13:37 +09:00
nagadomi 1407973b88 Use the specified filter 2016-04-12 01:33:17 +09:00
nagadomi a938cd5994 Reduce draw calls 2016-04-10 23:30:23 +09:00
nagadomi 8d6451a51b Add -max_training_image_size option 2016-04-10 23:06:39 +09:00
nagadomi 30fe5db735 Add upsampling_filter option 2016-04-02 22:03:27 +09:00
nagadomi 13f702b968 Add support for resizing with gamma correction 2016-03-28 19:07:09 +09:00
nagadomi fd06a47d56 Fix clearState 2016-03-28 18:38:31 +09:00
nagadomi 7f448a98c4 Change default validation_crops(160) 2016-03-22 10:19:52 +09:00
nagadomi cef98be88f Change default downsampling_filters (Box,Catrom) 2016-03-22 10:18:59 +09:00
nagadomi 86ad50f7cd Merge branch 'master' of github.com:nagadomi/waifu2x into dev 2016-03-21 03:59:17 +09:00
nagadomi 57e0f52b41 Reduce memory usage 2016-03-21 03:42:47 +09:00
nagadomi 8a799e2d56 Add support for noise level 3 2016-03-18 15:47:53 +09:00
nagadomi 4f67f47d3b refactor 2016-03-17 20:03:04 +09:00
nagadomi d4833160c7 Optionalize downsampling filters 2016-03-17 17:58:37 +09:00
nagadomi 4d115e4bdb Add support for plotting loss chart 2016-03-14 05:06:14 +09:00
nagadomi 5590674783 Fix NaN in PSNRCriterion 2016-03-12 08:47:14 +09:00
nagadomi 4a1629d046 More clearState for nn.SpatialConvolutionMM 2016-03-12 07:25:16 +09:00
nagadomi 223dcead67 Add support for clearState() in w2nn.LeakyReLU 2016-03-12 06:59:23 +09:00
nagadomi 1900ac7500 Use PSNR for evaluation 2016-03-12 06:53:42 +09:00
nagadomi 41581a0d55 Remove cleanup_model 2016-03-12 05:43:04 +09:00
nagadomi 9b238bd693 Use clearState() 2016-03-11 11:12:02 +09:00
nagadomi 7708c7e75a Merge branch 'master' of github.com:nagadomi/waifu2x 2015-12-11 16:35:00 +09:00
nagadomi 947746b32b Change default parameter 2015-12-11 16:31:24 +09:00
nagadomi 56582b8401 Fix error in training script due to missing libcudnn.so 2015-12-09 07:04:04 +09:00
nagadomi 9f935835dd Add -save_history option 2015-12-04 18:49:34 +09:00
nagadomi eea4c31d7b Change parameters 2015-12-04 18:47:33 +09:00
nagadomi 2305e31616 Merge branch 'master' into photo 2015-12-02 06:54:37 +09:00
nagadomi 03a17a636b Merge branch 'master' of github.com:nagadomi/waifu2x 2015-12-02 06:54:22 +09:00
nagadomi 86feb1d4c9 Change the sampling method 2015-12-02 06:53:26 +09:00
nagadomi 9727bba51a Fix gamma correction 2015-12-01 20:56:56 +09:00
nagadomi 5cda0b71d7 Fix weird value in alpha channel 2015-12-01 20:42:44 +09:00
nagadomi c5df72439f Fix cuda tensor error in async environment 2015-12-01 18:21:06 +09:00
nagadomi d2c081bbcf Improve alpha channel handling #29
- make border
- scale the alpha channel by waifu2x
- composite
2015-12-01 17:26:45 +09:00
nagadomi a975155828 Change downscaling filters when photo training 2015-11-30 17:19:50 +09:00
nagadomi aaac6ed6e5 Refactor training loop
more shuffle
2015-11-30 17:18:52 +09:00
nagadomi c72ec3112b Add -random_unsharp_mask_rate option for photo 2015-11-27 18:36:36 +09:00
nagadomi d8ba661d6b Add -jpeg_chroma_subsampling_rate option for JPEG denoise training 2015-11-26 17:10:57 +09:00
nagadomi 5a80a70e65 Fix error when image has alpha channel 2015-11-21 17:24:24 +09:00
nagadomi abedec9d9b Fix filter name for graphicsmagick
graphicsmagick package has bug in the definition of FilteTypes.
I will send PR to fix that bug.
This commit is related to it.
You should upgrade graphicsmagick package.

$ luarocks install graphicsmagick
2015-11-21 11:57:33 +09:00
nagadomi f7b298690d Fix the missing initialization function
I don't know why was this function removed.
2015-11-18 21:46:43 +09:00
nagadomi b5db84d42e Change the jpeg config for the photo model 2015-11-15 09:36:40 +09:00
nagadomi 42bd89151e Add -gpu option in train.lua 2015-11-13 19:26:58 +09:00
nagadomi c345f35ed0 Use Image.toString instead of Image.toBlob 2015-11-13 16:11:12 +09:00
nagadomi 3c1c11d88e directly load float data 2015-11-13 15:53:41 +09:00
nagadomi 28cc864c0c Fix NaN bug in iproc.white_noise 2015-11-12 08:03:24 +09:00
nagadomi b63e08905b Remove unused variable 2015-11-11 10:54:28 +09:00
nagadomi 4a4885c856 Add -white_noise option
post-processing for anime screencap.
2015-11-11 10:42:33 +09:00
nagadomi 0941d098e1 more round 2015-11-10 22:38:22 +09:00
nagadomi 2d5a090305 Change default -nr_rate 2015-11-10 22:07:45 +09:00
nagadomi eaeaef10b7 more flip 2015-11-09 23:45:01 +09:00
nagadomi af1b9c604b refactor 2015-11-09 04:35:11 +09:00
nagadomi b335f3a9ad Add -tta option
The TTA mode:
- 8x slower than normal mode
- improves PSNR +0.1
2015-11-09 04:01:28 +09:00
nagadomi 7d67afb982 Use iproc.crop instead of image.crop 2015-11-08 22:11:36 +09:00
nagadomi 6e41796328 Use gamma 2.2 space when resizing 2015-11-08 20:28:14 +09:00
nagadomi 180e7676e4 Drop full transparent background 2015-11-08 06:32:15 +09:00
nagadomi 797b45ae23 Use roundf-like clip for 8 bit-depth image
Maybe PSNR +0.03 improved by this commit
2015-11-08 05:44:14 +09:00
nagadomi bd63f99b59 clip 2015-11-08 01:21:52 +09:00
nagadomi 3b2aa67e55 Improve web interface 2015-11-07 22:54:29 +09:00
nagadomi 15f3f2d901 typo 2015-11-07 07:38:45 +09:00
nagadomi 84c38baab7 Fix double loading of image 2015-11-07 07:33:41 +09:00
nagadomi 3ea16b3b86 tunable parameters 2015-11-07 07:18:22 +09:00
nagadomi cf862782a5 depth 8 2015-11-07 06:39:47 +09:00
nagadomi c773e18e59 Add trade-off parameter for noise reduction 2015-11-07 06:37:53 +09:00
nagadomi 43832a9f92 Add support for depth of PNG 2015-11-06 13:12:36 +09:00
nagadomi 539941c234 Add support for url cache in web.lua 2015-11-06 12:24:27 +09:00
nagadomi 903d945652 cleanup 2015-11-06 10:08:54 +09:00
nagadomi 44208f18ab Fix handling for gamma embed PNG 2015-11-05 14:59:51 +09:00
nagadomi bbd0ff39ad Fix handling for CMYK JPEG 2015-11-03 23:20:21 +09:00
nagadomi b35a9ae7d7 tuning 2015-11-03 06:10:44 +09:00
nagadomi 490eb33a6b Minimize the weighted huber loss instead of the weighted mean square error
Huber loss is less sensitive to outliers(i.e. noise) in data than the squared error loss.
2015-10-31 22:05:59 +09:00
nagadomi 243d8821be Add -backend option to use cuDNN 2015-10-31 04:38:28 +09:00
nagadomi 9ddee6088d Add WeightedHuberCriterion 2015-10-31 04:36:20 +09:00
nagadomi 9d63ed2947 Fix gradient scale in WeightedMSECriterion 2015-10-31 04:35:33 +09:00
nagadomi 4c691b4640 refactor 2015-10-29 22:44:15 +09:00
nagadomi 21ea5dd858 add cudnn converter 2015-10-29 18:05:33 +09:00
nagadomi da786e15ba remove noise_scale training 2015-10-28 16:27:31 +09:00
nagadomi 3abc5a03e3 refactor 2015-10-28 16:01:07 +09:00
nagadomi 956ae0d24c merge from master 2015-10-26 09:39:41 +09:00
nagadomi 8dea362bed sync from internal repo
- Memory compression by snappy (lua-csnappy)
- Use RGB-wise Weighted MSE(R*0.299, G*0.587, B*0.114) instead of MSE
- Aggressive cropping for edge region
and some change.
2015-10-26 09:23:52 +09:00
Kenta Murata 306ee3c76d Fix typo 2015-08-30 10:47:20 +09:00
nagadomi ee826715b7 explicitly loading torch/cutorch 2015-08-05 16:20:45 +09:00
nagadomi 2ffa93213e remove exception handling for cunn 2015-08-05 16:03:51 +09:00
nagadomi dcd43b89fd fix missing nn in latest torch7 2015-08-05 11:49:38 +09:00
nagadomi 54580ba8c0 add data augmentation method that uses overlay 2015-08-02 22:02:14 +09:00
nagadomi 6c65463564 fix slow compression 2015-07-25 02:39:36 +09:00
nagadomi e5a2ef97c7 set compression level of the output file 2015-07-24 17:16:27 +09:00
nagadomi 8e1625d001 change the noisy:cleaned ratio of training data 2015-07-18 11:17:34 +09:00
nagadomi e3d3a8355c change training script
- add AlexNet's color noise (default: false)
- add `photo` category for noise level setting
2015-07-11 21:57:04 +09:00
nagadomi d8ca857a82 change initial weights 2015-07-11 14:52:51 +09:00
nagadomi fd9dadd7a4 use settings.validation_crop 2015-06-26 20:12:51 +09:00
nagadomi 5b4d692f03 add support for RGB color space reconstruction
- add new RGB model (models/anime_style_art_rgb).
- RGB model can reduce color noise.
- waifu2x uses this RGB model by default.

You can use Y model with:
$ th waifu2x.lua -model_dir models/anime_style_art -i input.png -o output.png
$ th train.lua -color y ...
2015-06-23 02:55:30 +09:00
nagadomi 628bd971c9 Merge branch 'master' of github.com:nagadomi/waifu2x into rgb 2015-06-22 23:04:17 +09:00