Hello,
I am Aqeel, a PhD candidate at Georgia Institute of Technology, working towards energy-effecient machine learning systems design.
Using Python to monitor social distancing
License: MIT License
You have not specified any particular algorithm but just the platform , could you pls answer?
Is it possible to to modify the code so that the bounding boxes too can get different colours as per the violation?
It would also be nice if the final output of the analyzer can be saved locally, by writing a video file in real time.
May i know the reason "d_thresh" calculation is not scaled with the birds eye view height and width where points and all re scaled with height and width of birds eye view ?
d_thresh = np.sqrt(
(warped_pt[0][0] - warped_pt[1][0]) ** 2
+ (warped_pt[0][1] - warped_pt[1][1]) ** 2
)
warped_pt_scaled = [int(warped_pt[0] * scale_w), int(warped_pt[1] * scale_h)]
I am using Pycharm.
Python = 3.6.8
I uninstalled tensorflow-tensorboard and then installed tensorboard as @zainozzaini mentioned in some other issue. But it is not working for me. Please help me with this issue. Thanks in advance
Hi, may I ask that if there is any paper published based on this system? How can I quote it?
AttributeError: module 'tensorboard.plugins.pr_curve.summary' has no attribute 'pb'
Hi
thanks for sharing. i noted from the code the pedestrian bounding boxes are subsequently transformed into bird eye view and then checked for 6 feet/10 feet violation. i wish to get only the violating subject pairs (in bounding boxes or midpoints) among the list of bounding boxes. May i know how can i do so to filter the bounding boxes to know which pair has the violation?
thanks
When I try to run the same code with some other video file, I get a highly magnified video and hence much of the original video data is getting lost.
How can I configure it to avoid such a problem, because as of now I cannot choose the points I desire for ROI
Thanks!
hi,
is there a chance to convert frozen_inference_graph.pb to tfflite..if yes what are the inputs and outputs..are they default..please help me..iam new to tensor flow..thanks in advance!
[ERROR:0] global C:\projects\opencv-python\opencv\modules\videoio\src\cap.cpp (415) cv::VideoWriter::open VIDEOIO(CV_IMAGES): raised OpenCV exception:
OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\videoio\src\cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): pedestrian_detect.avi in function 'cv::icvExtractPattern'
[ERROR:0] global C:\projects\opencv-python\opencv\modules\videoio\src\cap.cpp (415) cv::VideoWriter::open VIDEOIO(CV_IMAGES): raised OpenCV exception:
OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\videoio\src\cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): pedestrian_bird.avi in function 'cv::icvExtractPattern'
Anyone facing this problem? Would need some help here. Thank you
/Users/userName/opt/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
/Users/userName/opt/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/Users/userName/opt/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
/Users/userName/opt/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/Users/userName/opt/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
/Users/userName/opt/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
Traceback (most recent call last):
File "main.py", line 4, in
from network_model import model
File "/Users/userName/Downloads/master/test_distance/SocialDistancingAI-dependabot-pip-tensorflow-1.15.2/network_model.py", line 5, in
import backbone
File "/Users/userName/Downloads/master/test_distance/SocialDistancingAI-dependabot-pip-tensorflow-1.15.2/backbone.py", line 6, in
import tensorflow as tf
File "/Users/userName/opt/anaconda3/lib/python3.7/site-packages/tensorflow/init.py", line 35, in
from tensorflow._api.v1 import compat
File "/Users/userName/opt/anaconda3/lib/python3.7/site-packages/tensorflow/_api/v1/compat/init.py", line 22, in
from tensorflow._api.v1.compat import v2
File "/Users/userName/opt/anaconda3/lib/python3.7/site-packages/tensorflow/_api/v1/compat/v2/init.py", line 303, in
from tensorboard.summary._tf import summary
File "/Users/userName/opt/anaconda3/lib/python3.7/site-packages/tensorboard/summary/init.py", line 25, in
from tensorboard.summary import v1
File "/Users/userName/opt/anaconda3/lib/python3.7/site-packages/tensorboard/summary/v1.py", line 46, in
pr_curve_pb = _pr_curve_summary.pb
AttributeError: module 'tensorboard.plugins.pr_curve.summary' has no attribute 'pb'
In the function plot_lines_between_nodes()
the for loop is made to run through range(len(dd[0]))/2)
due to which all pairs of nodes are not getting taken into account.
Consider the following example:
dist = np.array([[0,173.66634677,194.6715182,1173.33413826],
[173.66634677,0,24.35159132, 1077.55324694],
[194.6715182, 24.35159132, 0, 1056.10037402],
[1173.33413826, 1077.55324694, 1056.10037402, 0]])
thresh = 350
dd = np.where(dist < thresh * 6 / 10)
close_p = []
for i in range(int(np.ceil(len(dd[0]) / 2))):
if dd[0][i] != dd[1][i]:
point1 = dd[0][i]
point2 = dd[1][i]
close_p.append([point1, point2])
The resultant points in close_p
are [[0, 1], [0, 2], [1, 0]]
and it misses out on pairs [[1,2], [2,1]]
The formula used in the function plot_lines_between_nodes
to calculate points which are close to 10 feet is dd = np.where(dist < d_thresh * 6 / 10)
Could you explain this calculation?
Because a different formula is used for ten_feet_violations list
ten_feet_violations = len(np.where(dist_condensed < 10 / 6 * d_thresh)[0])
Thank you!
Thanks for sharing ...!!!
I have some questions with respect to implementation part of it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.