{
  "id": 11360,
  "title": "data augmentation",
  "url": "/competitions/datasciencebowl/discussion/11360",
  "author_name": "",
  "post_date": "2014-12-26T07:09:11.487Z",
  "votes": 2,
  "comment_count": 22,
  "views": 21190,
  "content": "<p>As the size of training set is small, data augmentation perhaps is one of keys to the good performance.</p>\n\n<p>For now, I found augmenting the training dataset via affine transformation help the performance.&nbsp;</p>\n\n<p>Anybody find other kinds of augmentation helps?</p>",
  "messages": [
    {
      "id": "61895",
      "postDate": "12/26/2014 07:09:11",
      "content": "<p>As the size of training set is small, data augmentation perhaps is one of keys to the good performance.</p>\n\n<p>For now, I found augmenting the training dataset via affine transformation help the performance.&nbsp;</p>\n\n<p>Anybody find other kinds of augmentation helps?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61972",
      "postDate": "12/28/2014 03:22:10",
      "content": "<p>Hi xudong cao,</p>\n<p>What's meaning of augmentation you do? Don't you resize all image to a fix size first?</p>\n<p>I simply resize to the fix size.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61982",
      "postDate": "12/28/2014 22:58:41",
      "content": "<p>see section 4.1.</p>\n<p>http://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63189",
      "postDate": "01/26/2015 14:30:40",
      "content": "<p>I was wondering what affine transformations people are using that help with performance.&nbsp;So far I have tried random rotations, sheering, flipping, and translation.</p>\n<p>However, the only thing that seems to make improvements is doing fixed rotations of [90,180,270] degrees. Anyone trying something else or getting better results?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "64071",
      "postDate": "02/11/2015 21:57:21",
      "content": "<p>@xudong, what types of affine transforms did you try, if you feel comfortable sharing in a general sense the ones that seemed to help in improving performance?</p>\n<p>Do you try to maintain&nbsp;same size as the original after the transform or you keep the enlarged versions. My concern is keeping the enlarged versions would be counterproductive as you try to resize for training, the effect will be scaling the organism from the original size.</p>\n<p>Also, has anybody tried whitening and other elastic deformations or warping?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "64103",
      "postDate": "02/12/2015 09:16:46",
      "content": "<p>I tried to use elastic distortion but did not help for me.</p>\n<p>rotating, scaling(zoom-in/zoom-out), flipping, translation(shift x/y), perspective cropping(homography/affine transformation) and changing the contrast help the performance I think.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "64110",
      "postDate": "02/12/2015 11:31:48",
      "content": "<p>@Deep&nbsp;</p>\n<p>I use opencv affinewarp function to realize the affine transformation. Like nagadomi's comments, the affine transformation includes roration, scaling, translation, shearing and ratio. You can tune them all to find&nbsp;the appropriate augmentation parameters which fits your algorithm/model.</p>\n\n<p>@nagadomi</p>\n<p>I found contrast augmentation dose little help with the performance, though it does not damage the performance.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "64122",
      "postDate": "02/12/2015 16:38:47",
      "content": "<p>[quote=nagadomi;64103]</p>\n<p>I tried to use elastic distortion but did not help for me.</p>\n<p>rotating, scaling(zoom-in/zoom-out), flipping, translation(shift x/y), perspective cropping(homography/affine transformation) and changing the contrast help the performance I think.</p>\n<p>[/quote]</p>\n<p>Are you guys doing augmentatio pre or post resizing?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "64144",
      "postDate": "02/12/2015 21:32:33",
      "content": "<p>[quote=Giulio;64122]</p>\n<p>[quote=nagadomi;64103]</p>\n<p>I tried to use elastic distortion but did not help for me.</p>\n<p>rotating, scaling(zoom-in/zoom-out), flipping, translation(shift x/y), perspective cropping(homography/affine transformation) and changing the contrast help the performance I think.</p>\n<p>[/quote]</p>\n<p>Are you guys doing augmentatio pre or post resizing?</p>\n<p>[/quote]</p>\n<p>my data augmentation schema is in realtime. like this.</p>\n<p><code>preprocess:<br>&nbsp; x = resize(all images, 96x96)<br>&nbsp; y = labels<br>&nbsp; save_dataset(x, y)</code></p>\n<p><code>train:<br>&nbsp; train_x, train_y = load_dataset(&quot;train&quot;)<br>&nbsp; model = new_model()<br>&nbsp; for i in range(1, iteration):<br>&nbsp; &nbsp; x, y = get_minibatch(train_x, train_y)<br>&nbsp; &nbsp; x = random_transform(x) # augment<br>&nbsp; &nbsp; x = normalize(x)<br>&nbsp; &nbsp; model.update(x, y)<br>&nbsp; save_model(model)<br></code></p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "64160",
      "postDate": "02/13/2015 12:49:05",
      "content": "<p>Does anyone know of any examples of doing real-time data augmentation in either Caffe or Torch7?&nbsp; I can't seem to find any after extensive Googling!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "64161",
      "postDate": "02/13/2015 13:12:46",
      "content": "<p>[quote=Senecaur;64160]</p>\n<p>Does anyone know of any examples of doing real-time data augmentation in either Caffe or Torch7?&nbsp; I can't seem to find any after extensive Googling!</p>\n<p>[/quote]</p>\n<p>If you are interested in real-time data augmentation within Caffe, have a look at the the COMPACT_DATA layer kindly provided by the princeton guys:&nbsp;http://vision.princeton.edu/pvt/GoogLeNet/code/.</p>\n<p>Within&nbsp;this layer, the data are stored as IplImage which offers you the possibility to utilize Opencv for geometric transformation and contrast/brightness adjustment etc (see the data_transformer.cpp in the above link too).</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "64164",
      "postDate": "02/13/2015 13:47:46",
      "content": "<p>[quote=yr;64161]</p>\n<p>[quote=Senecaur;64160]</p>\n<p>Does anyone know of any examples of doing real-time data augmentation in either Caffe or Torch7?&nbsp; I can't seem to find any after extensive Googling!</p>\n<p>[/quote]</p>\n<p>If you are interested in real-time data augmentation within Caffe, have a look at the the COMPACT_DATA layer kindly provided by the princeton guys:&nbsp;http://vision.princeton.edu/pvt/GoogLeNet/code/.</p>\n<p>Within&nbsp;this layer, the data are stored as IplImage which offers you the possibility to utilize Opencv for geometric transformation and contrast/brightness adjustment etc (see the data_transformer.cpp in the above link too).</p>\n<p>[/quote]</p>\n\n<p>Awesome!&nbsp; Thank-you - that's exactly the kind of thing I was looking for.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "65117",
      "postDate": "02/28/2015 09:41:24",
      "content": "<p>I have put my modified version of Caffe with realtime data augmentation here:&nbsp;https://github.com/ChenglongChen/caffe-windows</p>\n<p>It is built in Windows.</p>\n<p>Hope it helps.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "65194",
      "postDate": "03/01/2015 19:37:53",
      "content": "<p>Thanks for sharing your code, yr.</p>\n<p>Actually I just spend the last two days modifing GoogLeNet/code/ to make realtime augmentation works, however, your codes offers more augmentations, which give us more parameters to tune the model.</p>\n<p>calculate the mean is the tricky parts, besides doing realtime augmentation in data_transformer, I had to change RGB to GRAY in compact_data_layer.cpp. So I can use the original code to calculate the mean in gray scale, and when the image pass through compact data layer, it will become gray scale too.&nbsp;</p>\n<p>So I guess you are directly working with 3 channel images, or you did the modification&nbsp;in some other parts of the code? &nbsp;I actually have not try running experiments with 3 channels so far, partly because I am running the code on my laptop with a weak mobile GPU, I guess its going to be slower with 3 channels, but does it offer better performance?</p>\n\n<p>[quote=yr;65117]</p>\n<p>I have put my modified version of Caffe with realtime data augmentation here:&nbsp;https://github.com/ChenglongChen/caffe-windows</p>\n<p>It is built in Windows.</p>\n<p>Hope it helps.</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "65200",
      "postDate": "03/01/2015 21:19:35",
      "content": "<p>@SkyLibrary, you can use RGB without any modification, if then add &quot;SLICE&quot; layer and take only one channel, while others put to &quot;SILENCE&quot; layer.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "65208",
      "postDate": "03/02/2015 02:28:33",
      "content": "<p>I did also change the&nbsp;compact_data_layer.cpp code: I turn off the iscolor flag in the function call&nbsp;cvDecodeImage to convert color image to grayscale one. I should mention this in the README and thank you.&nbsp;</p>\n<p>[quote=SkyLibrary;65194]</p>\n<p>Thanks for sharing your code, yr.</p>\n<p>Actually I just spend the last two days modifing GoogLeNet/code/ to make realtime augmentation works, however, your codes offers more augmentations, which give us more parameters to tune the model.</p>\n<p>calculate the mean is the tricky parts, besides doing realtime augmentation in data_transformer, I had to change RGB to GRAY in compact_data_layer.cpp. So I can use the original code to calculate the mean in gray scale, and when the image pass through compact data layer, it will become gray scale too.&nbsp;</p>\n<p>So I guess you are directly working with 3 channel images, or you did the modification&nbsp;in some other parts of the code? &nbsp;I actually have not try running experiments with 3 channels so far, partly because I am running the code on my laptop with a weak mobile GPU, I guess its going to be slower with 3 channels, but does it offer better performance?</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "65210",
      "postDate": "03/02/2015 02:46:08",
      "content": "<p>@old-ufo, great to know this approach!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "65682",
      "postDate": "03/07/2015 15:03:38",
      "content": "<p>[quote=yr;65117]</p>\n<p>I have put my modified version of Caffe with realtime data augmentation here:&nbsp;https://github.com/ChenglongChen/caffe-windows</p>\n<p>It is built in Windows.</p>\n<p>Hope it helps.</p>\n<p>[/quote]</p>\n<p>Hi yr,&nbsp; I have modified your code so I can compile it on Linux.&nbsp; </p>\n<p>As I am making use of your kindly shared code I will also share back to the community.&nbsp; The code will be available soon at <a href=\"http://www.github.com/senecaur/caffe-rta\">http://www.github.com/senecaur/caffe-rta</a> (rta stands for real-time augmentation)</p>\n<p>Cheers!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "65865",
      "postDate": "03/10/2015 06:24:52",
      "content": "<p>[quote=yr;65117]</p>\n<p>I have put my modified version of Caffe with realtime data augmentation here:&nbsp;https://github.com/ChenglongChen/caffe-windows</p>\n<p>It is built in Windows.</p>\n<p>Hope it helps.</p>\n<p>[/quote]</p>\n<p>I have a question about your augmentation method. You crop images before rotation, so the result is that there's some white corner&nbsp;in the final images.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "65867",
      "postDate": "03/10/2015 06:46:52",
      "content": "<p>[quote=Liang Pang;65865]</p>\n<p>[quote=yr;65117]</p>\n<p>I have put my modified version of Caffe with realtime data augmentation here:&nbsp;https://github.com/ChenglongChen/caffe-windows</p>\n<p>It is built in Windows.</p>\n<p>Hope it helps.</p>\n<p>[/quote]</p>\n<p>I have a question about your augmentation method. You crop images before rotation, so the result is that there's some white corner&nbsp;in the final images.</p>\n<p>[/quote]</p>\n<p>Yes. A better&nbsp;choice might be placing cropping in the end, after all the transformations.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "65869",
      "postDate": "03/10/2015 06:52:52",
      "content": "<p>[quote=Senecaur;65682]</p>\n<p>[quote=yr;65117]</p>\n<p>I have put my modified version of Caffe with realtime data augmentation here:&nbsp;https://github.com/ChenglongChen/caffe-windows</p>\n<p>It is built in Windows.</p>\n<p>Hope it helps.</p>\n<p>[/quote]</p>\n<p>Hi yr,&nbsp; I have modified your code so I can compile it on Linux.&nbsp;</p>\n<p>As I am making use of your kindly shared code I will also share back to the community.&nbsp; The code will be available soon at <a href=\"http://www.github.com/senecaur/caffe-rta\">http://www.github.com/senecaur/caffe-rta</a> (rta stands for real-time augmentation)</p>\n<p>Cheers!</p>\n<p>[/quote]</p>\n<p>Nice!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "99096",
      "postDate": "11/19/2015 11:31:04",
      "content": "",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "99098",
      "postDate": "11/19/2015 11:39:05",
      "content": "<p>[quote=Senecaur;65682]</p>\n<p>[quote=yr;65117]</p>\n<p>I have put my modified version of Caffe with realtime data augmentation here:&nbsp;https://github.com/ChenglongChen/caffe-windows</p>\n<p>It is built in Windows.</p>\n<p>Hope it helps.</p>\n<p>[/quote]</p>\n<p>Hi yr,&nbsp; I have modified your code so I can compile it on Linux.&nbsp;</p>\n<p>As I am making use of your kindly shared code I will also share back to the community.&nbsp; The code will be available soon at <a href=\"http://www.github.com/senecaur/caffe-rta\">http://www.github.com/senecaur/caffe-rta</a> (rta stands for real-time augmentation)</p>\n<p>Cheers!</p>\n<p>[/quote]</p>\n\n<p>Hi Senecaur,</p>\n<p>Thanks for sharing, but I'm having trouble with compiling caffe-rta in Ubuntu 14.04. Errors like this:</p>\n<p>./include/caffe/util/cudnn.hpp(64): error: identifier &quot;cudnnTensor4dDescriptor_t&quot; is undefined</p>\n<p>What cudnn version did you use at the time? I have tried with R1, V2 and V3.0, yet with no result. I'm also using CUDA 7.0 so maybe this code just isn't compatible anymore. Cheers!</p>",
      "rawMarkdown": "",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 61972,
      "author_name": "liangpang",
      "author_url": "",
      "post_date": "12/28/2014 03:22:10",
      "content": "<p>Hi xudong cao,</p>\n<p>What's meaning of augmentation you do? Don't you resize all image to a fix size first?</p>\n<p>I simply resize to the fix size.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61982,
      "author_name": "nagadomi",
      "author_url": "",
      "post_date": "12/28/2014 22:58:41",
      "content": "<p>see section 4.1.</p>\n<p>http://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63189,
      "author_name": "msegala",
      "author_url": "",
      "post_date": "01/26/2015 14:30:40",
      "content": "<p>I was wondering what affine transformations people are using that help with performance.&nbsp;So far I have tried random rotations, sheering, flipping, and translation.</p>\n<p>However, the only thing that seems to make improvements is doing fixed rotations of [90,180,270] degrees. Anyone trying something else or getting better results?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 64071,
      "author_name": "deepcnn",
      "author_url": "",
      "post_date": "02/11/2015 21:57:21",
      "content": "<p>@xudong, what types of affine transforms did you try, if you feel comfortable sharing in a general sense the ones that seemed to help in improving performance?</p>\n<p>Do you try to maintain&nbsp;same size as the original after the transform or you keep the enlarged versions. My concern is keeping the enlarged versions would be counterproductive as you try to resize for training, the effect will be scaling the organism from the original size.</p>\n<p>Also, has anybody tried whitening and other elastic deformations or warping?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 64103,
      "author_name": "nagadomi",
      "author_url": "",
      "post_date": "02/12/2015 09:16:46",
      "content": "<p>I tried to use elastic distortion but did not help for me.</p>\n<p>rotating, scaling(zoom-in/zoom-out), flipping, translation(shift x/y), perspective cropping(homography/affine transformation) and changing the contrast help the performance I think.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 64110,
      "author_name": "xudongcao",
      "author_url": "",
      "post_date": "02/12/2015 11:31:48",
      "content": "<p>@Deep&nbsp;</p>\n<p>I use opencv affinewarp function to realize the affine transformation. Like nagadomi's comments, the affine transformation includes roration, scaling, translation, shearing and ratio. You can tune them all to find&nbsp;the appropriate augmentation parameters which fits your algorithm/model.</p>\n\n<p>@nagadomi</p>\n<p>I found contrast augmentation dose little help with the performance, though it does not damage the performance.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 64122,
      "author_name": "adjgiulio",
      "author_url": "",
      "post_date": "02/12/2015 16:38:47",
      "content": "<p>[quote=nagadomi;64103]</p>\n<p>I tried to use elastic distortion but did not help for me.</p>\n<p>rotating, scaling(zoom-in/zoom-out), flipping, translation(shift x/y), perspective cropping(homography/affine transformation) and changing the contrast help the performance I think.</p>\n<p>[/quote]</p>\n<p>Are you guys doing augmentatio pre or post resizing?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 64144,
      "author_name": "nagadomi",
      "author_url": "",
      "post_date": "02/12/2015 21:32:33",
      "content": "<p>[quote=Giulio;64122]</p>\n<p>[quote=nagadomi;64103]</p>\n<p>I tried to use elastic distortion but did not help for me.</p>\n<p>rotating, scaling(zoom-in/zoom-out), flipping, translation(shift x/y), perspective cropping(homography/affine transformation) and changing the contrast help the performance I think.</p>\n<p>[/quote]</p>\n<p>Are you guys doing augmentatio pre or post resizing?</p>\n<p>[/quote]</p>\n<p>my data augmentation schema is in realtime. like this.</p>\n<p><code>preprocess:<br>&nbsp; x = resize(all images, 96x96)<br>&nbsp; y = labels<br>&nbsp; save_dataset(x, y)</code></p>\n<p><code>train:<br>&nbsp; train_x, train_y = load_dataset(&quot;train&quot;)<br>&nbsp; model = new_model()<br>&nbsp; for i in range(1, iteration):<br>&nbsp; &nbsp; x, y = get_minibatch(train_x, train_y)<br>&nbsp; &nbsp; x = random_transform(x) # augment<br>&nbsp; &nbsp; x = normalize(x)<br>&nbsp; &nbsp; model.update(x, y)<br>&nbsp; save_model(model)<br></code></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 64160,
      "author_name": "senecaur",
      "author_url": "",
      "post_date": "02/13/2015 12:49:05",
      "content": "<p>Does anyone know of any examples of doing real-time data augmentation in either Caffe or Torch7?&nbsp; I can't seem to find any after extensive Googling!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 64161,
      "author_name": "chenglongchen",
      "author_url": "",
      "post_date": "02/13/2015 13:12:46",
      "content": "<p>[quote=Senecaur;64160]</p>\n<p>Does anyone know of any examples of doing real-time data augmentation in either Caffe or Torch7?&nbsp; I can't seem to find any after extensive Googling!</p>\n<p>[/quote]</p>\n<p>If you are interested in real-time data augmentation within Caffe, have a look at the the COMPACT_DATA layer kindly provided by the princeton guys:&nbsp;http://vision.princeton.edu/pvt/GoogLeNet/code/.</p>\n<p>Within&nbsp;this layer, the data are stored as IplImage which offers you the possibility to utilize Opencv for geometric transformation and contrast/brightness adjustment etc (see the data_transformer.cpp in the above link too).</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 64164,
      "author_name": "senecaur",
      "author_url": "",
      "post_date": "02/13/2015 13:47:46",
      "content": "<p>[quote=yr;64161]</p>\n<p>[quote=Senecaur;64160]</p>\n<p>Does anyone know of any examples of doing real-time data augmentation in either Caffe or Torch7?&nbsp; I can't seem to find any after extensive Googling!</p>\n<p>[/quote]</p>\n<p>If you are interested in real-time data augmentation within Caffe, have a look at the the COMPACT_DATA layer kindly provided by the princeton guys:&nbsp;http://vision.princeton.edu/pvt/GoogLeNet/code/.</p>\n<p>Within&nbsp;this layer, the data are stored as IplImage which offers you the possibility to utilize Opencv for geometric transformation and contrast/brightness adjustment etc (see the data_transformer.cpp in the above link too).</p>\n<p>[/quote]</p>\n\n<p>Awesome!&nbsp; Thank-you - that's exactly the kind of thing I was looking for.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 65117,
      "author_name": "chenglongchen",
      "author_url": "",
      "post_date": "02/28/2015 09:41:24",
      "content": "<p>I have put my modified version of Caffe with realtime data augmentation here:&nbsp;https://github.com/ChenglongChen/caffe-windows</p>\n<p>It is built in Windows.</p>\n<p>Hope it helps.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 65194,
      "author_name": "skylibrary",
      "author_url": "",
      "post_date": "03/01/2015 19:37:53",
      "content": "<p>Thanks for sharing your code, yr.</p>\n<p>Actually I just spend the last two days modifing GoogLeNet/code/ to make realtime augmentation works, however, your codes offers more augmentations, which give us more parameters to tune the model.</p>\n<p>calculate the mean is the tricky parts, besides doing realtime augmentation in data_transformer, I had to change RGB to GRAY in compact_data_layer.cpp. So I can use the original code to calculate the mean in gray scale, and when the image pass through compact data layer, it will become gray scale too.&nbsp;</p>\n<p>So I guess you are directly working with 3 channel images, or you did the modification&nbsp;in some other parts of the code? &nbsp;I actually have not try running experiments with 3 channels so far, partly because I am running the code on my laptop with a weak mobile GPU, I guess its going to be slower with 3 channels, but does it offer better performance?</p>\n\n<p>[quote=yr;65117]</p>\n<p>I have put my modified version of Caffe with realtime data augmentation here:&nbsp;https://github.com/ChenglongChen/caffe-windows</p>\n<p>It is built in Windows.</p>\n<p>Hope it helps.</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 65200,
      "author_name": "oldufo",
      "author_url": "",
      "post_date": "03/01/2015 21:19:35",
      "content": "<p>@SkyLibrary, you can use RGB without any modification, if then add &quot;SLICE&quot; layer and take only one channel, while others put to &quot;SILENCE&quot; layer.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 65208,
      "author_name": "chenglongchen",
      "author_url": "",
      "post_date": "03/02/2015 02:28:33",
      "content": "<p>I did also change the&nbsp;compact_data_layer.cpp code: I turn off the iscolor flag in the function call&nbsp;cvDecodeImage to convert color image to grayscale one. I should mention this in the README and thank you.&nbsp;</p>\n<p>[quote=SkyLibrary;65194]</p>\n<p>Thanks for sharing your code, yr.</p>\n<p>Actually I just spend the last two days modifing GoogLeNet/code/ to make realtime augmentation works, however, your codes offers more augmentations, which give us more parameters to tune the model.</p>\n<p>calculate the mean is the tricky parts, besides doing realtime augmentation in data_transformer, I had to change RGB to GRAY in compact_data_layer.cpp. So I can use the original code to calculate the mean in gray scale, and when the image pass through compact data layer, it will become gray scale too.&nbsp;</p>\n<p>So I guess you are directly working with 3 channel images, or you did the modification&nbsp;in some other parts of the code? &nbsp;I actually have not try running experiments with 3 channels so far, partly because I am running the code on my laptop with a weak mobile GPU, I guess its going to be slower with 3 channels, but does it offer better performance?</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 65210,
      "author_name": "chenglongchen",
      "author_url": "",
      "post_date": "03/02/2015 02:46:08",
      "content": "<p>@old-ufo, great to know this approach!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 65682,
      "author_name": "senecaur",
      "author_url": "",
      "post_date": "03/07/2015 15:03:38",
      "content": "<p>[quote=yr;65117]</p>\n<p>I have put my modified version of Caffe with realtime data augmentation here:&nbsp;https://github.com/ChenglongChen/caffe-windows</p>\n<p>It is built in Windows.</p>\n<p>Hope it helps.</p>\n<p>[/quote]</p>\n<p>Hi yr,&nbsp; I have modified your code so I can compile it on Linux.&nbsp; </p>\n<p>As I am making use of your kindly shared code I will also share back to the community.&nbsp; The code will be available soon at <a href=\"http://www.github.com/senecaur/caffe-rta\">http://www.github.com/senecaur/caffe-rta</a> (rta stands for real-time augmentation)</p>\n<p>Cheers!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 65865,
      "author_name": "liangpang",
      "author_url": "",
      "post_date": "03/10/2015 06:24:52",
      "content": "<p>[quote=yr;65117]</p>\n<p>I have put my modified version of Caffe with realtime data augmentation here:&nbsp;https://github.com/ChenglongChen/caffe-windows</p>\n<p>It is built in Windows.</p>\n<p>Hope it helps.</p>\n<p>[/quote]</p>\n<p>I have a question about your augmentation method. You crop images before rotation, so the result is that there's some white corner&nbsp;in the final images.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 65867,
      "author_name": "chenglongchen",
      "author_url": "",
      "post_date": "03/10/2015 06:46:52",
      "content": "<p>[quote=Liang Pang;65865]</p>\n<p>[quote=yr;65117]</p>\n<p>I have put my modified version of Caffe with realtime data augmentation here:&nbsp;https://github.com/ChenglongChen/caffe-windows</p>\n<p>It is built in Windows.</p>\n<p>Hope it helps.</p>\n<p>[/quote]</p>\n<p>I have a question about your augmentation method. You crop images before rotation, so the result is that there's some white corner&nbsp;in the final images.</p>\n<p>[/quote]</p>\n<p>Yes. A better&nbsp;choice might be placing cropping in the end, after all the transformations.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 65869,
      "author_name": "chenglongchen",
      "author_url": "",
      "post_date": "03/10/2015 06:52:52",
      "content": "<p>[quote=Senecaur;65682]</p>\n<p>[quote=yr;65117]</p>\n<p>I have put my modified version of Caffe with realtime data augmentation here:&nbsp;https://github.com/ChenglongChen/caffe-windows</p>\n<p>It is built in Windows.</p>\n<p>Hope it helps.</p>\n<p>[/quote]</p>\n<p>Hi yr,&nbsp; I have modified your code so I can compile it on Linux.&nbsp;</p>\n<p>As I am making use of your kindly shared code I will also share back to the community.&nbsp; The code will be available soon at <a href=\"http://www.github.com/senecaur/caffe-rta\">http://www.github.com/senecaur/caffe-rta</a> (rta stands for real-time augmentation)</p>\n<p>Cheers!</p>\n<p>[/quote]</p>\n<p>Nice!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 99096,
      "author_name": "milans",
      "author_url": "",
      "post_date": "11/19/2015 11:31:04",
      "content": "",
      "votes": null,
      "replies": []
    },
    {
      "id": 99098,
      "author_name": "milans",
      "author_url": "",
      "post_date": "11/19/2015 11:39:05",
      "content": "<p>[quote=Senecaur;65682]</p>\n<p>[quote=yr;65117]</p>\n<p>I have put my modified version of Caffe with realtime data augmentation here:&nbsp;https://github.com/ChenglongChen/caffe-windows</p>\n<p>It is built in Windows.</p>\n<p>Hope it helps.</p>\n<p>[/quote]</p>\n<p>Hi yr,&nbsp; I have modified your code so I can compile it on Linux.&nbsp;</p>\n<p>As I am making use of your kindly shared code I will also share back to the community.&nbsp; The code will be available soon at <a href=\"http://www.github.com/senecaur/caffe-rta\">http://www.github.com/senecaur/caffe-rta</a> (rta stands for real-time augmentation)</p>\n<p>Cheers!</p>\n<p>[/quote]</p>\n\n<p>Hi Senecaur,</p>\n<p>Thanks for sharing, but I'm having trouble with compiling caffe-rta in Ubuntu 14.04. Errors like this:</p>\n<p>./include/caffe/util/cudnn.hpp(64): error: identifier &quot;cudnnTensor4dDescriptor_t&quot; is undefined</p>\n<p>What cudnn version did you use at the time? I have tried with R1, V2 and V3.0, yet with no result. I'm also using CUDA 7.0 so maybe this code just isn't compatible anymore. Cheers!</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "61895": "",
    "61972": "",
    "61982": "",
    "63189": "",
    "64071": "",
    "64103": "",
    "64110": "",
    "64122": "",
    "64144": "",
    "64160": "",
    "64161": "",
    "64164": "",
    "65117": "",
    "65194": "",
    "65200": "",
    "65208": "",
    "65210": "",
    "65682": "",
    "65865": "",
    "65867": "",
    "65869": "",
    "99096": "",
    "99098": ""
  },
  "source": "meta"
}