From 97ea1bedef50c5f386d6c6fceb66cb0804c6e3d4 Mon Sep 17 00:00:00 2001 From: Mpho Mphego Date: Fri, 11 Sep 2020 05:12:46 +0200 Subject: [PATCH] Updated Signed-off-by: Mpho Mphego --- CHANGELOG.md | 22 +++++++++++++++++ Makefile | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 CHANGELOG.md create mode 100644 Makefile diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..3272fdc --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,22 @@ +# Changelog + +## [v1.1](https://github.com/mmphego/face_mask_detection_openvino/tree/v1.1) (2020-09-11) + +[Full Changelog](https://github.com/mmphego/face_mask_detection_openvino/compare/v1.0...v1.1) + +**Merged pull requests:** + +- Complete rework of the code [\#3](https://github.com/mmphego/face_mask_detection_openvino/pull/3) ([mmphego](https://github.com/mmphego)) + +## [v1.0](https://github.com/mmphego/face_mask_detection_openvino/tree/v1.0) (2020-07-21) + +[Full Changelog](https://github.com/mmphego/face_mask_detection_openvino/compare/81a8c4842bfec8e32d4b41d3a8067325be61e1f6...v1.0) + +**Closed issues:** + +- Multiple results [\#2](https://github.com/mmphego/face_mask_detection_openvino/issues/2) +- Unsupported layers found IECore OpenVINO MYRIAD [\#1](https://github.com/mmphego/face_mask_detection_openvino/issues/1) + + + +\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2b8bc99 --- /dev/null +++ b/Makefile @@ -0,0 +1,70 @@ +.ONESHELL: + +SHELL := /bin/bash +DATE_ID := $(shell date +"%y.%m.%d") + +# Get package name from pwd +SOURCE_DIR = source /opt/intel/openvino/bin/setupvars.sh + +.DEFAULT_GOAL := help + +define PRINT_HELP_PYSCRIPT +import re, sys + +for line in sys.stdin: + match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line) + if match: + target, help = match.groups() + print("%-20s %s" % (target, help)) +endef +export PRINT_HELP_PYSCRIPT + + +.PHONY: clean clean-test clean-pyc clean-build help changelog run + +help: + @python3 -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST) + +clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts + +clean-build: ## remove build artifacts + rm -fr build/ + rm -fr dist/ + rm -fr .eggs/ + find . -name '*.egg-info' -exec rm -fr {} + + find . -name '*.egg' -exec rm -f {} + + +clean-pyc: ## remove Python file artifacts + find . -name '*.pyc' -exec rm -f {} + + find . -name '*.pyo' -exec rm -f {} + + find . -name '__pycache__' -exec rm -fr {} + + +clean-test: ## remove test and coverage artifacts + rm -f .coverage + rm -fr htmlcov/ + rm -fr .pytest_cache + +changelog: ## Generate changelog for current repo + docker run -it --rm -v "$(pwd)":/usr/local/src/your-app \ + ferrarimarco/github-changelog-generator -u "$(USER)" -p face_mask_detection_openvino + +formatter: ## Format style with black + isort -rc . + black -l 90 . + +lint: ## check style with flake8 + flake8 --max-line-length 90 . + +example: ## Run main.py with example + xhost +; + docker run --rm -ti --volume "$(CURDIR)":/app --env DISPLAY=$(DISPLAY) \ + --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" --device /dev/snd \ + --device /dev/video0 mmphego/intel-openvino \ + bash -c "source /opt/intel/openvino/bin/setupvars.sh && \ + python main.py --face-model models/face-detection-adas-0001 \ + --mask-model models/face_mask \ + -i resources/mask.mp4 \ + --debug \ + --show-bbox \ + --enable-speech" +