Skip to content

Instantly share code, notes, and snippets.

ds2018 dscha09

Block or report user

Report or block dscha09

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dscha09
dscha09 / dataset_to_tfrecord.py
Created Jan 9, 2019 — forked from saghiralfasly/dataset_to_tfrecord.py
Python script to create tfrecords from pascal VOC data set format (one class detection) for Object Detection API Tensorflow, where it divides dataset into (90% train.record and 10% test.record)
View dataset_to_tfrecord.py
import os
import io
import glob
import hashlib
import pandas as pd
import xml.etree.ElementTree as ET
import tensorflow as tf
import random
from PIL import Image
View UninstallTensorFlow.txt
pip show tensorflow
pip uninstall tensorflow
# Tensorflow 1.4 works only with Python 3.5
# to install downgrade Python 3.6 to Python 3.5 in Anaconda
conda install python=3.5
# now install tensorflow 1.4
sudo apt-get install python3-pip python3-dev
pip install tensorflow
@dscha09
dscha09 / opencv_webcam_multithread.py
Created Sep 7, 2018 — forked from allskyee/opencv_webcam_multithread.py
opencv python camera frame grab and display on different threads with safe synchronization
View opencv_webcam_multithread.py
#!/usr/bin/env python
from threading import Thread, Lock
import cv2
class WebcamVideoStream :
def __init__(self, src = 0, width = 320, height = 240) :
self.stream = cv2.VideoCapture(src)
self.stream.set(cv2.cv.CV_CAP_PROP_FRAME_WIDTH, width)
self.stream.set(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT, height)
@dscha09
dscha09 / split-video-by-frame.py
Created Aug 20, 2018 — forked from keithweaver/split-video-by-frame.py
Using OpenCV takes a mp4 video and produces a number of images.
View split-video-by-frame.py
'''
Using OpenCV takes a mp4 video and produces a number of images.
Requirements
----
You require OpenCV 3.2 to be installed.
Run
----
Open the main.py and edit the path to the video. Then run:
You can’t perform that action at this time.