Zeshan Hussain

COMPUTER ENGINEER, DEVELOPER, & TECH ENTHUSIAST

Thank you for joining me on my digital space. I'm delighted to have you visit.

Let's View My Work !

WHAT I DO

Programmer

As a seasoned coder, I bring fluency to languages such as C++ and Python, utilizing them as tools for tackling diverse challenges. In the realm of computer vision and image processing, OpenCV is my forte, enabling seamless integration of its capabilities for tasks like facial recognition, object detection, and image enhancement. Beyond that, I am a passionate explorer of various frameworks, introducing versatility to areas such as web development and machine learning. Let's collaboratively script a future where technology serves as a conduit for innovation, and solutions resonate with both performance and user experience.

Embedded Development

Collaborating with my Electrical Engineering background and Computer Science know-how, I'm immersing myself in the intricacies of embedded systems. From tinkering with microcontrollers to diving into real-time operating systems, I'm building a holistic understanding of the hardware-software interface. This hands-on experience isn't just expanding my skill set—it's propelling me to the forefront of cutting-edge technologies, where hardware and code come together to create intelligent and efficient systems. Join me on this journey of discovery, where my goal is not just to learn but to contribute to the ever-evolving landscape of embedded development.

InfoSec

I'm diving into the world of Information Security, learning the ropes, and having a blast doing it. I rely on awesome open-source resources, and one of my favorites is TryHackMe. It's not just a platform; it's a community that offers hands-on challenges for everyone, whether you're a newbie or a pro. The open-source vibe resonates with me because it's not just about learning; it's about sharing and growing together. Alongside TryHackMe, I explore various open-source projects that bring a ton of value to my learning adventure.

ABOUT ME

SOFTWARE DEVELOPER

Currently, I'm pursuing a degree in Electrical Engineering and Computer Science at Pierce Community College. I'll be transferring to a UC that fits my desires. My passion for computers goes way back to when my dad got me my first computer in 5th grade, and ever since then, my passion has grown into a full-time career! I have found a love for programming, embedded development, and InfoSec. My interest in software and InfoSec started at a very young age, to be honest with you. It began when I learned about a recovery tool called Cain & Abel. This tool is used by cybersecurity professionals and nation-state actors. It can recover various kinds of passwords using methods such as network packet sniffing and dictionary attacks.

C++95%
Python 80%
Swift70%
HTLM5 & CSS3 90%

PORTFOLIO

portfolio img

Camera from Scratch

Built a camera using an ESP-32 CAM, 3.7V battery & 3d printed case
portfolio img

Computer Vision

Machine Learning Detecting Firearm
(Video clip on the left)
portfolio img

Open-Source Tello DJI Drone

Graphical User Interface Powered by C++

Blogpost

Computer Vision FireArm Detection

OpenCV Framework

Created a camera that utilizes OpenCV, a computer vision library, to detect firearms. When the camera detects an individual carrying a gun. I undertook the task of training an AI model using over 60,000 images. Using a toy gun, I constructed my own Image Classifier, which served as a starting point. To create the camera from scratch, I used an ESP-32 camera micro-controller coded in C. I then created a C++ program using the OpenCV library to seamlessly connect the camera and machine learning model to be able to detect if a human is holding a firearm. However, for the model to be more accurate and reliable, it is crucial to train it with real firearms data. The process of creating AI Cascade models involves training a computer model with a vast dataset of images to teach it how to identify specific objects or features within those images. This intricate process entails breaking down the detection problem into smaller, simpler components and creating classifiers for each part. Ultimately, these classifiers are combined into a cascade to effectively detect the desired object—in this case, firearms. Developing an accurate and dependable model demands a substantial investment of time, effort, and resources.

STEP 1: Gathering Image Database; I Begin by gathering a collection of images to train the system. You will need both positive and negative samples. Positive images should contain the object you want to detect, while negative images should not include the object. You can start with how many positive and negative images you want to provide for training, the more, the accurate the model will be. However, you have the option to expand your dataset by capturing additional sequences using HAKA1 or sourcing public images from online databases. Remember, having a diverse set of positive and negative images improves the accuracy of the classifier.

STEP 2: Organizing Negative Images Next, I organized my negative images by placing them in the folder named ...\training\negative. Execute the batch file named create_list.bat, which generates a text file listing all the background images. By running the batch file, I will obtain a text file containing the names of your negative images, each listed on a separate line. This file will be used during the training process to enhance the classifier's performance. Batch File Command:

create_list.bat 2 dir /b *.jpg >bg.txt Running this batch file, you will get a text file each line looks as below: image1200.jpg image1201.jpg image1202.jpg ... Later, we need this negative data file for training the classifier.

STEP 3: Cropping & Marking Positive Images In this step, I'll prepare the positive images by marking the location of the objects within them. You can accomplish this task using one of two utilities: Objectmarker or Image Clipper. Objectmarker is the simpler and faster option, while Image Clipper provides more versatility albeit with additional time investment. For now, let's proceed with Objectmarker for its straightforward approach. Begin by placing your positive images in the folder ...\training\positive\rawdata. Within the same directory, you'll find a file named objectmaker.exe, which is essential for marking the objects in the positive images. Please ensure that the files cv.dll and highgui.dll are present in the same directory as objectmaker.exe for it to function correctly. Before launching objectmaker.exe, find a comfortable and uninterrupted environment as you'll need to meticulously mark and crop numerous images. Upon launching objectmaker.exe, you'll encounter two windows: one displaying the loaded image and the other revealing the image's filename. Follow the prompts to mark the objects accurately within your positive images.

