This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def is_circle(perimetr, area): | |
if perimetr == 0: | |
return False | |
circularity = 4*math.pi*(area/(perimetr**2)) | |
if 0.7 < circularity < 1.2: | |
return True | |
return False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Set your target branch | |
BRANCH="1.14.2" | |
exec > >(tee build-gstreamer.log) | |
exec 2>&1 | |
[ ! -d orc ] && git clone git://anongit.freedesktop.org/git/gstreamer/orc | |
[ ! -d gstreamer ] && git clone git://anongit.freedesktop.org/git/gstreamer/gstreamer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
setup for AI Models package | |
""" | |
from setuptools import setup # , Command | |
from setuptools.command.install import install | |
with open('README.md') as readme_file: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
#-*- coding: utf-8 -*- | |
import logging | |
import timeit | |
import traceback | |
import time | |
import gi | |
gi.require_version('Gst', '1.0') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
required_libs = { | |
"gstreamer": "1.14.2".split("."), | |
"tensorflow": "1.10.0".split("."), | |
"opencv": "3.4.0".split(".") | |
} | |
def check_opencv(): | |
major, minor, _ = 0, 0, 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#!/usr/bin/env bash | |
# | |
SCRIPT_DIR="$(cd "$(dirname "${0}")"; pwd)" | |
RED="\033[1;31m" | |
YELLOW="\033[1;33m" | |
GREEN="\033[0;32m" | |
NO_COLOR="\033[0m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
python3 gst_video_split.py -f "/media/taras/Transcend/Dataai/OBI/test_with_overlay/00000004063000000.mp4" -o /media/taras/Transcend/Dataai/OBI/test_with_overlay/output -t 60 | |
python3 gst_video_split.py -f "/media/taras/Transcend/Dataai/OBI/test/00000004063000000.mp4" -o /media/taras/Transcend/Dataai/OBI/test_with_overlay/output -t 60 | |
""" | |
import os | |
import datetime | |
import traceback |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Converts video from MPEG to MP4 so it can be opened by VLC or other media player | |
# And concats if needed | |
# Run in folder with videos ./mpeg_2_mp4.sh | |
# chmod u+x ./mpeg_2_mp4.sh | |
ALL_VIDEOS_FILE="all.txt" | |
STATUS_FILE="status.txt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# *************** Installation ********************** | |
git clone https://github.com/intel/libva.git | |
./autogen.sh | |
make -j8 | |
sudo make install | |
git clone https://github.com/intel/intel-vaapi-driver.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Loops video | |
Usage: | |
python gst_loop_playback.py -l "filesrc location=video0.mp4 ! decodebin ! videoconvert ! gtksink sync=False" -r 2 | |
""" | |
import os | |
import traceback | |
import argparse |
OlderNewer