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.

Monday, February 27, 2017

Tuesday, January 31, 2017

Infrastructre as a code for Nodejs, Ubuntu and Nginx

Standard
Hello All:

Hosting a web application on a cloud platform (like AWS, Azure etc) requires lots of housekeeping task involving server provisioning, installing software etc.

Infrastructure as a code is a paradigm in which the necessary infrastructure is brought up with the help of code.

Wednesday, January 4, 2017

Tuesday, February 2, 2016

RetroClient- Library for making HTTP calls using Retrofit and OkHttp

Standard
Hello All:

Interaction with back-end using REST based API is very common in application development.
There are multiple libraries to make network calls on Android. Following two are most used.
  1. Volley
  2. Retrofit
In this tutorial I will share a library which can be helpful in making network calls on Android.

Thursday, October 1, 2015

Sunday, September 20, 2015

Convert PNG, JPEG, TIFF to WebP

Standard
Hello All:

Everybody wants to reduce the size of his/her android application. Images contribute a lot in increasing the application size. Google has released a new image type Webp. In this post I will share a simple utility which can do bulk conversion of images to webp.

Sunday, August 30, 2015

Thursday, August 20, 2015

Tuesday, July 21, 2015

EventBus with Volley in Android Application

Standard
Hello:

Developing De-coupled applications always helps in maintainability of the project. In android application development we use listener pattern using interfaces to handle callback. Though it gets the work done but with bigger projects this may result into maintainability issues.

Sunday, July 12, 2015

Seven must have libraries in any android application

Standard
Hello All:

Developing a stable and professional application requires discipline and better coding practices. Sometimes it turns out that re-inventing the wheel also leads to some issues which can be avoided by using external libraries.

Monday, June 29, 2015

Wednesday, June 17, 2015

Exception handling in Android Application

Standard
Hello All:

During application development for any platform there are chances of missing some corner cases which in turn leads to exceptions which can lead to crashes. In terms of android applications development this leads to crash of the application with a pop-up saying
"XYZ has stopped working"

Sunday, May 31, 2015

Sunday, May 17, 2015

Handling adapter error while using RecyclerView in Android

Standard
Hello All:

RecyclerView is introduced with Android L and is also available with AppCompat library. RecyclerView provides better layout option and performance as compared to ListView. However, in this post I will share one of the possible solutions to a problem which occurs with RecyclerView.

Friday, May 8, 2015