Skip to content

Instantly share code, notes, and snippets.

View LittleWat's full-sized avatar
🏠
Working from home

Kohei Watanabe LittleWat

🏠
Working from home
  • Tokyo
View GitHub Profile
@bradp
bradp / setup.sh
Last active July 24, 2024 15:55
New Mac Setup Script
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Please add this public key to Github \n"
echo "https://github.com/account/ssh \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install

Train Py-Faster-RCNN on Another Dataset

This tutorial is a fine-tuned clone of zeyuanxy's one for the py-faster-rcnn code.

We will illustrate how to train Py-Faster-RCNN on another dataset in the following steps, and we will take INRIA Person as the example dataset.

Clone py-faster-rcnn repository

The current tutorial need you to have clone and tested the regular py-faster-rcnn repository from rbgirshick.

$ git clone https://github.com/rbgirshick/py-faster-rcnn
@smeschke
smeschke / head nod detection
Last active April 6, 2024 21:17
Detection of Head Nods using OpenCV in Python
import cv2
import numpy as np
fourcc = cv2.VideoWriter_fourcc(*'XVID')
out = cv2.VideoWriter('/home/sm/Desktop/nodcontrol.avi',fourcc, 20.0, (640,480))
#dinstance function
def distance(x,y):
import math
return math.sqrt((x[0]-y[0])**2+(x[1]-y[1])**2)
@zalo
zalo / 3DHeadOrientation.py
Last active August 16, 2022 06:30
This is an example using Adrian Bulat's face_alignment library and Python to draw the head's basis vectors
import numpy as np
import cv2
import face_alignment
# Initialize the face alignment tracker
fa = face_alignment.FaceAlignment(face_alignment.LandmarksType._3D, flip_input=True, device="cuda")
# Start the webcam capture, exit with 'q'
cap = cv2.VideoCapture(0)
while(not (cv2.waitKey(1) & 0xFF == ord('q'))):
@steinar
steinar / bazel-oh-my-zsh.md
Created August 12, 2019 18:12
Bazel command line auto-complete for oh-my-zsh

To get Bazel command and target auto-completion in zsh with oh-my-zsh, the offical zsh script as plugin:

  1. mkdir -p ~/.oh-my-zsh/plugins/bazel
  2. wget -P ~/.oh-my-zsh/plugins https://raw.githubusercontent.com/bazelbuild/bazel/master/scripts/zsh_completion/_bazel
  3. Add bazel to the plugins list in your ~/.zshrc
plugins=(git autojump colored-man-pages bazel)
  1. Restart zsh: zsh
@espoirMur
espoirMur / install_nvidia_driver.md
Last active April 1, 2024 19:22
How I fix this issue NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running

I am no longer abe to monitor this post , I have decided to move everything to my personal blog for better monitoring.

Please click here to access the full post

@nitheeshkl
nitheeshkl / gige_gst_v4l.md
Last active July 5, 2024 19:47
Gstreamer pipelines to use GigE cams as webcam for Zoom/Teams/Skype

Using GigE cam as webcam for Zoom/Skype/Teams

TL;DR: Creates a Gstreamer pipeline to read camera frames from a GigE camera, using Aravis library, and publish them as V4l2 camera source, using V4l2loopback, that can be read by video conferencing programs like Zoom/Skype/Teams.

gst-launch-1.0 aravissrc blocksize=5013504 h-binning=1 v-binning=1 ! video/x-bayer,format=rggb,framerate=100/5,width=2448,height=2048 ! bayer2rgb ! video/x-raw,format=RGBx ! videoconvert ! video/x-raw,format=YUY2 !  aspectratiocrop aspect-ratio=16/9 ! videoscale ! video/x-raw,width=1280,height=720 ! queue ! v4l2sink device=/dev/video0

The Basics