0% found this document useful (0 votes)
10 views

Project Deep Learning

The document describes a project to design a model using computer vision and deep learning to detect unusual or illegal activities in shopping malls using CCTV footage. The model would generate alarms and capture photos of activities to send to management for immediate response. Key challenges include balancing precision to avoid false alarms while maintaining high recall to detect instances. The proposed solution involves preprocessing data, training an EfficientNet and SSD model on 50GB of video data split into usual and criminal categories, quantizing the model for deployment on edge devices, and exporting it using ONNX for interoperability. Metrics like inference time and speed are important for real-time applications.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Project Deep Learning

The document describes a project to design a model using computer vision and deep learning to detect unusual or illegal activities in shopping malls using CCTV footage. The model would generate alarms and capture photos of activities to send to management for immediate response. Key challenges include balancing precision to avoid false alarms while maintaining high recall to detect instances. The proposed solution involves preprocessing data, training an EfficientNet and SSD model on 50GB of video data split into usual and criminal categories, quantizing the model for deployment on edge devices, and exporting it using ONNX for interoperability. Metrics like inference time and speed are important for real-time applications.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Project: Human Suspected Activities Detection Designation:

Data Scientist Client: LST SECURITY-California-Los Angeles

Bussiness_Problem:

In some shopping malls oftenly illegal activities happen, after the did illegal activities,we are
do all the CC cameras are checked well to find out the activity, but the damage has already
been done. It is very difficult to take it back .only option file case on that activity we procide
with legally but we might not say has to tack it back. For address problems

We design a model to prevent unusual activities under CC cameras with the aim of
reducing unethical activities.

Generate an alarm and capture a photo of the prisoner's activity before he escapes, instantly
sent to the area's management.

Then the management team will immediately catch those who try to do these things

Challenges:

1. Precision is important when:


 False positives have significant consequences, such as causing panic,
unnecessary investigations, or legal issues.
 Resources (human or otherwise) required to investigate or respond to
an alarm are limited, and you want to ensure that the alarms triggered
are highly likely to be genuine.
2. Recall is important when:
 Missing instances of illegal activities is considered highly critical, and
false alarms are less consequential.
 The cost of a false negative (not detecting an actual illegal activity) is
higher than the cost of a false positive.

Data set contain vast amount of video photage data around 50GB that includes two catagories one
of them is usual actives means daily routine activities another one is crime related data.

Install AWS CLI: Download and install the AWS Command Line Interface (AWS CLI).

1. Configure AWS CLI: Run aws configure to set up your AWS credentials and
preferred settings.
2. Use AWS CLI: Run AWS CLI commands in your terminal within VS Code or
Notepad to interact with S3, such as listing buckets, copying files

1. Data Preprocessing:
 Annotate the dataset with bounding boxes around objects of interest,
such as activities related to usual behavior and unsual behavior

 Apply video preprocessing techniques to the dataset, including
resizing, normalization, background subtraction,
 Implement noise reduction techniques, such as median filtering, to
enhance video quality.
 Define hyperparameters, such as image size, batch size, and the
number of epochs.
2. Data Splitting:
 Split the dataset into training, validation, and testing sets to evaluate
the model's performance.
3. Model Architecture:
 Design the model architecture. In your case, use effietient net the
backbone for feature extraction and SSD for object detection. effietient
is known for its efficiency, making it suitable for real-time applications.
 Define MAX_SEQ_LENGTH: It's the maximum number of frames
considered for each video, essentially setting a fixed length for video
sequences.
 Define NUM_FEATURES: It's the number of features extracted from
each frame, In this case, it's 2048 features per frame.

 Implement SSD into the model architecture. SSD consists of a base network
additional convolutional layers for object detection at multiple scales, and
bounding box regression and classification layers.
 detecting objects in images using a single deep neural network. It divides the
input image into a grid and predicts bounding boxes and class scores for each
cell.
4. Model Compilation:
 Compile the model with an appropriate loss function (such as SSD loss),
optimizer (e.g., Adam), and metrics for evaluation.
5. Training:
 Train the model on the training dataset. Monitor the performance on
the validation set to avoid overfitting.
 Define hyperparameters like max sequential length and the fixed
number of frames.
 Apply data augmentation techniques, such as random rotation and
flipping, to diversify the training dataset.
6. Hyperparameter Tuning:
 Fine-tune hyperparameters if needed, including learning rate, batch
size, and others, based on the validation performance.
7. Model Evaluation:
 Evaluate the trained model on the test dataset to assess its
generalization to new, unseen data.
8. Post-Processing:
 Implement post-processing steps to filter and refine the model's
predictions. This might involve thresholding, non-maximum
suppression, or other techniques to improve the accuracy of the
detected objects.

7. Quantization and ONNX Export:

Quantization: Quantization is a technique used to optimize machine learning


models for deployment. It involves reducing the precision of the model's weights and
activations, which can significantly decrease the model's size and improve its
inference speed. Quantization is particularly useful for deploying models on
resource-constrained devices such as mobile phones or edge devices.

In your project:

 After training your sequence model, you choose to quantize it. This typically
involves converting the model's parameters (weights and biases) from
floating-point precision (e.g., 32-bit) to lower precision (e.g., 8-bit integers).
 The quantized model retains most of its accuracy while being much smaller in
size, making it more suitable for deployment on memory-limited devices.
 The quantized model is saved in TensorFlow Lite (TFLite) format, which is a
common format for deploying models on mobile and embedded platforms.

ONNX Export: ONNX (Open Neural Network Exchange) is an open and


interoperable format for representing machine learning models. It allows models to
be converted from one framework to another, making it easier to deploy models
across various platforms and frameworks.

1. Inference Time: Inference time, also known as inference latency, refers to the
amount of time it takes for a model to process a single input data point and
produce a prediction or output. It is the time it takes for a model to execute a
forward pass to make a decision. Inference time can vary depending on the
complexity of the model, the size of the input data, and the hardware used for
inference.
2. Inference Speed: Inference speed is the rate at which a model can perform
inference on a batch of data points. It measures how many inferences a model
can make in a given time period, often expressed as inferences per second
(IPS) or frames per second (FPS). High inference speed is crucial for real-time
applications, such as video processing or autonomous vehicles, where rapid
decision-making is essential.

You might also like