"No one is harder on a talented person than the person themselves" - Linda Wilkinson ; "Trust your guts and don't follow the herd" ; "Validate direction not destination" ;

December 17, 2019

Improving Women Safety

To reduce crime against women more than strengthening laws we need to get to the root cause of issues. We need to analyze the crime data and fix the source of the problem.

We need to analyze the crime patterns based on different aspects to find the underlying patterns.

Pattern vs Solutions
  • Correlation with alcohol - How to reduce/limit alcohol consumption 
  • Correlation with education - How to reduce dropouts and improve education
  • Correlation with income category - Sustainable jobs
  • Correlation with marital status - Family aspects
  • Correlation to caste - Driven by caste / Unemployment / Dropouts
  • Correlation to age group - Social media, porn impact
  • Correlation to social behavior - Drugs / partying / Addiction
  • Correlation to job type - Government vs Private jobs vs Daily vs Organized Crimes
Education is not limited to a few years. Education is not about degrees. The real purpose of education is to unlearn and relearn things from morality/humanity perspective.

It needs complete society change, not just laws. Let's prepare a safer tomorrow by making the required changes. 

Keep Questioning!!!

December 16, 2019

Day #307 - Porting Keras to Tensorflow Lite Version

Next Task is to run all the developed models in Pi using Tensorflow Lite. I am using google colab to convert the models into lite version.

The ported models we will attempt to run in Rasberry PI as next steps

Happy Learning!!!

Day#306 - Express the SQL in pandas, TSQL in Pandas

I wanted to mimic joins, aggregation, sum whatever we do in Database with pandas. A simple storyline of Data Analysis between Employee, Department and Salary using pandas dataframes.


Everything can be done in SQL. This is a different approach to it using pandas.

Happy Learning!!!

Day #305 - Loading from Weights file HDF, saved models H5 files

We will look at
  • Vanilla Model
  • Load preexisting weights HDF5 and Continue
  • Load preexisting model H5 and Continue

Results

Option #1 - Vanilla Model
Option #2 - Continue from Saved Weights
Option #3 - Continue from Saved Model H5 File


Happy Learning!!!

Day #304 - Analysis of Deep Fashion Dataset - LandmarkDetection

Three different poses

8 localization points only 4 is not null in all columns
Different visibility value options (0,1,2) - visibility: v=2 visible; v=1 occlusion; v=0 not labeled

One model for each category we need to do
The top-level has 3 generic categories:
  • 1: “top” (upper-body clothes such as jackets, sweaters, tees, etc.)
  • 2: “bottom” (lower-body clothes such as jeans, shorts, skirts, etc.)
  • 3: “long” (full-body clothes such as dresses, coats, robes, etc.)
The implementation is defined in paper - Link
Data - Link

Architecture Implementation

Data Analysis of the Dataset for Non-Zero Columns

  • image_name                   0
  • landmark_visibility_1        0
  • landmark_location_x_1        0
  • landmark_location_y_1        0
  • landmark_visibility_2        0
  • landmark_location_x_2        0
  • landmark_location_y_2        0
  • landmark_visibility_3        0
  • landmark_location_x_3        0
  • landmark_location_y_3        0
  • landmark_visibility_4        0
  • landmark_location_x_4        0
  • landmark_location_y_4        0
  • landmark_visibility_5    30972
  • landmark_location_x_5    30972
  • landmark_location_y_5    30972
  • landmark_visibility_6    30972
  • landmark_location_x_6    30972
  • landmark_location_y_6    30972
  • landmark_visibility_7    73003
  • landmark_location_x_7    73003
  • landmark_location_y_7    73003
  • landmark_visibility_8    73003
  • landmark_location_x_8    73003
  • landmark_location_y_8    73003

Non-zero columns

  • landmark_visibility_1        0
  • landmark_location_x_1        0
  • landmark_location_y_1        0
  • landmark_visibility_2        0
  • landmark_location_x_2        0
  • landmark_location_y_2        0
  • landmark_visibility_3        0
  • landmark_location_x_3        0
  • landmark_location_y_3        0
  • landmark_visibility_4        0
  • landmark_location_x_4        0
  • landmark_location_y_4        0

Happy Learning!!!

Day #303 - Model Training Guidelines - Part II

Here we will look at two more additions on top of the previous post 
  • Save model h5 file after every run/epoch 
  • Add Data batching to run in smaller iterations, Leverage Sequencer


This is a template code. This can be customized for larger datasets


Happy Learning!!!

December 15, 2019

Project Learning Notes

Tracking, Counting has always been quite interesting topic for sometime. Explored this codebase link


I liked the approach of directionality based tracking. This is very needed for directionality based counting. Hoping to reuse / implement it in people counting scenarios.


My perspective is

  • Tracking by Sampling Frames (Reduce Load)
  • Use Euclidean and other attributes to track/match
  • Evaluate existing tracking built in OpenCV (Again these need frame by frame tracking)

Happy Learning!!!

December 13, 2019

Day #302 - Keras Best Practices during Training

In this post we take the raw version of code and add below features in code
  • Adding Checkpoint
  • Adding Logging
  • Plot Results
  • Restart Training from Checkpoint
  • Early Stopping

Run #1 Output (10 Epochs)


Run #2 Continue with Existing Weights (5 Epochs)


Happy Learning!!!

December 11, 2019

Day #301 - Data Batching in Keras

This post is about custom data batching using Keras. Here we override the methods of inbuilt sequence. The below example is with dummy data generation, data splitting and fetching the batch of records.



Other strategies
  • Databases -> CSV 50K Data Chunks Records -> Training and Save Checkpoint
  • Checkpoint to Save for Each run and reuse for next 50K Chunk of Data
This is a classic data fetching solution. Database can store millions of records. We can fetch each batch, export it to a CSV and use each chunk, train and save checkpoint and continue further for next run.

Happy Learning!!!

December 01, 2019

Day #300 - Lessons Learnt from Multi-Label Classification

Today is 300th Post on Data Science. It has been a long journey. Still I feel there is a lot more to catchup. Keep Learning, Keep Going.

There are different tasks involved

1. Data Collection - Fatkun Batch Download Image chrome extension to download images
2. Script to reshape images and store in a standard format
3. Simple DB script to update and prepare data

4. This base implementation was useful for model implementation link
5. Data Test Results

Happy Learning!!!