Saturday, January 2, 2021

Random cutout image augmentation preprocessing layer for tensorflow keras

Standard

Hello friends: 

While training on image data, we often need to apply multiple augmentations like random cropping, random zoom etc. 

With the new keras preprocessing layers, these operations can be baked into the model pipeline. 

However, there is one more image augmentation technique we can perform which can provide better results while training. The technique is RANDOM CUTOUT which basically means to replace random sections of the image. This techinque is detailed in this paper.

 In this post, I will share how can we have this technique as a keras preprocessing layer.  

Tensorflow 2.3.1  

Tensorflow 2.4.0  

 Full working Kaggle Notebook is available here. Hope this helps.

Friday, November 2, 2018

Tuesday, February 20, 2018

Simple JSON Query tool

Standard
Hello,

Often we find ourselves in the position to query JSON data on the fly, without having to write a full  blown application to fetch and query JSON.

I also faced the similar situation.
I searched on web for couple of existing solutions like Json Query but I needed some more flexibility like support for newer versions of the library, ability to save the code snippets etc.

I have created my own version of JSON query tool.

The code for the tool is available here.

I have hosted the same which can be accessed here.

Hope this helps someone.

Sunday, May 7, 2017

Minify static resources in an android application

Standard
Sometimes an android application includes lots of static resources like html, css, jss or json files, this leads to a significant increase in the apk size. We all want our android application apk on diet. In this post, I will share a way to reduce the size of static resources thus reducing the size of apk.

Saturday, March 25, 2017

Compress html, json, css and js resources

Standard
Hello All:

We use static resources like html, css, js or json in multiple places to convey information. When we write these files they contain lots of white spaces which can increase the file size as a whole. Here I am going to share a simple tip to reduce the file sizes of static resources.