Thursday, September 10, 2020

Research Paper Presentation at ICCIT-1441 Conference

10-09-2020

2020-International Conference on Computing and Information Technology (ICCIT-1441) was held on 09 - 10 September 2020 at Saudi Arabia. The conference was organized by the University of Tabuk and IEEE. I presented the research paper entitled, "Cybersecurity and Data Privacy in the Cloudlet for Preliminary Healthcare Big Data Analytics." The presentation video is now available through following website link.

Research Presentation at YouTube




Monday, August 24, 2020

Fourier Extrapolation to Predict Future Data

The plot below shows the initial failed effort to predict future data. The main reason behind the failure was missing data as shown by line segments. The dataset is in blue color whereas the predicted data is in red color. Note: This graph also limit data due round off error corrected afterward in the code. 

Many thanks to Dr. Muhammad Usama Zafar, Hamdard University; again for his suggestion to recover the missing data in the dataset and data prediction. The code in my Earlier Post below is used to generate the missing data. 

Earlier Post: Graph2Data in Python with Bounding Box and Extracted Data Scaling

The Fourier Extrapolation code below is used on the complete dataset to generate the predicted data. 

 

The plot below shows the final output. The round off error in the code is also corrected. 


Monday, August 10, 2020

CPD Session: Systems Architecture: Deployment and Subsystem Architecture with Traffic Lights, UAV, and IoT V2X Applications

09 August 2020

I delivered the CPD session in three parts through online Zoom meetings. The session was organized by the Hamdard University in collaboration with Pakistan Engineering Council and IoT Center Pakistan. 

The outcome of the session is as follows.

  • Brief Introduction to UML Diagrams
  • Essential Properties of Systems Architecture 
  • Organizing Systems Models 
  • Identifying Systems Architecture 
  • Specifying Subsystem Interfaces 
  • Mapping Requirements to Subsystems 
  • Examples: Traffic Lights, UAV, IoT V2X 
[Video Session 1/3] [Video Session 2/3] [Video Session 3/3]



Saturday, August 1, 2020

Graph2Data in Python with Bounding Box and Extracted Data Scaling

This code generates a bounding box and extract data from graph in example image. Interestingly, this code project also extends my PhD research work from manual to automated extraction from image data. Here, I show a basic example. The example graph:


The input graph is manually generated.


The sampled extracted data is displayed with bounding box.


To scale, minimum and maximum axes ranges are taken from example image.


Finally, the output extracted and scaled data plot.


# 2020 Dr Tariq Javid, Hamdard University

get_ipython().run_line_magic('matplotlib', 'inline')
import warnings
warnings.filterwarnings('ignore')
import numpy as np
from skimage.color import rgb2gray
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
from matplotlib.patches import Rectangle

def data_line_center(x): 
    s = 0 # start 
    c = 0 # count
    dat_val = 0.
    vect_len = len(x)
    for idx in range(vect_len):
        if x[idx] == 0:
            c = c + 1
    for idx in range(vect_len):
        if x[idx] == 0:
            s = idx
            break
    dat_val = s + c / 2.
    return dat_val

def bound_bx(arr, a, b, c, d):
    # print a, b, c, d
    right_x  = 0
    right_y  = 0
    left_x   = 0
    left_y   = 0
    top_x    = 0
    top_y    = 0
    bottom_x = 0
    bottom_y = 0
    new_arr  = np.zeros_like(arr)
    # top_xy
    for idx in range(a, c):
        for idy in range(b, d):
            if arr[idx,idy] == 0.:
                new_arr[idx,idy] = 1.
                break
        else:
            continue
        break
    # left_xy
    for idy in range(b, d):
        for idx in range(a, c):
            if arr[idx,idy] == 0.:
                new_arr[idx,idy] = 1.
                break
        else:
            continue
        break
    # bottom_xy
    arr = np.flipud(arr)
    new_arr = np.flipud(new_arr)
    for idx in range(a, c):
        for idy in range(b, d):
            if arr[idx,idy] == 0.:
                new_arr[idx,idy] = 1.
                break
        else:
            continue
        break
    arr = np.flipud(arr)
    new_arr = np.flipud(new_arr)    
    # right_xy
    arr = np.fliplr(arr)
    new_arr = np.fliplr(new_arr)
    for idy in range(b, d):
        for idx in range(a, c):
            if arr[idx,idy] == 0.:
                new_arr[idx,idy] = 1.
                break
        else:
            continue
        break
    arr = np.fliplr(arr)
    new_arr = np.fliplr(new_arr)
    # transform data to information  
    return new_arr

