Skip to content

Instantly share code, notes, and snippets.

Avatar

Ivan Talalaev chichivica

View GitHub Profile
View coco_getcat.py
import json
data = json.load(open('instances_train2017.json'))
print data.keys()
#OUTPUT :
# [u'info', u'licenses', u'images', u'annotations', u'categories']
print data['categories']
'''
@jkjung-avt
jkjung-avt / tegra-cam.py
Last active Jun 16, 2021
Capture and display video from either IP CAM, USB webcam, or the Tegra X2/X1 onboard camera.
View tegra-cam.py
# --------------------------------------------------------
# Camera sample code for Tegra X2/X1
#
# This program could capture and display video from
# IP CAM, USB webcam, or the Tegra onboard camera.
# Refer to the following blog post for how to set up
# and run the code:
# https://jkjung-avt.github.io/tx2-camera-with-python/
#
# Written by JK Jung <jkjung13@gmail.com>
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active Jun 24, 2021
How to add a collapsible section in markdown.
View markdown-details-collapsible.md

A collapsible section containing markdown

Click to expand!

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets
@DrSleep
DrSleep / README
Last active Aug 16, 2020
KITTI VISUAL ODOMETRY DATASET
View README
## http://cvlibs.net/datasets/kitti/eval_semantics.php
## https://omnomnom.vision.rwth-aachen.de/data/rwth_kitti_semantics_dataset.zip
### DATASET FOR SEMANTIC SEGMENTATION
View _load_simple_annotation.py
def _load_simple_annotation(self, index):
"""
Load image and bounding boxes info from txt space separeted values where you have
lines in the format of
classification x1 y1 x2 y2
"""
filename = os.path.join(self._data_path, 'Annotations', index + '.txt')
# print 'Loading: {}'.format(filename)
with open(filename) as f:
View FFMPEG MP4 to HLS Conversion.md

Direct copy of pre-encoded file:

$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8
@kyrs
kyrs / opencv_tensor.cc
Last active Mar 10, 2020
File Takes an Image Mat file as an input and convert it to tensor.
View opencv_tensor.cc
/*
Following file take opencv mat file as an input and run inception model on it
Created by : Kumar Shubham
Date : 27-03-2016
*/
//Loading Opencv fIles for processing
#include <opencv2/opencv.hpp>
@royshil
royshil / opencv_capture_v4l2.py
Created Mar 4, 2016
A way to set V4L2 camera params for OpenCV, when cv2.VideoCapture doesn't work. This requires the python-v42lcapture module (https://github.com/gebart/python-v4l2capture)
View opencv_capture_v4l2.py
#!/usr/bin/env python
import numpy as np
import cv2
import os
import v4l2capture
import select
if __name__ == '__main__':
#cap = cv2.VideoCapture(0)
@subfuzion
subfuzion / curl.md
Last active Jun 25, 2021
curl POST examples
View curl.md

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@regeda
regeda / underscore.go
Last active Dec 12, 2018
Convert CamelCase to underscore in golang with UTF-8 support.
View underscore.go
package main
import (
"testing"
"unicode"
"unicode/utf8"
"github.com/stretchr/testify/assert"
)