Skip to content

Instantly share code, notes, and snippets.

View jackersson's full-sized avatar

Taras jackersson

View GitHub Profile
@jackersson
jackersson / QRCode.msg
Last active July 1, 2020 07:46
Raspberry Ubuntu Installation
Header header
string child_frame_id
uint32 id
geometry_msgs/PoseWithCovariance pose
---> pip install -U git+https://github.com/jackersson/gstreamer-python.git#egg=gstreamer-python -v
Created temporary directory: /tmp/pip-ephem-wheel-cache-3ym3nc1k
Created temporary directory: /tmp/pip-req-tracker-2clwxc17
Created requirements tracker '/tmp/pip-req-tracker-2clwxc17'
Created temporary directory: /tmp/pip-install-kwa_32rt
Collecting gstreamer-python
Cloning https://github.com/jackersson/gstreamer-python.git to /tmp/pip-install-kwa_32rt/gstreamer-python
Running command git clone -q https://github.com/jackersson/gstreamer-python.git /tmp/pip-install-kwa_32rt/gstreamer-python
Added gstreamer-python from git+https://github.com/jackersson/gstreamer-python.git#egg=gstreamer-python to build tracker '/tmp/pip-req-tracker-2clwxc17'
@jackersson
jackersson / Dockerfile
Last active October 10, 2022 07:28
Gstreamer-1.0-Ubuntu-18-Docker-Installation
FROM ubuntu:18.04
USER root
RUN apt-get update && apt-get -y --no-install-recommends install \
sudo \
vim \
wget \
build-essential \
pkg-config
@jackersson
jackersson / Dockerfile
Last active March 25, 2020 10:06
Gstreamer-1.0+Python3.6-Ubuntu-18-Docker-Installation
FROM ubuntu:18.04
USER root
RUN apt-get update && apt-get -y --no-install-recommends install \
sudo \
vim \
wget \
build-essential \
pkg-config \
@jackersson
jackersson / test_mlflow.py
Last active November 27, 2019 16:54
MLFlow
import mlflow # import log_metric, log_param, log_artifact
# https://www.youtube.com/watch?v=wb-ZxtIwSTA
def exp(metric, param):
mlflow.set_tracking_uri("http://mlflow:NJKbe21jk4e1@ec2-18-184-150-238.eu-central-1.compute.amazonaws.com/")
exp_name = "smart-counter"
mlflow.set_experiment(exp_name)
with mlflow.start_run(nested=True):
mlflow.log_param("param1", param)
@jackersson
jackersson / install_gst_req.sh
Created November 12, 2019 17:04
install_gst_req.sh
sudo apt-get install --no-install-recommends -y \
build-essential pkg-config git \
sudo apt-get install --no-install-recommends -y \
gstreamer-1.0 gstreamer1.0-dev \
gstreamer1.0-tools \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \
gstreamer1.0-libav \
@jackersson
jackersson / install_pygst.sh
Last active November 12, 2019 13:44
install_pygst.sh
# After PyGObject (https://lazka.github.io/pgi-docs/) installed
# > pip install PyGObject
# Run current script to override Gstreamer related Scripts
LIBPYTHONPATH=""
PYTHON=/usr/bin/python3
GST_VERSION=1.14.1
import os
import tensorflow as tf
from spyglass.model import model_loader
from sales_zone.tf_models import ObjectDetector
def get_model_flops(model_cls, model_config: dict):
with model_loader(model_cls,
model_config=model_config) as model:
graph = model._session.graph
class ColorPicker:
def __init__(self, channels: int = 4):
self._color_by_id = {}
self._channels = channels
def get(self, idx):
if idx not in self._color_by_id:
self._color_by_id[idx] = self._generate_color(channels=self._channels)
{
"frame_offset": 1,
"track_id": 1,
"group_id": 1,
"identity": {
"name": "First-Last Name",
"confidence": 0.9
},