def point_dat(arr, a, b, c, d): # binarization
    new_arr = np.ones_like(arr)
    for idx in range(a, c):
        for idy in range(b, d):
            if arr[idx,idy] < 0.5:
                new_arr[idx,idy] = 0.
            else:
                new_arr[idx,idy] = 1.
    return new_arr

def bound_bx_points(arr, nrows, ncols):
    arr4 = np.zeros((4,2))
    n = 0
    for idx in range(0, nrows):
        for idy in range(0, ncols):
            if arr[idx,idy] == 1.:
                arr4[n,0] = idx
                arr4[n,1] = idy
                n = n + 1
    new_arr = arr4
    return new_arr

def scale_dat(x,m,n,d,t,s): 
    arr = np.zeros([m,3])   # 
    cd  = 0
    ct  = 0
    # select data as per dat_range
    for idy in range(m):
        cd = round(idy * d)
        arr[idy,0] = cd
        arr[idy,1] = x[cd]
        arr[idy,2] = s + idy
    # scale data 
    arr[:,1] = arr[:,1] - min(arr[:,1]) # 
    arr[:,1] = arr[:,1] / max(arr[:,1]) # data in [0,1]
    arr[:,1] = abs(arr[:,1] - 1)        # data flip up down
    arr[:,1] = arr[:,1] * n             # temp range incorporated
    arr[:,1] = arr[:,1] + t             # minimum temp added
    return arr

def main():
    img_in = mpimg.imread('example066_IP.png') # Fig 6.6, 1851--2000 (150 years)
    img_gray  = rgb2gray(img_in)
    img_gray  = (img_gray - np.min(img_gray)) / (np.max(img_gray) - np.min(img_gray))
    arr = img_gray
    no_rows = arr.shape[0] #  315
    no_cols = arr.shape[1] # 1050
    arr2 = point_dat(arr, 0, 0, no_rows, no_cols)  # arr2 is binary
    arr3 = bound_bx(arr2, 0, 0, no_rows, no_cols)  # arr3 has bounding box data 
    arr4 = bound_bx_points(arr3, no_rows, no_cols) # arr4 has bounding box corner points
    x_top_left = int(min(arr4[:,0]))
    y_top_left = int(min(arr4[:,1]))
    x_bottom_right = int(max(arr4[:,0]))
    y_bottom_right = int(max(arr4[:,1]))
    x_lower_left = int(max(arr4[:,0]))
    y_lower_left = int(min(arr4[:,1]))
    rect_width   = y_bottom_right - y_top_left
    rect_height  = x_bottom_right - x_top_left
    plt.figure(figsize=(20,10)) 
    ax = plt.gca()
    rect = Rectangle((y_top_left,x_top_left),rect_width,rect_height,linewidth=1,edgecolor='b',facecolor='none')
    ax.add_patch(rect)
    # plt.axvline(x=100,color='red')
    dat_start = 1851  # start year
    dat_end   = 2000  # end year
    tmp_min   = 17.40 # minimum temperature
    tmp_max   = 18.77 # maximum temperature
    dat_range = dat_end - dat_start
    tmp_range = tmp_max - tmp_min
    # print (dat_range,tmp_range)
    dat_adjust= float(rect_width) / float(dat_range)
    tmp_adjust= float(rect_height) / float(tmp_range)
    vect_dat = np.zeros(rect_width)
    plt.imshow(img_in)
    n = 0
    for y in range(y_top_left, y_bottom_right):
        dat_val  = data_line_center(arr2[:,y])
        vect_dat[n] = dat_val 
        n = n + 1
        if (n % 10 == 0):
            plt.scatter(y,dat_val,color='b')
    output_dat = scale_dat(vect_dat,dat_range,tmp_range,dat_adjust,tmp_min,dat_start)
    x = output_dat[:,0]
    y = output_dat[:,1]
    z = output_dat[:,2]
    plt.figure(figsize=(20,4)) 
    plt.plot(z,y,color='g')

if __name__ == "__main__":
    main()




Wednesday, April 22, 2020

Let us Numba by Dr Tariq Javid -- a Rework

