Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified securityModule/Face/__pycache__/sercurity_module.cpython-37.pyc
Binary file not shown.
13 changes: 12 additions & 1 deletion securityModule/Face/webstreaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@

default_app = firebase_admin.initialize_app(cred)

#Global variable
GScreen = False

db = firestore.client()

# hardcoded
Expand Down Expand Up @@ -143,7 +146,7 @@ def detect_motion(frameCount, datasets_path, vs):
frames.append(cv2.resize(frame, (400, 400)))
new_frame = np.concatenate((frames[0], frames[1]), axis=1)

if total % 350 == 0:
if total % 280 == 0:
tlables, v_scores = sr.detect_labels(new_frame)
dangers, danger_scores = sr.analyzer(tlables, v_scores)

Expand Down Expand Up @@ -262,6 +265,14 @@ def update_SMStwilio():

return jsonify("Success")

@app.route("/_get_Screen", methods=['POST'])
def get_Screen():
clicked=request.form['data']
# update the global variable
GScreen = clicked

return jsonify("Success")


# check to see if this is the main thread of execution
if __name__ == '__main__':
Expand Down