File python-mtcnn.spec of Package python-mtcnn

#
# spec file for package python-mtcnn
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2  1
%define skip_python36 1
Name:           python-mtcnn
Version:        0.1.0
Release:        0
Summary:        Multi-task Cascaded Convolutional Neural Networks for Face Detection
License:        MIT
Group:          Productivity/Scientific/Math
URL:            http://github.com/ipazc/mtcnn
Source:         https://files.pythonhosted.org/packages/source/m/mtcnn/mtcnn-%{version}.tar.gz
BuildRequires:  %{python_module Keras >= 2.0.0}
BuildRequires:  %{python_module nose}
BuildRequires:  %{python_module opencv >= 4.1.0}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
Requires:       python-Keras >= 2.0.0
Requires:       python-opencv >= 4.1.0
BuildArch:      noarch
%python_subpackages

%description
Multi-task Cascaded Convolutional Neural Networks for Face Detection, based on TensorFlow.

Implementation of the MTCNN face detector for Keras in Python3.4+. It is
written from scratch, using as a reference the implementation of MTCNN from
David Sandberg (FaceNet's MTCNN) in Facenet.

It is based on the paper Zhang, K. et al. (doi:10.1109/LSP.2016.2603342).

%prep
%setup -q -n mtcnn-%{version}

%build
%python_build

%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%files %{python_files}
%doc AUTHORS README.rst
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by