In this post, I used example codes from Numba tutorial for GTC 2017 conference.

  • I have created an environment deep-learning in Anaconda Navigator (Anaconda3). In this environment, I have installed required Python modules, for example, cudatoolkit and numba.
  • The code in Jupyter Notebook begin by exporting path to NVIDIA driver DLL and library folder. 
  • The first example is on use of jit decorator. This example shows performance improvement while using the compiled code in comparison to pure python code. 
  • The second example uses vectorize decorator. This example shows code for GPU is slow whereas code for CPU is faster. Reason: small number of computations for GPU and data transfer overhead.
  • The third example code shows a faster for GPU. 
  • The fourth example code shows baseline performance with host arrays.
  • The fifth example code shows how transfer data to and from GPU toward faster execution. 









Thursday, March 19, 2020

About Dr. Tariq Javid

20 March 2020

About Dr. Tariq Javid

Objective: To make sellable products that solve real life problems. 

Research Statement: To discover practical solutions to real life problems through multidisciplinary research. Primary ingredients of my research include applications of image processing techniques and information technology. I discovered a regular hexagonal model of sphere-like objects during my PhD research project; and applied model to determine left ventricle ejection fraction with reduced computations and improved accuracy.         

Brief Bibliography: Dr. Tariq Javid is currently working as Associate Professor at the Faculty of Engineering Sciences and Technology, Hamdard University (HU), Karachi, Pakistan; since February 2015. At HU he teaches Bachelor/Masters/PhD level courses related to electrical engineering, electronics engineering,  computer systems engineering, computer sciences, and information technology. He leads a team of highly motivated Biomedical Engineers and conducts research toward solutions discovery. Before that, he served as Assistant Professor at the Department of Electrical Engineering, Heavy Industries Taxila Education City (HITEC) University, Taxila Cantt, Rawalpindi, Pakistan; from September 2011 to February 2015. At HITEC University, he was also appointed as Director Quality Assurance and Collaborations for one year term. He was lucky enough to lead a team of highly motivated Electrical Engineers at HITEC University. Before that, he served as Network and Systems Engineer at Information Technology Division, Aga Khan University Hospital (AKUH), Karachi, Pakistan; from August 1998 to September 2011. His assignments at AKUH included to lead a team of Network and Systems Engineers for IT services management: Microsoft Windows and Unix Servers, Antivirus, Software Updates, IT Policies, and User Support. He obtained his PhD in Electronics Engineering from Pakistan Navy Engineering College, Karachi-Campus, National University of Sciences and Technology (NUST), Islamabad; in January 2010. He obtained his Masters of Engineering degree in Computer Systems Engineering and Bachelor of Engineering degree in Electronics Engineering from NED University of Engineering and Technology, Karachi; in 2002 and 1999, respectively. He enjoys working in a challenging environment with cultural diversity. 

Summary of Post PhD Continued Learning, Research, and Development Efforts: After PhD, Dr. Tariq Javid learned Software Defined Networking and successfully used it for Layer 2 firewall simulation. Later, he learned Fuzzy Control Systems and successfully used concepts for medical image enhancement application. Currently, he is working on an IoT device with camera and biosensors to develop real-time applications. His PhD students are working on compressed sensing for spatiotemporal enhanced dynamic magnetic resonance image reconstruction and scaleable context aware agricultural ontology. He is on R/Python for deep learning and the fourth industrial revolution. 

Tuesday, February 25, 2020

HU FEST Spring 2020 Semester

Monday 24 February 2020

The orientation session was held at FEST auditorium. My speech to the students of BE (BME) and BS (FST) joining Hamdard University Faculty of Engineering Sciences & Technology from spring 2020 semester have three sections: welcome to institute, developing the learning habit, and guidance after graduation. 

The welcome section of my speech emphasis on students to come with a desire to learn. The BE (BME) program is well established whereas BS (FST) has recently started. Note this semester is the second intake for the FST program. I insisted on importance of questioning and developing healthy relationship with teachers. If students somehow unable to ask question during the class, they should write their question and visit teacher office during consultation timings to get answer. Last section of my speech was about post/after graduation. I guided students to practice what they will learn in four years of their studies at Hamdard University. As the knowledge is increasing day-by-day, the habit and skill of lifelong learning should be learned and practiced.

A group photo session followed the orientation session.