Skip to content

Instantly share code, notes, and snippets.

View smitshilu's full-sized avatar
🎯
Focusing

Smit Shilu smitshilu

🎯
Focusing
View GitHub Profile

Reproduce

# clone this repo
git clone https://github.com/smitshilu/AISecurityCamera.git
cd AISecurityCamera

# Start the Camera feed using following commnad
python start.py

# If you want to save a new face encoding

Reproduce

# clone this repo
git clone https://github.com/smitshilu/AISecurityCamera.git
cd AISecurityCamera

# Start the Camera feed using following commnad
python start.py

# If you want to save a new face encoding
@smitshilu
smitshilu / 68_point_face_landmark_detection_example.py
Last active March 28, 2021 16:22
dlib face landmark comparison example
# load the required model for 68 points detection
predictor = dlib.shape_predictor("shape_predictor_68_face_landmarks.dat")
face_rec = dlib.face_recognition_model_v1('dlib_face_recognition_resnet_model_v1.dat')
# iterate through all the detected faces
if (len(face_locations) > 0):
for face_location in face_locations:
# get 68 points landmark
face_encoding = predictor(frame, face_location)
face_descriptor = face_rec.compute_face_descriptor(frame, face_encoding, 1)
@smitshilu
smitshilu / Haar_Cascades_Example.py
Last active February 4, 2019 21:33
OpenCV face detection
# Initialize video_capture to get camera feed
video_capture = cv2.VideoCapture(0)
video_capture.set(3, 320)
video_capture.set(4, 240)
# Grab a single frame from WebCam
ret, frame = video_capture.read()
# Initialize haar cascade
detect_faces = cv2.CascadeClassifier('haarcascade_frontalface_alt2.xml')
@smitshilu
smitshilu / How to install dlib.md
Last active June 19, 2024 10:00
How to install dlib v19.9 or newer (w/ python bindings) from github on macOS and Ubuntu

How to install dlib v19.9 or newer (w/ python bindings) from github on macOS and Ubuntu

Pre-reqs:

  • Have Python 3 installed. On macOS, this could be installed from homebrew or even via standard Python 3.6 downloaded installer from https://www.python.org/download. On Linux, just use your package manager.
  • On macOS:
    • Install XCode from the Mac App Store (or install the XCode command line utils).
    • Have homebrew installed
  • On Linux:
@smitshilu
smitshilu / Tensorflow_Build_GPU.md
Last active June 9, 2020 18:27
Tensorflow 1.4 Mac OS High Sierra 10.13 GPU Support

Tensorflow

System information

  • OS - High Sierra 10.13
  • Tensorflow - 1.4
  • Xcode command line tools - 8.2 (Download from here: Xcode - Support - Apple Developer & Switch to different clang version: sudo xcode-select --switch/Library/Developer/CommandLineTools & check version: clang -v)
  • Cmake - 3.7
  • Bazel - 0.7.0