semvec/pypi-packages huggingface dataset:
rateme 0.1.0
RateMe is a neural network that allows you to recognize gestures of thumb up and thumb down
License: MIT

# Rating system using computer vision

## Introduction

RateMe is a neural network that allows you to recognize gestures of thumb up and thumb down.
The algorithm can be embedded in your project and automate the process of evaluation of something or someone.

![](gifs/Algorithm.gif)

For example, using Rate Me you can:

+ Rate music on the YouTube Music service, when you are uncomfortable with clicking buttons

    ![](gifs/YouTube.gif)

+ Count the votes in a beauty contest to determine the winner

    ![](gifs/Street.gif)

+ Rate drinks and meals during their tasting

    ![](gifs/Wine.gif)

## Technical part

### Dependencies

`opencv-contrib-python`, `numpy`

`matplotlib`, `jupyter` for jupyter-notebook

```bash
pip3 install opencv-contrib-python numpy
```

### Usage

Open `Test_RateMe.ipynb` to test RateMe on example images 
(for that you need to start `jupyter-notebook`, it will open window in your browser, where you need to select `Test_RateMe.ipynb`).

For example of realtime detection run `detect_on_webcam.py`.

Minimal working example:

```python
import cv2
from RateMe.utils import RateMe

img = cv2.imread('test_imgs/like.jpg')
label = net.decode(img)
```

### Description

RateMe is based on [tiny-YOLOv3](https://pjreddie.com/darknet/yolo/) architecture. 

It's accuracy of thumb up/down gesture recognition is calculated as mean average precision (mAP@0.25) = 0.851941, or 85.19%; average IoU = 73.89%

The neural network has been trained on ~3K images (taken from different angles photos of people showing their thumbs or not).
Images were labeled using the [labelImg](https://github.com/tzutalin/labelImg) program.

Class labels: 0 -- "Like (thumb up)", 1 -- "Dislike (thumb down)"

### Speed

Full pipeline speed is 6-7 FPS on Intel(R) Core(TM) i5-4300M CPU @ 2.60GHz.

~100ms on frame grabbing

~100ms on neural network inference
flask-api-spec 0.1.10
flask api toolset
License: MIT

# flask-api-spec

[![PyPI version](https://badge.fury.io/py/flask-api-spec.svg)](https://badge.fury.io/py/flask-api-spec)

flask API toolset

```
pip install flask-api-spec
```

## started with a simple idea

Let's

- write validation codes for **requests**
- write validation and serialization codes for **responses**
- write API body
- integrate **authorizations** then protect the APIs
- **swaggerize** all of them automatically
- _with Flask_

## usage

### installation

```python
import flask_api_spec

app = Flask(__name__)
flask_api_spec.init_app(app)
```

### examples

```python
from flask_api_spec import Value


@app.route('/hello', apispec=dict(
    query=dict(  # constraints for request.args
        id=Value(int, error='There is not id or id is not int.')
    )
))
def hello_id():
    return dict(result='The id is %s' % request.args['id'])
```

Focus on what begins with `apispec=`. We've got a robust feature for the API using the extended app.route with the apispec keyword argument.

```python
from flask_api_spec import Value


@app.route('/hello/<string:name>', apispec=dict(
    param=dict(  # constraints for parameters
        name=Value(str, lambda x: len(x) > 3, error='name is no string or the length is not greater than 3')
    )
))
def hello_name(name):
    return dict(result='Hello %s!' % name)
```

A param keyword in `apispec=` indicates in-path parameters. We can state some more detailed rules about them explicitly. In the case above, size of `<string:name>` should exceed 3.

## todo

- [ ] support more mashmallow functionalities
- [ ] support more schema functionalities
- [ ] integrate authorization
- [ ] generate full swagger yaml
- [ ] support flask class view