Screenshot

STEP 4: Creating a vector of positive images In folder ..\training\ there is a batch file named samples_creation.bat The content of the batch file is: createsamples.exe -info positive/info.txt -vec vector/facevector.vec -num 200 -w 24 -h 24 Main Parameters: -info positive/info.txt Path for positive info file -vec vector/facevector.vec Path for the output vector file -num 200 Number of positive files to be packed in a vector file -w 24 Width of objects -h 24 Height of objects The batch file loads info.txt and packs the object images into a vector file with the name of e.g. facevector.vec After running the batch file, you will have the file facevector.vec in the folder..\training\vector Note: To run creatsample.exe you also need the files cv097.dll, cxcore097.dll, highgui097.dll, and libguide40.dll in the folder ..\training.

STEP 5: Haar-Training In folder ..\training , you can modify the haartraining.bat : haartraining.exe -data cascades -vec vector/vector.vec -bg negative/bg.txt -npos 200 -nneg 200 -nstages 15 -mem 1024 -mode ALL -w 24 -h 24 –nonsym -data cascades Path and for storing the cascade of classifiers -vec data/vector.vec Path which points the location of vector file -bg negative/bg.txt Path which points to background file -npos 200 Number of positive samples ≤ no. positive bmp files -nneg 200 Number of negative samples (patches) ≥ npos -nstages 15 Number of intended stages for training -mem 1024 Quantity of memory assigned in MB -mode ALL Look literatures for more info about this parameter -w 24 -h 24 Sample size -nonsym Use this if your subject is not horizontally symmetrical



				
#include opencv2/opencv.hpp
#include opencv2/highgui/highgui.hpp
#include opencv2/imgproc/imgproc.hpp
#include iostream
#include opencv2/objdetect/objdetect.hpp

using namespace cv;
using namespace std;



void VideoStream() {
CascadeClassifier firearm_cascade;
    firearm_cascade.load("/Users/zximy/Desktop/Stage1Firearm.xml"); /* Haar Cascade file */

    String url = "http://192.168.1.118/640x480.jpg";

    namedWindow("SCANNING AREA", WINDOW_AUTOSIZE);

    while (true) {
        VideoCapture videoResponse(url);

        Mat videostream;
        videoResponse >> videostream;

        Mat gray;
        cvtColor(videostream, gray, COLOR_BGR2GRAY);

        vector gundetected;
        firearm_cascade.detectMultiScale(gray, gundetected, 12, 26);

        for (const Rect& rect : gundetected) {
            rectangle(videostream, rect, Scalar(0, 0, 255), 3);
        }

        imshow("Scanning", videostream);

        char key = waitKey(5);

        if (key == 'q') {
            break;
        }
    }
}
int main() {
    VideoStream();

    return 0;
}
                        

Open-Source Tello DJI Drone

The DJI Tello Drone is a lightweight quadcopter designed for Developers. Many open-source projects on platforms like GitHub, offering valuable resources such as libraries and tutorials. This support has made Tello popular in education, allowing students to explore programming, robotics, and computer vision through hands-on experiences. The project demonstrates a sophisticated Graphical User Interface (GUI) crafted using Qt Creator and powered by C++. Leveraging the capabilities of the DJI Tello API libraries, the GUI seamlessly integrates advanced features. Through C++ programming, the GUI incorporates an AI-driven video streaming module, ensuring real-time and high-quality video feed from the drone. The interface provides an intuitive display of the drone's connection status, enabling users to monitor the drone's connectivity effortlessly. Additionally, precise flight controls are implemented, allowing users to manage the drone's movements with accuracy and ease. The GUI also incorporates geolocation services, displaying the user's location, and fetches current date and weather information, enriching the user experience. Moreover, the GUI retrieves and showcases the drone's battery percentage, ensuring users are well-informed about the drone's power status. This project highlights the seamless integration of C++ programming with DJI Tello API libraries, resulting in a sophisticated and feature-rich GUI for controlling the drone effectively.


#include "tellocontroller.h"
#include iostream
#include QDebug

TelloController::TelloController(QObject *parent)
    : QObject(parent)
{
    // Initialize your Tello object if necessary

    // Set up the connection check timer
    connectionTimer.setInterval(5000); // Check every 5 seconds
    connect(&connectionTimer, SIGNAL(timeout()), this, SLOT(checkConnection()));
    connectionTimer.start();
}

void TelloController::checkConnection()
{
    if (!DeadOp.is_connected()) {
        // Attempt to reconnect
        if (!DeadOp.connect("192.168.10.1", 8889)) {
            qWarning() << "Failed to Connect to Drone";
        }
        else {
            qCritical() << "Connection has been Established";

        }
    }
}

void TelloController::performDroneMovements()
{
    // Ensure the connection is established before sending commands
    if (DeadOp.is_connected()) {
        if (DeadOp.takeoff()) {
            std::cout << "deadOp has moved!\n";
            DeadOp.set_speed(20.0);
            DeadOp.move_right(70);
            DeadOp.move_forward(20);
            DeadOp.move_left(70);
            DeadOp.move_back(60);
            DeadOp.move_right(40);
            DeadOp.move_forward(40);
            DeadOp.move_left(20);
            DeadOp.land();
        }
    } else {
        std::cerr << "Tello drone not connected!" << std::endl;
    }
}