diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..ccd794e --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,68 @@ +name: Upload motrackers to PyPI + +# Making this workflow only run when a new tag is added to the GitHub repo. +# As done here: +# https://stackoverflow.com/questions/18216991/create-a-tag-in-a-github-repository +on: + push: + tags: + - "v*" + +permissions: + contents: read + +jobs: + build-n-publish: + name: Build and publish to PyPI + runs-on: ubuntu-latest + + steps: + - name: Checkout source + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.x' + + - name: Build source and wheel distributions + run: | + sudo apt-get update + pip install --upgrade pip + python -m pip install --upgrade build twine + python -m build + twine check --strict dist/* + + - name: Publish distribution to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} + + # https://github.com/actions/first-interaction/issues/10#issuecomment-1475121828 + - name: Create GitHub Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + draft: false + prerelease: false + + - name: Get Asset name + run: | + export PKG=$(ls dist/ | grep tar) + set -- $PKG + echo "name=$1" >> $GITHUB_ENV + - name: Upload Release Asset (sdist) to GitHub + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: dist/${{ env.name }} + asset_name: ${{ env.name }} + asset_content_type: application/zip diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9a0861d --- /dev/null +++ b/.gitignore @@ -0,0 +1,137 @@ +.ipynb_checkpoints/ +examples/video_data/ +.idea/ +examples/output.avi +examples/pretrained_models/caffemodel_weights/ +examples/pretrained_models/tensorflow_weights/ +examples/pretrained_models/yolo_weights/ + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 9de089d..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1 +0,0 @@ -Aditya - @adipandas diff --git a/DOWNLOAD_WEIGHTS.md b/DOWNLOAD_WEIGHTS.md new file mode 100644 index 0000000..5c7f8f3 --- /dev/null +++ b/DOWNLOAD_WEIGHTS.md @@ -0,0 +1,28 @@ +## Download pretrained neural-network weights. +[[Webpage](https://adipandas.github.io/multi-object-tracker/)] +[[GitHub](https://github.com/adipandas/multi-object-tracker)] + +##### YOLOv3 + +``` +cd multi-object-tracker +cd ./examples/pretrained_models/yolo_weights +sudo chmod +x ./get_yolo.sh +./get_yolo.sh +``` + +##### TensorFlow - MobileNetSSDv2 +``` +cd multi-object-tracker +cd ./pretrained_models/tensorflow_weights +sudo chmod +x ./get_ssd_model.sh +./get_ssd_model.sh +``` + +##### Caffemodel - MobileNetSSD +``` +cd multi-object-tracker +cd ./pretrained_models/caffemodel_weights +sudo chmod +x ./get_caffemodel.sh +./get_caffemodel.sh +``` diff --git a/README.md b/README.md index 787f4b8..f2ff5ba 100644 --- a/README.md +++ b/README.md @@ -1,74 +1,94 @@ -[output_video_1]: ./assets/sample-output.gif "Sample Output with YOLO" -[output_video_2]: ./assets/sample-output-2.gif "Sample Output with SSD" +[cars-yolo-output]: examples/assets/cars.gif "Sample Output with YOLO" +[cows-tf-ssd-output]: examples/assets/cows.gif "Sample Output with SSD" -# Multi-Object-Tracker -Object detection using deep learning and multi-object tracking +# Multi-object trackers in Python +Easy to use implementation of various multi-object tracking algorithms. -[![DOI](https://zenodo.org/badge/148338463.svg)](https://zenodo.org/badge/latestdoi/148338463) +[![DOI](https://zenodo.org/badge/148338463.svg)](https://zenodo.org/badge/latestdoi/148338463) + -#### YOLO -![Output Sample with YOLO][output_video_1] +`YOLOv3 + CentroidTracker` | `TF-MobileNetSSD + CentroidTracker` +:-------------------------:|:-------------------------: +![Cars with YOLO][cars-yolo-output] | ![Cows with tf-SSD][cows-tf-ssd-output] +Video source: [link](https://flic.kr/p/L6qyxj) | Video source: [link](https://flic.kr/p/26WeEWy) -#### SSD -![Output Sample with SSD][output_video_2] +## Available Multi Object Trackers -## Install OpenCV -Pip install for OpenCV (version 3.4.3 or later) is available [here](https://pypi.org/project/opencv-python/) and can be done with the following command: - -`pip install opencv-contrib-python` +- CentroidTracker +- IOUTracker +- CentroidKF_Tracker +- SORT -## Run with YOLO -1. Open the terminal -2. Go to `yolo_dir` in this repository: `cd ./yolo_dir` -3. Run: `sudo chmod +x ./get_yolo.sh` -4. Run: `./get_yolo.sh` +## Available OpenCV-based object detectors: -The model and the config files will be downloaded in `./yolo_dir`. These will be used `tracking-yolo-model.ipynb`. +- detector.TF_SSDMobileNetV2 +- detector.Caffe_SSDMobileNet +- detector.YOLOv3 -- The video input can be specified in the cell named `Initiate opencv video capture object` in the notebook. -- To make the source as the webcam, use `video_src=0` else provide the path of the video file (example: `video_src="/path/of/videofile.mp4"`). +## Installation -Example video used in above demo: https://flic.kr/p/L6qyxj - -## Run with TensorFlow SSD model +Pip install for OpenCV (version 3.4.3 or later) is available [here](https://pypi.org/project/opencv-python/) and can be done with the following command: +``` +pip install motrackers +``` -1. Open the terminal -2. Go to the tensorflow_model_dir: `cd ./tensorflow_model_dir` -3. Run: `sudo chmod +x ./get_ssd_model.sh` -4. Run: `./get_ssd_model.sh` +Additionally, you can install the package through GitHub instead: +``` +git clone https://github.com/adipandas/multi-object-tracker +cd multi-object-tracker +pip install [-e] . +``` -This will download model and config files in `./tensorflow_model_dir`. These will be used `tracking-tensorflow-ssd_mobilenet_v2_coco_2018_03_29.ipynb`. +**Note - for using neural network models with GPU** +For using the opencv `dnn`-based object detection modules provided in this repository with GPU, you may have to compile a CUDA enabled version of OpenCV from source. +* To build opencv from source, refer the following links: +[[link-1](https://docs.opencv.org/master/df/d65/tutorial_table_of_content_introduction.html)], +[[link-2](https://www.pyimagesearch.com/2020/02/03/how-to-use-opencvs-dnn-module-with-nvidia-gpus-cuda-and-cudnn/)] -**SSD-Mobilenet_v2_coco_2018_03_29** was used for this example. -Other networks can be downloaded and ran: Go through `tracking-tensorflow-ssd_mobilenet_v2_coco_2018_03_29.ipynb` for more details. +## How to use?: Examples -- The video input can be specified in the cell named `Initiate opencv video capture object` in the notebook. -- To make the source as the webcam, use `video_src=0` else provide the path of the video file (example: `video_src="/path/of/videofile.mp4"`). +The interface for each tracker is simple and similar. Please refer the example template below. -Video used in SSD-Mobilenet multi-object detection and tracking: https://flic.kr/p/26WeEWy +``` +from motrackers import CentroidTracker # or IOUTracker, CentroidKF_Tracker, SORT +input_data = ... +detector = ... +tracker = CentroidTracker(...) # or IOUTracker(...), CentroidKF_Tracker(...), SORT(...) +while True: + done, image = + if done: + break + detection_bboxes, detection_confidences, detection_class_ids = detector.detect(image) + # NOTE: + # * `detection_bboxes` are numpy.ndarray of shape (n, 4) with each row containing (bb_left, bb_top, bb_width, bb_height) + # * `detection_confidences` are numpy.ndarray of shape (n,); + # * `detection_class_ids` are numpy.ndarray of shape (n,). + output_tracks = tracker.update(detection_bboxes, detection_confidences, detection_class_ids) + # `output_tracks` is a list with each element containing tuple of + # (, , , , , , , , , ) + for track in output_tracks: + frame, id, bb_left, bb_top, bb_width, bb_height, confidence, x, y, z = track + assert len(track) == 10 + print(track) +``` -## Run with Caffemodel -- You have to use `tracking-caffe-model.ipynb`. -- The model for use is provided in the folder named `caffemodel_dir`. -- The video input can be specified in the cell named `Initiate opencv video capture object` in the notebook. -- To make the source as the webcam, use `video_src=0` else provide the path of the video file (example: `video_src="/path/of/videofile.mp4"`). +Please refer [examples](https://github.com/adipandas/multi-object-tracker/tree/master/examples) folder of this repository for more details. You can clone and run the examples. -## References -This work is based on the following literature: -1. Bochinski, E., Eiselein, V., & Sikora, T. (2017, August). High-speed tracking-by-detection without using image information. In 2017 14th IEEE International Conference on Advanced Video and Signal Based Surveillance (AVSS) (pp. 1-6). IEEE. [[paper-pdf](http://elvera.nue.tu-berlin.de/files/1517Bochinski2017.pdf)] -2. Pyimagesearch [link-1](https://www.pyimagesearch.com/2018/07/23/simple-object-tracking-with-opencv/), [link-2](https://www.pyimagesearch.com/2018/11/12/yolo-object-detection-with-opencv/) -3. [correlationTracker](https://github.com/Wenuka/correlationTracker) -4. [Caffemodel zoo](http://caffe.berkeleyvision.org/model_zoo.html) -5. [Caffemodel zoo GitHub](https://github.com/BVLC/caffe/tree/master/models) -6. [YOLO v3](https://pjreddie.com/media/files/papers/YOLOv3.pdf) +## Pretrained object detection models -Use the caffemodel zoo from the reference [4,5] mentioned above to vary the CNN models and Play around with the codes. +You will have to download the pretrained weights for the neural-network models. +The shell scripts for downloading these are provided [here](https://github.com/adipandas/multi-object-tracker/tree/master/examples/pretrained_models) below respective folders. +Please refer [DOWNLOAD_WEIGHTS.md](https://github.com/adipandas/multi-object-tracker/blob/master/DOWNLOAD_WEIGHTS.md) for more details. -***Suggestion**: If you are looking for speed go for SSD-mobilenet. If you are looking for accurracy and speed go with YOLO. The best way is to train and fine tune your models on your dataset. Although, Faster-RCNN gives more accurate object detections, you will have to compromise on the detection speed as it is slower as compared to YOLO.* +### Notes +* There are some variations in implementations as compared to what appeared in papers of `SORT` and `IoU Tracker`. +* In case you find any bugs in the algorithm, I will be happy to accept your pull request or you can create an issue to point it out. +## References, Credits and Contributions +Please see [REFERENCES.md](https://github.com/adipandas/multi-object-tracker/blob/master/docs/readme/REFERENCES.md) and [CONTRIBUTING.md](https://github.com/adipandas/multi-object-tracker/blob/master/docs/readme/CONTRIBUTING.md). ## Citation @@ -76,24 +96,11 @@ If you use this repository in your work, please consider citing it with: ``` @misc{multiobjtracker_amd2018, author = {Deshpande, Aditya M.}, - title = {adipandas/multi-object-tracker}, - year = {2018}, + title = {Multi-object trackers in Python}, + year = {2020}, publisher = {GitHub}, journal = {GitHub repository}, howpublished = {\url{https://github.com/adipandas/multi-object-tracker}}, } ``` -``` -@software{aditya_m_deshpande_2019_3530936, - author = {Aditya M. Deshpande}, - title = {{adipandas/multi-object-tracker: multi-object- - tracker}}, - month = nov, - year = 2019, - publisher = {Zenodo}, - version = {v4.0.0}, - doi = {10.5281/zenodo.3530936}, - url = {https://doi.org/10.5281/zenodo.3530936} -} -``` diff --git a/_config.yml b/_config.yml deleted file mode 100644 index c419263..0000000 --- a/_config.yml +++ /dev/null @@ -1 +0,0 @@ -theme: jekyll-theme-cayman \ No newline at end of file diff --git a/assets/sample-output-2.gif b/assets/sample-output-2.gif deleted file mode 100644 index 1649821..0000000 Binary files a/assets/sample-output-2.gif and /dev/null differ diff --git a/assets/sample-output.gif b/assets/sample-output.gif deleted file mode 100644 index c282595..0000000 Binary files a/assets/sample-output.gif and /dev/null differ diff --git a/caffemodel_dir/deploy.prototxt b/caffemodel_dir/deploy.prototxt deleted file mode 100644 index 905580e..0000000 --- a/caffemodel_dir/deploy.prototxt +++ /dev/null @@ -1,1789 +0,0 @@ -input: "data" -input_shape { - dim: 1 - dim: 3 - dim: 300 - dim: 300 -} - -layer { - name: "data_bn" - type: "BatchNorm" - bottom: "data" - top: "data_bn" - param { - lr_mult: 0.0 - } - param { - lr_mult: 0.0 - } - param { - lr_mult: 0.0 - } -} -layer { - name: "data_scale" - type: "Scale" - bottom: "data_bn" - top: "data_bn" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - param { - lr_mult: 2.0 - decay_mult: 1.0 - } - scale_param { - bias_term: true - } -} -layer { - name: "conv1_h" - type: "Convolution" - bottom: "data_bn" - top: "conv1_h" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - param { - lr_mult: 2.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 32 - pad: 3 - kernel_size: 7 - stride: 2 - weight_filler { - type: "msra" - variance_norm: FAN_OUT - } - bias_filler { - type: "constant" - value: 0.0 - } - } -} -layer { - name: "conv1_bn_h" - type: "BatchNorm" - bottom: "conv1_h" - top: "conv1_h" - param { - lr_mult: 0.0 - } - param { - lr_mult: 0.0 - } - param { - lr_mult: 0.0 - } -} -layer { - name: "conv1_scale_h" - type: "Scale" - bottom: "conv1_h" - top: "conv1_h" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - param { - lr_mult: 2.0 - decay_mult: 1.0 - } - scale_param { - bias_term: true - } -} -layer { - name: "conv1_relu" - type: "ReLU" - bottom: "conv1_h" - top: "conv1_h" -} -layer { - name: "conv1_pool" - type: "Pooling" - bottom: "conv1_h" - top: "conv1_pool" - pooling_param { - kernel_size: 3 - stride: 2 - } -} -layer { - name: "layer_64_1_conv1_h" - type: "Convolution" - bottom: "conv1_pool" - top: "layer_64_1_conv1_h" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 32 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } - } -} -layer { - name: "layer_64_1_bn2_h" - type: "BatchNorm" - bottom: "layer_64_1_conv1_h" - top: "layer_64_1_conv1_h" - param { - lr_mult: 0.0 - } - param { - lr_mult: 0.0 - } - param { - lr_mult: 0.0 - } -} -layer { - name: "layer_64_1_scale2_h" - type: "Scale" - bottom: "layer_64_1_conv1_h" - top: "layer_64_1_conv1_h" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - param { - lr_mult: 2.0 - decay_mult: 1.0 - } - scale_param { - bias_term: true - } -} -layer { - name: "layer_64_1_relu2" - type: "ReLU" - bottom: "layer_64_1_conv1_h" - top: "layer_64_1_conv1_h" -} -layer { - name: "layer_64_1_conv2_h" - type: "Convolution" - bottom: "layer_64_1_conv1_h" - top: "layer_64_1_conv2_h" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 32 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } - } -} -layer { - name: "layer_64_1_sum" - type: "Eltwise" - bottom: "layer_64_1_conv2_h" - bottom: "conv1_pool" - top: "layer_64_1_sum" -} -layer { - name: "layer_128_1_bn1_h" - type: "BatchNorm" - bottom: "layer_64_1_sum" - top: "layer_128_1_bn1_h" - param { - lr_mult: 0.0 - } - param { - lr_mult: 0.0 - } - param { - lr_mult: 0.0 - } -} -layer { - name: "layer_128_1_scale1_h" - type: "Scale" - bottom: "layer_128_1_bn1_h" - top: "layer_128_1_bn1_h" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - param { - lr_mult: 2.0 - decay_mult: 1.0 - } - scale_param { - bias_term: true - } -} -layer { - name: "layer_128_1_relu1" - type: "ReLU" - bottom: "layer_128_1_bn1_h" - top: "layer_128_1_bn1_h" -} -layer { - name: "layer_128_1_conv1_h" - type: "Convolution" - bottom: "layer_128_1_bn1_h" - top: "layer_128_1_conv1_h" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 128 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 2 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } - } -} -layer { - name: "layer_128_1_bn2" - type: "BatchNorm" - bottom: "layer_128_1_conv1_h" - top: "layer_128_1_conv1_h" - param { - lr_mult: 0.0 - } - param { - lr_mult: 0.0 - } - param { - lr_mult: 0.0 - } -} -layer { - name: "layer_128_1_scale2" - type: "Scale" - bottom: "layer_128_1_conv1_h" - top: "layer_128_1_conv1_h" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - param { - lr_mult: 2.0 - decay_mult: 1.0 - } - scale_param { - bias_term: true - } -} -layer { - name: "layer_128_1_relu2" - type: "ReLU" - bottom: "layer_128_1_conv1_h" - top: "layer_128_1_conv1_h" -} -layer { - name: "layer_128_1_conv2" - type: "Convolution" - bottom: "layer_128_1_conv1_h" - top: "layer_128_1_conv2" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 128 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } - } -} -layer { - name: "layer_128_1_conv_expand_h" - type: "Convolution" - bottom: "layer_128_1_bn1_h" - top: "layer_128_1_conv_expand_h" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 128 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 2 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } - } -} -layer { - name: "layer_128_1_sum" - type: "Eltwise" - bottom: "layer_128_1_conv2" - bottom: "layer_128_1_conv_expand_h" - top: "layer_128_1_sum" -} -layer { - name: "layer_256_1_bn1" - type: "BatchNorm" - bottom: "layer_128_1_sum" - top: "layer_256_1_bn1" - param { - lr_mult: 0.0 - } - param { - lr_mult: 0.0 - } - param { - lr_mult: 0.0 - } -} -layer { - name: "layer_256_1_scale1" - type: "Scale" - bottom: "layer_256_1_bn1" - top: "layer_256_1_bn1" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - param { - lr_mult: 2.0 - decay_mult: 1.0 - } - scale_param { - bias_term: true - } -} -layer { - name: "layer_256_1_relu1" - type: "ReLU" - bottom: "layer_256_1_bn1" - top: "layer_256_1_bn1" -} -layer { - name: "layer_256_1_conv1" - type: "Convolution" - bottom: "layer_256_1_bn1" - top: "layer_256_1_conv1" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 256 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 2 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } - } -} -layer { - name: "layer_256_1_bn2" - type: "BatchNorm" - bottom: "layer_256_1_conv1" - top: "layer_256_1_conv1" - param { - lr_mult: 0.0 - } - param { - lr_mult: 0.0 - } - param { - lr_mult: 0.0 - } -} -layer { - name: "layer_256_1_scale2" - type: "Scale" - bottom: "layer_256_1_conv1" - top: "layer_256_1_conv1" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - param { - lr_mult: 2.0 - decay_mult: 1.0 - } - scale_param { - bias_term: true - } -} -layer { - name: "layer_256_1_relu2" - type: "ReLU" - bottom: "layer_256_1_conv1" - top: "layer_256_1_conv1" -} -layer { - name: "layer_256_1_conv2" - type: "Convolution" - bottom: "layer_256_1_conv1" - top: "layer_256_1_conv2" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 256 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } - } -} -layer { - name: "layer_256_1_conv_expand" - type: "Convolution" - bottom: "layer_256_1_bn1" - top: "layer_256_1_conv_expand" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 2 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } - } -} -layer { - name: "layer_256_1_sum" - type: "Eltwise" - bottom: "layer_256_1_conv2" - bottom: "layer_256_1_conv_expand" - top: "layer_256_1_sum" -} -layer { - name: "layer_512_1_bn1" - type: "BatchNorm" - bottom: "layer_256_1_sum" - top: "layer_512_1_bn1" - param { - lr_mult: 0.0 - } - param { - lr_mult: 0.0 - } - param { - lr_mult: 0.0 - } -} -layer { - name: "layer_512_1_scale1" - type: "Scale" - bottom: "layer_512_1_bn1" - top: "layer_512_1_bn1" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - param { - lr_mult: 2.0 - decay_mult: 1.0 - } - scale_param { - bias_term: true - } -} -layer { - name: "layer_512_1_relu1" - type: "ReLU" - bottom: "layer_512_1_bn1" - top: "layer_512_1_bn1" -} -layer { - name: "layer_512_1_conv1_h" - type: "Convolution" - bottom: "layer_512_1_bn1" - top: "layer_512_1_conv1_h" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 128 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 # 2 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } - } -} -layer { - name: "layer_512_1_bn2_h" - type: "BatchNorm" - bottom: "layer_512_1_conv1_h" - top: "layer_512_1_conv1_h" - param { - lr_mult: 0.0 - } - param { - lr_mult: 0.0 - } - param { - lr_mult: 0.0 - } -} -layer { - name: "layer_512_1_scale2_h" - type: "Scale" - bottom: "layer_512_1_conv1_h" - top: "layer_512_1_conv1_h" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - param { - lr_mult: 2.0 - decay_mult: 1.0 - } - scale_param { - bias_term: true - } -} -layer { - name: "layer_512_1_relu2" - type: "ReLU" - bottom: "layer_512_1_conv1_h" - top: "layer_512_1_conv1_h" -} -layer { - name: "layer_512_1_conv2_h" - type: "Convolution" - bottom: "layer_512_1_conv1_h" - top: "layer_512_1_conv2_h" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 256 - bias_term: false - pad: 2 # 1 - kernel_size: 3 - stride: 1 - dilation: 2 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } - } -} -layer { - name: "layer_512_1_conv_expand_h" - type: "Convolution" - bottom: "layer_512_1_bn1" - top: "layer_512_1_conv_expand_h" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 # 2 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } - } -} -layer { - name: "layer_512_1_sum" - type: "Eltwise" - bottom: "layer_512_1_conv2_h" - bottom: "layer_512_1_conv_expand_h" - top: "layer_512_1_sum" -} -layer { - name: "last_bn_h" - type: "BatchNorm" - bottom: "layer_512_1_sum" - top: "layer_512_1_sum" - param { - lr_mult: 0.0 - } - param { - lr_mult: 0.0 - } - param { - lr_mult: 0.0 - } -} -layer { - name: "last_scale_h" - type: "Scale" - bottom: "layer_512_1_sum" - top: "layer_512_1_sum" - param { - lr_mult: 1.0 - decay_mult: 1.0 - } - param { - lr_mult: 2.0 - decay_mult: 1.0 - } - scale_param { - bias_term: true - } -} -layer { - name: "last_relu" - type: "ReLU" - bottom: "layer_512_1_sum" - top: "fc7" -} - -layer { - name: "conv6_1_h" - type: "Convolution" - bottom: "fc7" - top: "conv6_1_h" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 128 - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "conv6_1_relu" - type: "ReLU" - bottom: "conv6_1_h" - top: "conv6_1_h" -} -layer { - name: "conv6_2_h" - type: "Convolution" - bottom: "conv6_1_h" - top: "conv6_2_h" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 256 - pad: 1 - kernel_size: 3 - stride: 2 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "conv6_2_relu" - type: "ReLU" - bottom: "conv6_2_h" - top: "conv6_2_h" -} -layer { - name: "conv7_1_h" - type: "Convolution" - bottom: "conv6_2_h" - top: "conv7_1_h" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 64 - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "conv7_1_relu" - type: "ReLU" - bottom: "conv7_1_h" - top: "conv7_1_h" -} -layer { - name: "conv7_2_h" - type: "Convolution" - bottom: "conv7_1_h" - top: "conv7_2_h" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 128 - pad: 1 - kernel_size: 3 - stride: 2 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "conv7_2_relu" - type: "ReLU" - bottom: "conv7_2_h" - top: "conv7_2_h" -} -layer { - name: "conv8_1_h" - type: "Convolution" - bottom: "conv7_2_h" - top: "conv8_1_h" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 64 - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "conv8_1_relu" - type: "ReLU" - bottom: "conv8_1_h" - top: "conv8_1_h" -} -layer { - name: "conv8_2_h" - type: "Convolution" - bottom: "conv8_1_h" - top: "conv8_2_h" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 128 - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "conv8_2_relu" - type: "ReLU" - bottom: "conv8_2_h" - top: "conv8_2_h" -} -layer { - name: "conv9_1_h" - type: "Convolution" - bottom: "conv8_2_h" - top: "conv9_1_h" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 64 - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "conv9_1_relu" - type: "ReLU" - bottom: "conv9_1_h" - top: "conv9_1_h" -} -layer { - name: "conv9_2_h" - type: "Convolution" - bottom: "conv9_1_h" - top: "conv9_2_h" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 128 - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "conv9_2_relu" - type: "ReLU" - bottom: "conv9_2_h" - top: "conv9_2_h" -} -layer { - name: "conv4_3_norm" - type: "Normalize" - bottom: "layer_256_1_bn1" - top: "conv4_3_norm" - norm_param { - across_spatial: false - scale_filler { - type: "constant" - value: 20 - } - channel_shared: false - } -} -layer { - name: "conv4_3_norm_mbox_loc" - type: "Convolution" - bottom: "conv4_3_norm" - top: "conv4_3_norm_mbox_loc" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 16 - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "conv4_3_norm_mbox_loc_perm" - type: "Permute" - bottom: "conv4_3_norm_mbox_loc" - top: "conv4_3_norm_mbox_loc_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "conv4_3_norm_mbox_loc_flat" - type: "Flatten" - bottom: "conv4_3_norm_mbox_loc_perm" - top: "conv4_3_norm_mbox_loc_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "conv4_3_norm_mbox_conf" - type: "Convolution" - bottom: "conv4_3_norm" - top: "conv4_3_norm_mbox_conf" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 8 # 84 - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "conv4_3_norm_mbox_conf_perm" - type: "Permute" - bottom: "conv4_3_norm_mbox_conf" - top: "conv4_3_norm_mbox_conf_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "conv4_3_norm_mbox_conf_flat" - type: "Flatten" - bottom: "conv4_3_norm_mbox_conf_perm" - top: "conv4_3_norm_mbox_conf_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "conv4_3_norm_mbox_priorbox" - type: "PriorBox" - bottom: "conv4_3_norm" - bottom: "data" - top: "conv4_3_norm_mbox_priorbox" - prior_box_param { - min_size: 30.0 - max_size: 60.0 - aspect_ratio: 2 - flip: true - clip: false - variance: 0.1 - variance: 0.1 - variance: 0.2 - variance: 0.2 - step: 8 - offset: 0.5 - } -} -layer { - name: "fc7_mbox_loc" - type: "Convolution" - bottom: "fc7" - top: "fc7_mbox_loc" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 24 - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "fc7_mbox_loc_perm" - type: "Permute" - bottom: "fc7_mbox_loc" - top: "fc7_mbox_loc_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "fc7_mbox_loc_flat" - type: "Flatten" - bottom: "fc7_mbox_loc_perm" - top: "fc7_mbox_loc_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "fc7_mbox_conf" - type: "Convolution" - bottom: "fc7" - top: "fc7_mbox_conf" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 12 # 126 - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "fc7_mbox_conf_perm" - type: "Permute" - bottom: "fc7_mbox_conf" - top: "fc7_mbox_conf_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "fc7_mbox_conf_flat" - type: "Flatten" - bottom: "fc7_mbox_conf_perm" - top: "fc7_mbox_conf_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "fc7_mbox_priorbox" - type: "PriorBox" - bottom: "fc7" - bottom: "data" - top: "fc7_mbox_priorbox" - prior_box_param { - min_size: 60.0 - max_size: 111.0 - aspect_ratio: 2 - aspect_ratio: 3 - flip: true - clip: false - variance: 0.1 - variance: 0.1 - variance: 0.2 - variance: 0.2 - step: 16 - offset: 0.5 - } -} -layer { - name: "conv6_2_mbox_loc" - type: "Convolution" - bottom: "conv6_2_h" - top: "conv6_2_mbox_loc" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 24 - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "conv6_2_mbox_loc_perm" - type: "Permute" - bottom: "conv6_2_mbox_loc" - top: "conv6_2_mbox_loc_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "conv6_2_mbox_loc_flat" - type: "Flatten" - bottom: "conv6_2_mbox_loc_perm" - top: "conv6_2_mbox_loc_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "conv6_2_mbox_conf" - type: "Convolution" - bottom: "conv6_2_h" - top: "conv6_2_mbox_conf" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 12 # 126 - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "conv6_2_mbox_conf_perm" - type: "Permute" - bottom: "conv6_2_mbox_conf" - top: "conv6_2_mbox_conf_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "conv6_2_mbox_conf_flat" - type: "Flatten" - bottom: "conv6_2_mbox_conf_perm" - top: "conv6_2_mbox_conf_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "conv6_2_mbox_priorbox" - type: "PriorBox" - bottom: "conv6_2_h" - bottom: "data" - top: "conv6_2_mbox_priorbox" - prior_box_param { - min_size: 111.0 - max_size: 162.0 - aspect_ratio: 2 - aspect_ratio: 3 - flip: true - clip: false - variance: 0.1 - variance: 0.1 - variance: 0.2 - variance: 0.2 - step: 32 - offset: 0.5 - } -} -layer { - name: "conv7_2_mbox_loc" - type: "Convolution" - bottom: "conv7_2_h" - top: "conv7_2_mbox_loc" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 24 - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "conv7_2_mbox_loc_perm" - type: "Permute" - bottom: "conv7_2_mbox_loc" - top: "conv7_2_mbox_loc_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "conv7_2_mbox_loc_flat" - type: "Flatten" - bottom: "conv7_2_mbox_loc_perm" - top: "conv7_2_mbox_loc_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "conv7_2_mbox_conf" - type: "Convolution" - bottom: "conv7_2_h" - top: "conv7_2_mbox_conf" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 12 # 126 - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "conv7_2_mbox_conf_perm" - type: "Permute" - bottom: "conv7_2_mbox_conf" - top: "conv7_2_mbox_conf_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "conv7_2_mbox_conf_flat" - type: "Flatten" - bottom: "conv7_2_mbox_conf_perm" - top: "conv7_2_mbox_conf_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "conv7_2_mbox_priorbox" - type: "PriorBox" - bottom: "conv7_2_h" - bottom: "data" - top: "conv7_2_mbox_priorbox" - prior_box_param { - min_size: 162.0 - max_size: 213.0 - aspect_ratio: 2 - aspect_ratio: 3 - flip: true - clip: false - variance: 0.1 - variance: 0.1 - variance: 0.2 - variance: 0.2 - step: 64 - offset: 0.5 - } -} -layer { - name: "conv8_2_mbox_loc" - type: "Convolution" - bottom: "conv8_2_h" - top: "conv8_2_mbox_loc" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 16 - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "conv8_2_mbox_loc_perm" - type: "Permute" - bottom: "conv8_2_mbox_loc" - top: "conv8_2_mbox_loc_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "conv8_2_mbox_loc_flat" - type: "Flatten" - bottom: "conv8_2_mbox_loc_perm" - top: "conv8_2_mbox_loc_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "conv8_2_mbox_conf" - type: "Convolution" - bottom: "conv8_2_h" - top: "conv8_2_mbox_conf" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 8 # 84 - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "conv8_2_mbox_conf_perm" - type: "Permute" - bottom: "conv8_2_mbox_conf" - top: "conv8_2_mbox_conf_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "conv8_2_mbox_conf_flat" - type: "Flatten" - bottom: "conv8_2_mbox_conf_perm" - top: "conv8_2_mbox_conf_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "conv8_2_mbox_priorbox" - type: "PriorBox" - bottom: "conv8_2_h" - bottom: "data" - top: "conv8_2_mbox_priorbox" - prior_box_param { - min_size: 213.0 - max_size: 264.0 - aspect_ratio: 2 - flip: true - clip: false - variance: 0.1 - variance: 0.1 - variance: 0.2 - variance: 0.2 - step: 100 - offset: 0.5 - } -} -layer { - name: "conv9_2_mbox_loc" - type: "Convolution" - bottom: "conv9_2_h" - top: "conv9_2_mbox_loc" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 16 - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "conv9_2_mbox_loc_perm" - type: "Permute" - bottom: "conv9_2_mbox_loc" - top: "conv9_2_mbox_loc_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "conv9_2_mbox_loc_flat" - type: "Flatten" - bottom: "conv9_2_mbox_loc_perm" - top: "conv9_2_mbox_loc_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "conv9_2_mbox_conf" - type: "Convolution" - bottom: "conv9_2_h" - top: "conv9_2_mbox_conf" - param { - lr_mult: 1 - decay_mult: 1 - } - param { - lr_mult: 2 - decay_mult: 0 - } - convolution_param { - num_output: 8 # 84 - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "xavier" - } - bias_filler { - type: "constant" - value: 0 - } - } -} -layer { - name: "conv9_2_mbox_conf_perm" - type: "Permute" - bottom: "conv9_2_mbox_conf" - top: "conv9_2_mbox_conf_perm" - permute_param { - order: 0 - order: 2 - order: 3 - order: 1 - } -} -layer { - name: "conv9_2_mbox_conf_flat" - type: "Flatten" - bottom: "conv9_2_mbox_conf_perm" - top: "conv9_2_mbox_conf_flat" - flatten_param { - axis: 1 - } -} -layer { - name: "conv9_2_mbox_priorbox" - type: "PriorBox" - bottom: "conv9_2_h" - bottom: "data" - top: "conv9_2_mbox_priorbox" - prior_box_param { - min_size: 264.0 - max_size: 315.0 - aspect_ratio: 2 - flip: true - clip: false - variance: 0.1 - variance: 0.1 - variance: 0.2 - variance: 0.2 - step: 300 - offset: 0.5 - } -} -layer { - name: "mbox_loc" - type: "Concat" - bottom: "conv4_3_norm_mbox_loc_flat" - bottom: "fc7_mbox_loc_flat" - bottom: "conv6_2_mbox_loc_flat" - bottom: "conv7_2_mbox_loc_flat" - bottom: "conv8_2_mbox_loc_flat" - bottom: "conv9_2_mbox_loc_flat" - top: "mbox_loc" - concat_param { - axis: 1 - } -} -layer { - name: "mbox_conf" - type: "Concat" - bottom: "conv4_3_norm_mbox_conf_flat" - bottom: "fc7_mbox_conf_flat" - bottom: "conv6_2_mbox_conf_flat" - bottom: "conv7_2_mbox_conf_flat" - bottom: "conv8_2_mbox_conf_flat" - bottom: "conv9_2_mbox_conf_flat" - top: "mbox_conf" - concat_param { - axis: 1 - } -} -layer { - name: "mbox_priorbox" - type: "Concat" - bottom: "conv4_3_norm_mbox_priorbox" - bottom: "fc7_mbox_priorbox" - bottom: "conv6_2_mbox_priorbox" - bottom: "conv7_2_mbox_priorbox" - bottom: "conv8_2_mbox_priorbox" - bottom: "conv9_2_mbox_priorbox" - top: "mbox_priorbox" - concat_param { - axis: 2 - } -} - -layer { - name: "mbox_conf_reshape" - type: "Reshape" - bottom: "mbox_conf" - top: "mbox_conf_reshape" - reshape_param { - shape { - dim: 0 - dim: -1 - dim: 2 - } - } -} -layer { - name: "mbox_conf_softmax" - type: "Softmax" - bottom: "mbox_conf_reshape" - top: "mbox_conf_softmax" - softmax_param { - axis: 2 - } -} -layer { - name: "mbox_conf_flatten" - type: "Flatten" - bottom: "mbox_conf_softmax" - top: "mbox_conf_flatten" - flatten_param { - axis: 1 - } -} - -layer { - name: "detection_out" - type: "DetectionOutput" - bottom: "mbox_loc" - bottom: "mbox_conf_flatten" - bottom: "mbox_priorbox" - top: "detection_out" - include { - phase: TEST - } - detection_output_param { - num_classes: 2 - share_location: true - background_label_id: 0 - nms_param { - nms_threshold: 0.45 - top_k: 400 - } - code_type: CENTER_SIZE - keep_top_k: 200 - confidence_threshold: 0.01 - } -} diff --git a/caffemodel_dir/res10_300x300_ssd_iter_140000.caffemodel b/caffemodel_dir/res10_300x300_ssd_iter_140000.caffemodel deleted file mode 100644 index 809dfd7..0000000 Binary files a/caffemodel_dir/res10_300x300_ssd_iter_140000.caffemodel and /dev/null differ diff --git a/docs/.buildinfo b/docs/.buildinfo new file mode 100644 index 0000000..9dc96d7 --- /dev/null +++ b/docs/.buildinfo @@ -0,0 +1,4 @@ +# Sphinx build info version 1 +# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. +config: cc69624f44c2d9a8c8c17ada5937586c +tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/.doctrees/environment.pickle b/docs/.doctrees/environment.pickle new file mode 100644 index 0000000..fefc416 Binary files /dev/null and b/docs/.doctrees/environment.pickle differ diff --git a/docs/.doctrees/includeme/apidocuments.doctree b/docs/.doctrees/includeme/apidocuments.doctree new file mode 100644 index 0000000..9cd3e6b Binary files /dev/null and b/docs/.doctrees/includeme/apidocuments.doctree differ diff --git a/docs/.doctrees/includeme/readmefile.doctree b/docs/.doctrees/includeme/readmefile.doctree new file mode 100644 index 0000000..3a8ad9b Binary files /dev/null and b/docs/.doctrees/includeme/readmefile.doctree differ diff --git a/docs/.doctrees/index.doctree b/docs/.doctrees/index.doctree new file mode 100644 index 0000000..262f3cc Binary files /dev/null and b/docs/.doctrees/index.doctree differ diff --git a/docs/.nojekyll b/docs/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..d0c3cbf --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..499c0a7 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,11 @@ +# DOCs for Multi-object Trackers in Python + +Install the following to build this documentation: +1. Sphinx - [[link](https://www.sphinx-doc.org/)] +2. sphinx-googleanalytics - [[link](https://github.com/sphinx-contrib/googleanalytics)] + +## How to build +``` +cd multi-object-tracker/docs +sphinx-build -b html source . +``` diff --git a/docs/_images/cars.gif b/docs/_images/cars.gif new file mode 100644 index 0000000..bda4a0f Binary files /dev/null and b/docs/_images/cars.gif differ diff --git a/docs/_images/cows.gif b/docs/_images/cows.gif new file mode 100644 index 0000000..8538916 Binary files /dev/null and b/docs/_images/cows.gif differ diff --git a/docs/_modules/index.html b/docs/_modules/index.html new file mode 100644 index 0000000..19ecec8 --- /dev/null +++ b/docs/_modules/index.html @@ -0,0 +1,120 @@ + + + + + + Overview: module code — Multi-object trackers in Python 1.0.0 documentation + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_modules/motrackers/centroid_kf_tracker.html b/docs/_modules/motrackers/centroid_kf_tracker.html new file mode 100644 index 0000000..34c3b99 --- /dev/null +++ b/docs/_modules/motrackers/centroid_kf_tracker.html @@ -0,0 +1,268 @@ + + + + + + motrackers.centroid_kf_tracker — Multi-object trackers in Python 1.0.0 documentation + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • »
  • +
  • Module code »
  • +
  • motrackers.centroid_kf_tracker
  • +
  • +
  • +
+
+
+
+
+ +

Source code for motrackers.centroid_kf_tracker

+from collections import OrderedDict
+import numpy as np
+from scipy.spatial import distance
+from scipy.optimize import linear_sum_assignment
+from motrackers.tracker import Tracker
+from motrackers.track import KFTrackCentroid
+from motrackers.utils.misc import get_centroid
+
+
+
[docs]def assign_tracks2detection_centroid_distances(bbox_tracks, bbox_detections, distance_threshold=10.): + """ + Assigns detected bounding boxes to tracked bounding boxes using IoU as a distance metric. + + Args: + bbox_tracks (numpy.ndarray): Tracked bounding boxes with shape `(n, 4)` + and each row as `(xmin, ymin, width, height)`. + bbox_detections (numpy.ndarray): detection bounding boxes with shape `(m, 4)` and + each row as `(xmin, ymin, width, height)`. + distance_threshold (float): Minimum distance between the tracked object + and new detection to consider for assignment. + + Returns: + tuple: Tuple containing the following elements: + - matches (numpy.ndarray): Array of shape `(n, 2)` where `n` is number of pairs formed after matching tracks to detections. This is an array of tuples with each element as matched pair of indices`(track_index, detection_index)`. + - unmatched_detections (numpy.ndarray): Array of shape `(m,)` where `m` is number of unmatched detections. + - unmatched_tracks (numpy.ndarray): Array of shape `(k,)` where `k` is the number of unmatched tracks. + + """ + + if (bbox_tracks.size == 0) or (bbox_detections.size == 0): + return np.empty((0, 2), dtype=int), np.arange(len(bbox_detections), dtype=int), np.empty((0,), dtype=int) + + if len(bbox_tracks.shape) == 1: + bbox_tracks = bbox_tracks[None, :] + + if len(bbox_detections.shape) == 1: + bbox_detections = bbox_detections[None, :] + + estimated_track_centroids = get_centroid(bbox_tracks) + detection_centroids = get_centroid(bbox_detections) + centroid_distances = distance.cdist(estimated_track_centroids, detection_centroids) + + assigned_tracks, assigned_detections = linear_sum_assignment(centroid_distances) + + unmatched_detections, unmatched_tracks = [], [] + + for d in range(bbox_detections.shape[0]): + if d not in assigned_detections: + unmatched_detections.append(d) + + for t in range(bbox_tracks.shape[0]): + if t not in assigned_tracks: + unmatched_tracks.append(t) + + # filter out matched with high distance between centroids + matches = [] + for t, d in zip(assigned_tracks, assigned_detections): + if centroid_distances[t, d] > distance_threshold: + unmatched_detections.append(d) + unmatched_tracks.append(t) + else: + matches.append((t, d)) + + if len(matches): + matches = np.array(matches) + else: + matches = np.empty((0, 2), dtype=int) + + return matches, np.array(unmatched_detections), np.array(unmatched_tracks)
+ + +
[docs]class CentroidKF_Tracker(Tracker): + """ + Kalman filter based tracking of multiple detected objects. + + Args: + max_lost (int): Maximum number of consecutive frames object was not detected. + tracker_output_format (str): Output format of the tracker. + process_noise_scale (float or numpy.ndarray): Process noise covariance matrix of shape (3, 3) or + covariance magnitude as scalar value. + measurement_noise_scale (float or numpy.ndarray): Measurement noise covariance matrix of shape (1,) + or covariance magnitude as scalar value. + time_step (int or float): Time step for Kalman Filter. + """ + + def __init__( + self, + max_lost=1, + centroid_distance_threshold=30., + tracker_output_format='mot_challenge', + process_noise_scale=1.0, + measurement_noise_scale=1.0, + time_step=1 + ): + self.time_step = time_step + self.process_noise_scale = process_noise_scale + self.measurement_noise_scale = measurement_noise_scale + self.centroid_distance_threshold = centroid_distance_threshold + self.kalman_trackers = OrderedDict() + super().__init__(max_lost, tracker_output_format) + + def _add_track(self, frame_id, bbox, detection_confidence, class_id, **kwargs): + self.tracks[self.next_track_id] = KFTrackCentroid( + self.next_track_id, frame_id, bbox, detection_confidence, class_id=class_id, + data_output_format=self.tracker_output_format, process_noise_scale=self.process_noise_scale, + measurement_noise_scale=self.measurement_noise_scale, **kwargs + ) + self.next_track_id += 1 + +
[docs] def update(self, bboxes, detection_scores, class_ids): + self.frame_count += 1 + bbox_detections = np.array(bboxes, dtype='int') + + track_ids = list(self.tracks.keys()) + bbox_tracks = [] + for track_id in track_ids: + bbox_tracks.append(self.tracks[track_id].predict()) + bbox_tracks = np.array(bbox_tracks) + + if len(bboxes) == 0: + for i in range(len(bbox_tracks)): + track_id = track_ids[i] + bbox = bbox_tracks[i, :] + confidence = self.tracks[track_id].detection_confidence + cid = self.tracks[track_id].class_id + self._update_track(track_id, self.frame_count, bbox, detection_confidence=confidence, class_id=cid, lost=1) + if self.tracks[track_id].lost > self.max_lost: + self._remove_track(track_id) + else: + matches, unmatched_detections, unmatched_tracks = assign_tracks2detection_centroid_distances( + bbox_tracks, bbox_detections, distance_threshold=self.centroid_distance_threshold + ) + + for i in range(matches.shape[0]): + t, d = matches[i, :] + track_id = track_ids[t] + bbox = bboxes[d, :] + cid = class_ids[d] + confidence = detection_scores[d] + self._update_track(track_id, self.frame_count, bbox, confidence, cid, lost=0) + + for d in unmatched_detections: + bbox = bboxes[d, :] + cid = class_ids[d] + confidence = detection_scores[d] + self._add_track(self.frame_count, bbox, confidence, cid) + + for t in unmatched_tracks: + track_id = track_ids[t] + bbox = bbox_tracks[t, :] + confidence = self.tracks[track_id].detection_confidence + cid = self.tracks[track_id].class_id + self._update_track(track_id, self.frame_count, bbox, confidence, cid, lost=1) + + if self.tracks[track_id].lost > self.max_lost: + self._remove_track(track_id) + + outputs = self._get_tracks(self.tracks) + return outputs
+
+ +
+
+
+ +
+ +
+

© Copyright 2021, Aditya M. Deshpande.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_modules/motrackers/detectors/caffe.html b/docs/_modules/motrackers/detectors/caffe.html new file mode 100644 index 0000000..3615e62 --- /dev/null +++ b/docs/_modules/motrackers/detectors/caffe.html @@ -0,0 +1,151 @@ + + + + + + motrackers.detectors.caffe — Multi-object trackers in Python 1.0.0 documentation + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • »
  • +
  • Module code »
  • +
  • motrackers.detectors.caffe
  • +
  • +
  • +
+
+
+
+
+ +

Source code for motrackers.detectors.caffe

+import cv2 as cv
+from motrackers.detectors.detector import Detector
+from motrackers.utils.misc import load_labelsjson
+
+
+
[docs]class Caffe_SSDMobileNet(Detector): + """ + Caffe SSD MobileNet model for Object Detection. + + Args: + weights_path (str): path to network weights file. + configfile_path (str): path to network configuration file. + labels_path (str): path to data labels json file. + confidence_threshold (float): confidence threshold to select the detected object. + nms_threshold (float): Non-maximum suppression threshold. + draw_bboxes (bool): If True, assign colors for drawing bounding boxes on the image. + use_gpu (bool): If True, try to load the model on GPU. + """ + + def __init__(self, weights_path, configfile_path, labels_path, + confidence_threshold=0.5, nms_threshold=0.2, draw_bboxes=True, use_gpu=False): + + object_names = load_labelsjson(labels_path) + + self.pixel_mean = 127.5 + self.pixel_std = 1/127.5 + self.image_size = (300, 300) + + self.net = cv.dnn.readNetFromCaffe(configfile_path, weights_path) + + if use_gpu: + self.net.setPreferableBackend(cv.dnn.DNN_BACKEND_CUDA) + self.net.setPreferableTarget(cv.dnn.DNN_TARGET_CUDA) + + super().__init__(object_names, confidence_threshold, nms_threshold, draw_bboxes) + +
[docs] def forward(self, image): + blob = cv.dnn.blobFromImage(image, scalefactor=self.pixel_std, size=self.image_size, + mean=(self.pixel_mean, self.pixel_mean, self.pixel_mean), swapRB=True, crop=False) + self.net.setInput(blob) + detections = self.net.forward() + return detections
+
+ +
+
+
+ +
+ +
+

© Copyright 2021, Aditya M. Deshpande.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_modules/motrackers/detectors/detector.html b/docs/_modules/motrackers/detectors/detector.html new file mode 100644 index 0000000..db8662d --- /dev/null +++ b/docs/_modules/motrackers/detectors/detector.html @@ -0,0 +1,212 @@ + + + + + + motrackers.detectors.detector — Multi-object trackers in Python 1.0.0 documentation + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • »
  • +
  • Module code »
  • +
  • motrackers.detectors.detector
  • +
  • +
  • +
+
+
+
+
+ +

Source code for motrackers.detectors.detector

+import numpy as np
+import cv2 as cv
+from motrackers.utils.misc import xyxy2xywh
+
+
+
[docs]class Detector: + """ + Abstract class for detector. + + Args: + object_names (dict): Dictionary containing (key, value) as (class_id, class_name) for object detector. + confidence_threshold (float): Confidence threshold for object detection. + nms_threshold (float): Threshold for non-maximal suppression. + draw_bboxes (bool): If true, draw bounding boxes on the image is possible. + """ + + def __init__(self, object_names, confidence_threshold, nms_threshold, draw_bboxes=True): + self.object_names = object_names + self.confidence_threshold = confidence_threshold + self.nms_threshold = nms_threshold + self.height = None + self.width = None + + np.random.seed(12345) + if draw_bboxes: + self.bbox_colors = {key: np.random.randint(0, 255, size=(3,)).tolist() for key in self.object_names.keys()} + +
[docs] def forward(self, image): + """ + Forward pass for the detector with input image. + + Args: + image (numpy.ndarray): Input image. + + Returns: + numpy.ndarray: detections + """ + raise NotImplemented
+ +
[docs] def detect(self, image): + """ + Detect objects in the input image. + + Args: + image (numpy.ndarray): Input image. + + Returns: + tuple: Tuple containing the following elements: + - bboxes (numpy.ndarray): Bounding boxes with shape (n, 4) containing detected objects with each row as `(xmin, ymin, width, height)`. + - confidences (numpy.ndarray): Confidence or detection probabilities if the detected objects with shape (n,). + - class_ids (numpy.ndarray): Class_ids or label_ids of detected objects with shape (n, 4) + + """ + if self.width is None or self.height is None: + (self.height, self.width) = image.shape[:2] + + detections = self.forward(image).squeeze(axis=0).squeeze(axis=0) + + bboxes, confidences, class_ids = [], [], [] + + for i in range(detections.shape[0]): + detection = detections[i, :] + class_id = detection[1] + confidence = detection[2] + + if confidence > self.confidence_threshold: + bbox = detection[3:7] * np.array([self.width, self.height, self.width, self.height]) + bboxes.append(bbox.astype("int")) + confidences.append(float(confidence)) + class_ids.append(int(class_id)) + + if len(bboxes): + bboxes = xyxy2xywh(np.array(bboxes)).tolist() + class_ids = np.array(class_ids).astype('int') + indices = cv.dnn.NMSBoxes(bboxes, confidences, self.confidence_threshold, self.nms_threshold).flatten() + return np.array(bboxes)[indices, :], np.array(confidences)[indices], class_ids[indices] + else: + return np.array([]), np.array([]), np.array([])
+ +
[docs] def draw_bboxes(self, image, bboxes, confidences, class_ids): + """ + Draw the bounding boxes about detected objects in the image. + + Args: + image (numpy.ndarray): Image or video frame. + bboxes (numpy.ndarray): Bounding boxes pixel coordinates as (xmin, ymin, width, height) + confidences (numpy.ndarray): Detection confidence or detection probability. + class_ids (numpy.ndarray): Array containing class ids (aka label ids) of each detected object. + + Returns: + numpy.ndarray: image with the bounding boxes drawn on it. + """ + + for bb, conf, cid in zip(bboxes, confidences, class_ids): + clr = [int(c) for c in self.bbox_colors[cid]] + cv.rectangle(image, (bb[0], bb[1]), (bb[0] + bb[2], bb[1] + bb[3]), clr, 2) + label = "{}:{:.4f}".format(self.object_names[cid], conf) + (label_width, label_height), baseLine = cv.getTextSize(label, cv.FONT_HERSHEY_SIMPLEX, 0.5, 2) + y_label = max(bb[1], label_height) + cv.rectangle(image, (bb[0], y_label - label_height), (bb[0] + label_width, y_label + baseLine), + (255, 255, 255), cv.FILLED) + cv.putText(image, label, (bb[0], y_label), cv.FONT_HERSHEY_SIMPLEX, 0.5, clr, 2) + return image
+
+ +
+
+
+ +
+ +
+

© Copyright 2021, Aditya M. Deshpande.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_modules/motrackers/detectors/tf.html b/docs/_modules/motrackers/detectors/tf.html new file mode 100644 index 0000000..957ff0d --- /dev/null +++ b/docs/_modules/motrackers/detectors/tf.html @@ -0,0 +1,145 @@ + + + + + + motrackers.detectors.tf — Multi-object trackers in Python 1.0.0 documentation + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • »
  • +
  • Module code »
  • +
  • motrackers.detectors.tf
  • +
  • +
  • +
+
+
+
+
+ +

Source code for motrackers.detectors.tf

+import cv2 as cv
+from motrackers.detectors.detector import Detector
+from motrackers.utils.misc import load_labelsjson
+
+
+
[docs]class TF_SSDMobileNetV2(Detector): + """ + Tensorflow SSD MobileNetv2 model for Object Detection. + + Args: + weights_path (str): path to network weights file. + configfile_path (str): path to network configuration file. + labels_path (str): path to data labels json file. + confidence_threshold (float): confidence threshold to select the detected object. + nms_threshold (float): Non-maximum suppression threshold. + draw_bboxes (bool): If True, assign colors for drawing bounding boxes on the image. + use_gpu (bool): If True, try to load the model on GPU. + """ + + def __init__(self, weights_path, configfile_path, labels_path, confidence_threshold=0.5, nms_threshold=0.4, draw_bboxes=True, use_gpu=False): + self.image_size = (300, 300) + self.net = cv.dnn.readNetFromTensorflow(weights_path, configfile_path) + + if use_gpu: + self.net.setPreferableBackend(cv.dnn.DNN_BACKEND_CUDA) + self.net.setPreferableTarget(cv.dnn.DNN_TARGET_CUDA) + + object_names = load_labelsjson(labels_path) + + super().__init__(object_names, confidence_threshold, nms_threshold, draw_bboxes) + +
[docs] def forward(self, image): + blob = cv.dnn.blobFromImage(image, size=self.image_size, swapRB=True, crop=False) + self.net.setInput(blob) + detections = self.net.forward() + return detections
+
+ +
+
+
+ +
+ +
+

© Copyright 2021, Aditya M. Deshpande.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_modules/motrackers/detectors/yolo.html b/docs/_modules/motrackers/detectors/yolo.html new file mode 100644 index 0000000..477e818 --- /dev/null +++ b/docs/_modules/motrackers/detectors/yolo.html @@ -0,0 +1,179 @@ + + + + + + motrackers.detectors.yolo — Multi-object trackers in Python 1.0.0 documentation + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • »
  • +
  • Module code »
  • +
  • motrackers.detectors.yolo
  • +
  • +
  • +
+
+
+
+
+ +

Source code for motrackers.detectors.yolo

+import numpy as np
+import cv2 as cv
+from motrackers.detectors.detector import Detector
+from motrackers.utils.misc import load_labelsjson
+
+
+
[docs]class YOLOv3(Detector): + """ + YOLOv3 Object Detector Module. + + Args: + weights_path (str): path to network weights file. + configfile_path (str): path to network configuration file. + labels_path (str): path to data labels json file. + confidence_threshold (float): confidence threshold to select the detected object. + nms_threshold (float): Non-maximum suppression threshold. + draw_bboxes (bool): If True, assign colors for drawing bounding boxes on the image. + use_gpu (bool): If True, try to load the model on GPU. + """ + + def __init__(self, weights_path, configfile_path, labels_path, confidence_threshold=0.5, nms_threshold=0.2, draw_bboxes=True, use_gpu=False): + self.net = cv.dnn.readNetFromDarknet(configfile_path, weights_path) + object_names = load_labelsjson(labels_path) + + layer_names = self.net.getLayerNames() + if cv2.__version__ == '4.6.0': + self.layer_names = [layer_names[i - 1] for i in self.net.getUnconnectedOutLayers()] + else: + self.layer_names = [layer_names[i[0] - 1] for i in self.net.getUnconnectedOutLayers()] + + self.scale_factor = 1/255.0 + self.image_size = (416, 416) + + self.net = cv.dnn.readNetFromDarknet(configfile_path, weights_path) + if use_gpu: + self.net.setPreferableBackend(cv.dnn.DNN_BACKEND_CUDA) + self.net.setPreferableTarget(cv.dnn.DNN_TARGET_CUDA) + + super().__init__(object_names, confidence_threshold, nms_threshold, draw_bboxes) + +
[docs] def forward(self, image): + blob = cv.dnn.blobFromImage(image, self.scale_factor, self.image_size, swapRB=True, crop=False) + self.net.setInput(blob) + detections = self.net.forward(self.layer_names) # detect objects using object detection model + return detections
+ +
[docs] def detect(self, image): + if self.width is None or self.height is None: + (self.height, self.width) = image.shape[:2] + + detections = self.forward(image) + + bboxes, confidences, class_ids = [], [], [] + + for output in detections: + for detect in output: + scores = detect[5:] + class_id = np.argmax(scores) + confidence = scores[class_id] + if confidence > self.confidence_threshold: + xmid, ymid, w, h = detect[0:4] * np.array([self.width, self.height, self.width, self.height]) + x, y = int(xmid - 0.5*w), int(ymid - 0.5*h) + bboxes.append([x, y, w, h]) + confidences.append(float(confidence)) + class_ids.append(class_id) + + indices = cv.dnn.NMSBoxes(bboxes, confidences, self.confidence_threshold, self.nms_threshold).flatten() + class_ids = np.array(class_ids).astype('int') + output = np.array(bboxes)[indices, :].astype('int'), np.array(confidences)[indices], class_ids[indices] + return output
+
+ +
+
+
+ +
+ +
+

© Copyright 2021, Aditya M. Deshpande.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_modules/motrackers/iou_tracker.html b/docs/_modules/motrackers/iou_tracker.html new file mode 100644 index 0000000..08e07fe --- /dev/null +++ b/docs/_modules/motrackers/iou_tracker.html @@ -0,0 +1,170 @@ + + + + + + motrackers.iou_tracker — Multi-object trackers in Python 1.0.0 documentation + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for motrackers.iou_tracker

+from motrackers.utils.misc import iou_xywh as iou
+from motrackers.tracker import Tracker
+
+
+
[docs]class IOUTracker(Tracker): + """ + Intersection over Union Tracker. + + References + ---------- + * Implementation of this algorithm is heavily based on https://github.com/bochinski/iou-tracker + + Args: + max_lost (int): Maximum number of consecutive frames object was not detected. + tracker_output_format (str): Output format of the tracker. + min_detection_confidence (float): Threshold for minimum detection confidence. + max_detection_confidence (float): Threshold for max. detection confidence. + iou_threshold (float): Intersection over union minimum value. + """ + + def __init__( + self, + max_lost=2, + iou_threshold=0.5, + min_detection_confidence=0.4, + max_detection_confidence=0.7, + tracker_output_format='mot_challenge' + ): + self.iou_threshold = iou_threshold + self.max_detection_confidence = max_detection_confidence + self.min_detection_confidence = min_detection_confidence + + super(IOUTracker, self).__init__(max_lost=max_lost, tracker_output_format=tracker_output_format) + +
[docs] def update(self, bboxes, detection_scores, class_ids): + detections = Tracker.preprocess_input(bboxes, class_ids, detection_scores) + self.frame_count += 1 + track_ids = list(self.tracks.keys()) + + updated_tracks = [] + for track_id in track_ids: + if len(detections) > 0: + idx, best_match = max(enumerate(detections), key=lambda x: iou(self.tracks[track_id].bbox, x[1][0])) + (bb, cid, scr) = best_match + + if iou(self.tracks[track_id].bbox, bb) > self.iou_threshold: + self._update_track(track_id, self.frame_count, bb, scr, class_id=cid, + iou_score=iou(self.tracks[track_id].bbox, bb)) + updated_tracks.append(track_id) + del detections[idx] + + if len(updated_tracks) == 0 or track_id is not updated_tracks[-1]: + self.tracks[track_id].lost += 1 + if self.tracks[track_id].lost > self.max_lost: + self._remove_track(track_id) + + for bb, cid, scr in detections: + self._add_track(self.frame_count, bb, scr, class_id=cid) + + outputs = self._get_tracks(self.tracks) + return outputs
+
+ +
+
+
+ +
+ +
+

© Copyright 2021, Aditya M. Deshpande.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_modules/motrackers/kalman_tracker.html b/docs/_modules/motrackers/kalman_tracker.html new file mode 100644 index 0000000..80e36b6 --- /dev/null +++ b/docs/_modules/motrackers/kalman_tracker.html @@ -0,0 +1,440 @@ + + + + + + motrackers.kalman_tracker — Multi-object trackers in Python 1.0.0 documentation + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • »
  • +
  • Module code »
  • +
  • motrackers.kalman_tracker
  • +
  • +
  • +
+
+
+
+
+ +

Source code for motrackers.kalman_tracker

+import numpy as np
+
+
+
[docs]class KalmanFilter: + """ + Kalman Filter Implementation. + + Args: + transition_matrix (numpy.ndarray): Transition matrix of shape ``(n, n)``. + measurement_matrix (numpy.ndarray): Measurement matrix of shape ``(m, n)``. + control_matrix (numpy.ndarray): Control matrix of shape ``(m, n)``. + process_noise_covariance (numpy.ndarray): Covariance matrix of shape ``(n, n)``. + measurement_noise_covariance (numpy.ndarray): Covariance matrix of shape ``(m, m)``. + prediction_covariance (numpy.ndarray): Predicted (a priori) estimate covariance of shape ``(n, n)``. + initial_state (numpy.ndarray): Initial state of shape ``(n,)``. + + """ + + def __init__( + self, + transition_matrix, + measurement_matrix, + control_matrix=None, + process_noise_covariance=None, + measurement_noise_covariance=None, + prediction_covariance=None, + initial_state=None + ): + self.state_size = transition_matrix.shape[1] + self.observation_size = measurement_matrix.shape[1] + + self.transition_matrix = transition_matrix + self.measurement_matrix = measurement_matrix + + self.control_matrix = 0 if control_matrix is None else control_matrix + + self.process_covariance = np.eye(self.state_size) \ + if process_noise_covariance is None else process_noise_covariance + + self.measurement_covariance = np.eye(self.observation_size) \ + if measurement_noise_covariance is None else measurement_noise_covariance + + self.prediction_covariance = np.eye(self.state_size) if prediction_covariance is None else prediction_covariance + + self.x = np.zeros((self.state_size, 1)) if initial_state is None else initial_state + +
[docs] def predict(self, u=0): + """ + Prediction step of Kalman Filter. + + Args: + u (float or int or numpy.ndarray): Control input. Default is `0`. + + Returns: + numpy.ndarray : State vector of shape `(n,)`. + + """ + self.x = np.dot(self.transition_matrix, self.x) + np.dot(self.control_matrix, u) + + self.prediction_covariance = np.dot( + np.dot(self.transition_matrix, self.prediction_covariance), self.transition_matrix.T + ) + self.process_covariance + + return self.x
+ +
[docs] def update(self, z): + """ + Measurement update of Kalman Filter. + + Args: + z (numpy.ndarray): Measurement vector of the system with shape ``(m,)``. + """ + y = z - np.dot(self.measurement_matrix, self.x) + + innovation_covariance = np.dot( + self.measurement_matrix, np.dot(self.prediction_covariance, self.measurement_matrix.T) + ) + self.measurement_covariance + + optimal_kalman_gain = np.dot( + np.dot(self.prediction_covariance, self.measurement_matrix.T), + np.linalg.inv(innovation_covariance) + ) + + self.x = self.x + np.dot(optimal_kalman_gain, y) + eye = np.eye(self.state_size) + _t1 = eye - np.dot(optimal_kalman_gain, self.measurement_matrix) + t1 = np.dot(np.dot(_t1, self.prediction_covariance), _t1.T) + t2 = np.dot(np.dot(optimal_kalman_gain, self.measurement_covariance), optimal_kalman_gain.T) + self.prediction_covariance = t1 + t2
+ + +def get_process_covariance_matrix(dt): + """ + Generates a process noise covariance matrix for constant acceleration motion. + + Args: + dt (float): Timestep. + + Returns: + numpy.ndarray: Process covariance matrix of shape `(3, 3)`. + """ + # a = np.array([ + # [0.25 * dt ** 4, 0.5 * dt ** 3, 0.5 * dt ** 2], + # [0.5 * dt ** 3, dt ** 2, dt], + # [0.5 * dt ** 2, dt, 1] + # ]) + + a = np.array([ + [dt ** 6 / 36., dt ** 5 / 24., dt ** 4 / 6.], + [dt ** 5 / 24., 0.25 * dt ** 4, 0.5 * dt ** 3], + [dt ** 4 / 6., 0.5 * dt ** 3, dt ** 2] + ]) + return a + + +def get_transition_matrix(dt): + """ + Generate the transition matrix for constant acceleration motion. + + Args: + dt (float): Timestep. + + Returns: + numpy.ndarray: Transition matrix of shape ``(3, 3)``. + + """ + return np.array([[1., dt, dt * dt * 0.5], [0., 1., dt], [0., 0., 1.]]) + + +
[docs]class KFTrackerConstantAcceleration(KalmanFilter): + """ + Kalman Filter with constant acceleration kinematic model. + + Args: + initial_measurement (numpy.ndarray): Initial state of the tracker. + time_step (float) : Time step. + process_noise_scale (float): Process noise covariance scale. + or covariance magnitude as scalar value. + measurement_noise_scale (float): Measurement noise covariance scale. + or covariance magnitude as scalar value. + """ + + def __init__(self, initial_measurement, time_step=1, process_noise_scale=1.0, + measurement_noise_scale=1.0): + self.time_step = time_step + + measurement_size = initial_measurement.shape[0] + transition_matrix = np.zeros((3 * measurement_size, 3 * measurement_size)) + measurement_matrix = np.zeros((measurement_size, 3 * measurement_size)) + process_noise_covariance = np.zeros((3 * measurement_size, 3 * measurement_size)) + measurement_noise_covariance = np.eye(measurement_size) + initial_state = np.zeros((3 * measurement_size,)) + + a = get_transition_matrix(self.time_step) + q = get_process_covariance_matrix(self.time_step) + for i in range(measurement_size): + transition_matrix[3 * i:3 * i + 3, 3 * i:3 * i + 3] = a + measurement_matrix[i, 3 * i] = 1. + process_noise_covariance[3 * i:3 * i + 3, 3 * i:3 * i + 3] = process_noise_scale * q + measurement_noise_covariance[i, i] = measurement_noise_scale + initial_state[i * 3] = initial_measurement[i] + + prediction_noise_covariance = np.ones((3*measurement_size, 3*measurement_size)) + + super().__init__(transition_matrix=transition_matrix, measurement_matrix=measurement_matrix, + process_noise_covariance=process_noise_covariance, + measurement_noise_covariance=measurement_noise_covariance, + prediction_covariance=prediction_noise_covariance, initial_state=initial_state)
+ + +
[docs]class KFTracker1D(KFTrackerConstantAcceleration): + def __init__(self, initial_measurement=np.array([0.]), time_step=1, process_noise_scale=1.0, + measurement_noise_scale=1.0): + assert initial_measurement.shape[0] == 1, initial_measurement.shape + + super().__init__( + initial_measurement=initial_measurement, time_step=time_step, process_noise_scale=process_noise_scale, + measurement_noise_scale=measurement_noise_scale + )
+ + +
[docs]class KFTracker2D(KFTrackerConstantAcceleration): + def __init__(self, initial_measurement=np.array([0., 0.]), time_step=1, process_noise_scale=1.0, + measurement_noise_scale=1.0): + assert initial_measurement.shape[0] == 2, initial_measurement.shape + super().__init__( + initial_measurement=initial_measurement, time_step=time_step, process_noise_scale=process_noise_scale, + measurement_noise_scale=measurement_noise_scale + )
+ + +
[docs]class KFTracker4D(KFTrackerConstantAcceleration): + def __init__(self, initial_measurement=np.array([0., 0., 0., 0.]), time_step=1, process_noise_scale=1.0, + measurement_noise_scale=1.0): + assert initial_measurement.shape[0] == 4, initial_measurement.shape + super().__init__( + initial_measurement=initial_measurement, time_step=time_step, process_noise_scale=process_noise_scale, + measurement_noise_scale=measurement_noise_scale + )
+ + +
[docs]class KFTrackerSORT(KalmanFilter): + """ + Kalman filter for ``SORT``. + + Args: + bbox (numpy.ndarray): Bounding box coordinates as ``(xmid, ymid, area, aspect_ratio)``. + time_step (float or int): Time step. + process_noise_scale (float): Scale (a.k.a covariance) of the process noise. + measurement_noise_scale (float): Scale (a.k.a. covariance) of the measurement noise. + """ + def __init__(self, bbox, process_noise_scale=1.0, measurement_noise_scale=1.0, time_step=1): + assert bbox.shape[0] == 4, bbox.shape + + t = time_step + + transition_matrix = np.array([ + [1., 0, 0, 0, t, 0, 0], + [0, 1, 0, 0, 0, t, 0], + [0, 0, 1, 0, 0, 0, t], + [0, 0, 0, 1, 0, 0, 0], + [0, 0, 0, 0, 1, 0, 0], + [0, 0, 0, 0, 0, 1, 0], + [0, 0, 0, 0, 0, 0, 1]]) + + measurement_matrix = np.array([ + [1., 0, 0, 0, 0, 0, 0], + [0, 1, 0, 0, 0, 0, 0], + [0, 0, 1, 0, 0, 0, 0], + [0, 0, 0, 1, 0, 0, 0]]) + + process_noise_covariance = np.array([ + [1, 0, 0, 0, 1, 0, 0], + [0, 1, 0, 0, 0, 1, 0], + [0, 0, 1, 0, 0, 0, 1], + [0, 0, 0, 1, 0, 0, 0], + [1, 0, 0, 0, 1, 0, 0], + [0, 1, 0, 0, 0, 1, 0], + [0, 0, 1, 0, 0, 0, 1]]) * process_noise_scale + + process_noise_covariance[-1, -1] *= 0.01 + process_noise_covariance[4:, 4:] *= 0.01 + + measurement_noise_covariance = np.eye(4) * measurement_noise_scale + measurement_noise_covariance[2:, 2:] *= 0.01 + + prediction_covariance = np.ones_like(transition_matrix) * 10. + prediction_covariance[4:, 4:] *= 100. + + initial_state = np.array([bbox[0], bbox[1], bbox[2], bbox[3], 0., 0., 0.]) + + super().__init__(transition_matrix, measurement_matrix, process_noise_covariance=process_noise_covariance, + measurement_noise_covariance=measurement_noise_covariance, + prediction_covariance=prediction_covariance, initial_state=initial_state)
+ + +def test_KFTracker1D(): + import matplotlib.pyplot as plt + + def create_data(t=1000, prediction_noise=1, measurement_noise=1, non_linear_input=True, velocity_scale=1 / 200.): + x = np.zeros((t,)) + if non_linear_input: + vel = np.array([np.sin(i * np.pi * velocity_scale) for i in range(t)]) + else: + vel = np.array([0.001 * i for i in range(t)]) + vel_noise = vel + np.random.randn(t) * prediction_noise + x_noise = np.zeros((t,)) + x_measure_noise = np.random.randn(t) * measurement_noise + x_noise[0] = 0. + x_measure_noise[0] += x_noise[0] + + for i in range(t): + x[i] = x[i - 1] + vel[i - 1] + x_noise[i] = x[i - 1] + vel_noise[i - 1] + x_measure_noise[i] += x_noise[i] + + return x, vel, x_noise, vel_noise, x_measure_noise + + t = 1000 + x, vel, x_noise, vel_noise, x_measure_noise = create_data(t=t) + + kf = KFTracker1D( + initial_measurement=np.array([x_measure_noise[0]]), process_noise_scale=1, measurement_noise_scale=1) + + x_prediction = [np.array([x_measure_noise[0], 0, 0])] + for i in range(1, t): + x_prediction.append(kf.predict()) + kf.update(x_measure_noise[i]) + + x_prediction = np.array(x_prediction) + + time = np.arange(t) + a = [time, x, '-', time, x_measure_noise, '--', time, x_prediction[:, 0], '-.'] + plt.plot(*a) + plt.legend(['true', 'noise', 'kf']) + plt.xlim([0, t]) + plt.grid(True) + plt.show() + + +def test_KFTracker2D(): + kf = KFTracker2D(time_step=1) + print('measurement matrix:') + print(kf.measurement_matrix) + print() + print('process cov:') + print(kf.process_covariance) + print() + print('transition matrix:') + print(kf.transition_matrix) + print() + print('measurement cov:') + print(kf.measurement_covariance) + print() + print('state:') + print(kf.x) + print() + print('predicted measurement:') + print(np.dot(kf.measurement_matrix, kf.x)) + print() + print('prediction:') + print(kf.predict()) + print() + kf.update(np.array([1.5, 1.5])) + print('prediction2:') + print(kf.predict()) + + +if __name__ == '__main__': + test_KFTracker1D() + test_KFTracker2D() +
+ +
+
+
+ +
+ +
+

© Copyright 2021, Aditya M. Deshpande.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_modules/motrackers/sort_tracker.html b/docs/_modules/motrackers/sort_tracker.html new file mode 100644 index 0000000..96fe385 --- /dev/null +++ b/docs/_modules/motrackers/sort_tracker.html @@ -0,0 +1,278 @@ + + + + + + motrackers.sort_tracker — Multi-object trackers in Python 1.0.0 documentation + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • »
  • +
  • Module code »
  • +
  • motrackers.sort_tracker
  • +
  • +
  • +
+
+
+
+
+ +

Source code for motrackers.sort_tracker

+import numpy as np
+from scipy.optimize import linear_sum_assignment
+from motrackers.utils.misc import iou_xywh as iou
+from motrackers.track import KFTrackSORT, KFTrack4DSORT
+from motrackers.centroid_kf_tracker import CentroidKF_Tracker
+
+
+
[docs]def assign_tracks2detection_iou(bbox_tracks, bbox_detections, iou_threshold=0.3): + """ + Assigns detected bounding boxes to tracked bounding boxes using IoU as a distance metric. + + Args: + bbox_tracks (numpy.ndarray): Bounding boxes of shape `(N, 4)` where `N` is number of objects already being tracked. + bbox_detections (numpy.ndarray): Bounding boxes of shape `(M, 4)` where `M` is number of objects that are newly detected. + iou_threshold (float): IOU threashold. + + Returns: + tuple: Tuple contains the following elements in the given order: + - matches (numpy.ndarray): Array of shape `(n, 2)` where `n` is number of pairs formed after matching tracks to detections. This is an array of tuples with each element as matched pair of indices`(track_index, detection_index)`. + - unmatched_detections (numpy.ndarray): Array of shape `(m,)` where `m` is number of unmatched detections. + - unmatched_tracks (numpy.ndarray): Array of shape `(k,)` where `k` is the number of unmatched tracks. + """ + + if (bbox_tracks.size == 0) or (bbox_detections.size == 0): + return np.empty((0, 2), dtype=int), np.arange(len(bbox_detections), dtype=int), np.empty((0,), dtype=int) + + if len(bbox_tracks.shape) == 1: + bbox_tracks = bbox_tracks[None, :] + + if len(bbox_detections.shape) == 1: + bbox_detections = bbox_detections[None, :] + + iou_matrix = np.zeros((bbox_tracks.shape[0], bbox_detections.shape[0]), dtype=np.float32) + for t in range(bbox_tracks.shape[0]): + for d in range(bbox_detections.shape[0]): + iou_matrix[t, d] = iou(bbox_tracks[t, :], bbox_detections[d, :]) + assigned_tracks, assigned_detections = linear_sum_assignment(-iou_matrix) + unmatched_detections, unmatched_tracks = [], [] + + for d in range(bbox_detections.shape[0]): + if d not in assigned_detections: + unmatched_detections.append(d) + + for t in range(bbox_tracks.shape[0]): + if t not in assigned_tracks: + unmatched_tracks.append(t) + + # filter out matched with low IOU + matches = [] + for t, d in zip(assigned_tracks, assigned_detections): + if iou_matrix[t, d] < iou_threshold: + unmatched_detections.append(d) + unmatched_tracks.append(t) + else: + matches.append((t, d)) + + if len(matches): + matches = np.array(matches) + else: + matches = np.empty((0, 2), dtype=int) + + return matches, np.array(unmatched_detections), np.array(unmatched_tracks)
+ + +
[docs]class SORT(CentroidKF_Tracker): + """ + SORT - Multi object tracker. + + Args: + max_lost (int): Max. number of times a object is lost while tracking. + tracker_output_format (str): Output format of the tracker. + iou_threshold (float): Intersection over union minimum value. + process_noise_scale (float or numpy.ndarray): Process noise covariance matrix of shape (3, 3) + or covariance magnitude as scalar value. + measurement_noise_scale (float or numpy.ndarray): Measurement noise covariance matrix of shape (1,) + or covariance magnitude as scalar value. + time_step (int or float): Time step for Kalman Filter. + """ + + def __init__( + self, max_lost=0, + tracker_output_format='mot_challenge', + iou_threshold=0.3, + process_noise_scale=1.0, + measurement_noise_scale=1.0, + time_step=1 + ): + self.iou_threshold = iou_threshold + + super().__init__( + max_lost=max_lost, tracker_output_format=tracker_output_format, + process_noise_scale=process_noise_scale, + measurement_noise_scale=measurement_noise_scale, time_step=time_step + ) + + def _add_track(self, frame_id, bbox, detection_confidence, class_id, **kwargs): + # self.tracks[self.next_track_id] = KFTrackSORT( + # self.next_track_id, frame_id, bbox, detection_confidence, class_id=class_id, + # data_output_format=self.tracker_output_format, process_noise_scale=self.process_noise_scale, + # measurement_noise_scale=self.measurement_noise_scale, **kwargs + # ) + self.tracks[self.next_track_id] = KFTrack4DSORT( + self.next_track_id, frame_id, bbox, detection_confidence, class_id=class_id, + data_output_format=self.tracker_output_format, process_noise_scale=self.process_noise_scale, + measurement_noise_scale=self.measurement_noise_scale, kf_time_step=1, **kwargs) + self.next_track_id += 1 + +
[docs] def update(self, bboxes, detection_scores, class_ids): + self.frame_count += 1 + + bbox_detections = np.array(bboxes, dtype='int') + + # track_ids_all = list(self.tracks.keys()) + # bbox_tracks = [] + # track_ids = [] + # for track_id in track_ids_all: + # bb = self.tracks[track_id].predict() + # if np.any(np.isnan(bb)): + # self._remove_track(track_id) + # else: + # track_ids.append(track_id) + # bbox_tracks.append(bb) + + track_ids = list(self.tracks.keys()) + bbox_tracks = [] + for track_id in track_ids: + bb = self.tracks[track_id].predict() + bbox_tracks.append(bb) + + bbox_tracks = np.array(bbox_tracks) + + if len(bboxes) == 0: + for i in range(len(bbox_tracks)): + track_id = track_ids[i] + bbox = bbox_tracks[i, :] + confidence = self.tracks[track_id].detection_confidence + cid = self.tracks[track_id].class_id + self._update_track(track_id, self.frame_count, bbox, detection_confidence=confidence, class_id=cid, lost=1) + if self.tracks[track_id].lost > self.max_lost: + self._remove_track(track_id) + else: + matches, unmatched_detections, unmatched_tracks = assign_tracks2detection_iou( + bbox_tracks, bbox_detections, iou_threshold=0.3) + + for i in range(matches.shape[0]): + t, d = matches[i, :] + track_id = track_ids[t] + bbox = bboxes[d, :] + cid = class_ids[d] + confidence = detection_scores[d] + self._update_track(track_id, self.frame_count, bbox, confidence, cid, lost=0) + + for d in unmatched_detections: + bbox = bboxes[d, :] + cid = class_ids[d] + confidence = detection_scores[d] + self._add_track(self.frame_count, bbox, confidence, cid) + + for t in unmatched_tracks: + track_id = track_ids[t] + bbox = bbox_tracks[t, :] + confidence = self.tracks[track_id].detection_confidence + cid = self.tracks[track_id].class_id + self._update_track(track_id, self.frame_count, bbox, detection_confidence=confidence, class_id=cid, lost=1) + if self.tracks[track_id].lost > self.max_lost: + self._remove_track(track_id) + + outputs = self._get_tracks(self.tracks) + return outputs
+
+ +
+
+
+ +
+ +
+

© Copyright 2021, Aditya M. Deshpande.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_modules/motrackers/track.html b/docs/_modules/motrackers/track.html new file mode 100644 index 0000000..11c685d --- /dev/null +++ b/docs/_modules/motrackers/track.html @@ -0,0 +1,396 @@ + + + + + + motrackers.track — Multi-object trackers in Python 1.0.0 documentation + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for motrackers.track

+import numpy as np
+from motrackers.kalman_tracker import KFTracker2D, KFTrackerSORT, KFTracker4D
+
+
+
[docs]class Track: + """ + Track containing attributes to track various objects. + + Args: + frame_id (int): Camera frame id. + track_id (int): Track Id + bbox (numpy.ndarray): Bounding box pixel coordinates as (xmin, ymin, width, height) of the track. + detection_confidence (float): Detection confidence of the object (probability). + class_id (str or int): Class label id. + lost (int): Number of times the object or track was not tracked by tracker in consecutive frames. + iou_score (float): Intersection over union score. + data_output_format (str): Output format for data in tracker. + Options include ``['mot_challenge', 'visdrone_challenge']``. Default is ``mot_challenge``. + kwargs (dict): Additional key word arguments. + + """ + + count = 0 + + metadata = dict( + data_output_formats=['mot_challenge', 'visdrone_challenge'] + ) + + def __init__( + self, + track_id, + frame_id, + bbox, + detection_confidence, + class_id=None, + lost=0, + iou_score=0., + data_output_format='mot_challenge', + **kwargs + ): + assert data_output_format in Track.metadata['data_output_formats'] + Track.count += 1 + self.id = track_id + + self.detection_confidence_max = 0. + self.lost = 0 + self.age = 0 + + self.update(frame_id, bbox, detection_confidence, class_id=class_id, lost=lost, iou_score=iou_score, **kwargs) + + if data_output_format == 'mot_challenge': + self.output = self.get_mot_challenge_format + elif data_output_format == 'visdrone_challenge': + self.output = self.get_vis_drone_format + else: + raise NotImplementedError + +
[docs] def update(self, frame_id, bbox, detection_confidence, class_id=None, lost=0, iou_score=0., **kwargs): + """ + Update the track. + + Args: + frame_id (int): Camera frame id. + bbox (numpy.ndarray): Bounding box pixel coordinates as (xmin, ymin, width, height) of the track. + detection_confidence (float): Detection confidence of the object (probability). + class_id (int or str): Class label id. + lost (int): Number of times the object or track was not tracked by tracker in consecutive frames. + iou_score (float): Intersection over union score. + kwargs (dict): Additional key word arguments. + """ + self.class_id = class_id + self.bbox = np.array(bbox) + self.detection_confidence = detection_confidence + self.frame_id = frame_id + self.iou_score = iou_score + + if lost == 0: + self.lost = 0 + else: + self.lost += lost + + for k, v in kwargs.items(): + setattr(self, k, v) + + self.detection_confidence_max = max(self.detection_confidence_max, detection_confidence) + + self.age += 1
+ + @property + def centroid(self): + """ + Return the centroid of the bounding box. + + Returns: + numpy.ndarray: Centroid (x, y) of bounding box. + + """ + return np.array((self.bbox[0]+0.5*self.bbox[2], self.bbox[1]+0.5*self.bbox[3])) + +
[docs] def get_mot_challenge_format(self): + """ + Get the tracker data in MOT challenge format as a tuple of elements containing + `(frame, id, bb_left, bb_top, bb_width, bb_height, conf, x, y, z)` + + References: + - Website : https://motchallenge.net/ + + Returns: + tuple: Tuple of 10 elements representing `(frame, id, bb_left, bb_top, bb_width, bb_height, conf, x, y, z)`. + + """ + mot_tuple = ( + self.frame_id, self.id, self.bbox[0], self.bbox[1], self.bbox[2], self.bbox[3], self.detection_confidence, + -1, -1, -1 + ) + return mot_tuple
+ +
[docs] def get_vis_drone_format(self): + """ + Track data output in VISDRONE Challenge format with tuple as + `(frame_index, target_id, bbox_left, bbox_top, bbox_width, bbox_height, score, object_category, + truncation, occlusion)`. + + References: + - Website : http://aiskyeye.com/ + - Paper : https://arxiv.org/abs/2001.06303 + - GitHub : https://github.com/VisDrone/VisDrone2018-MOT-toolkit + - GitHub : https://github.com/VisDrone/ + + Returns: + tuple: Tuple containing the elements as `(frame_index, target_id, bbox_left, bbox_top, bbox_width, bbox_height, + score, object_category, truncation, occlusion)`. + """ + mot_tuple = ( + self.frame_id, self.id, self.bbox[0], self.bbox[1], self.bbox[2], self.bbox[3], + self.detection_confidence, self.class_id, -1, -1 + ) + return mot_tuple
+ +
[docs] def predict(self): + """ + Implement to prediction the next estimate of track. + """ + raise NotImplemented
+ + @staticmethod + def print_all_track_output_formats(): + print(Track.metadata['data_output_formats'])
+ + +
[docs]class KFTrackSORT(Track): + """ + Track based on Kalman filter tracker used for SORT MOT-Algorithm. + + Args: + track_id (int): Track Id + frame_id (int): Camera frame id. + bbox (numpy.ndarray): Bounding box pixel coordinates as (xmin, ymin, width, height) of the track. + detection_confidence (float): Detection confidence of the object (probability). + class_id (str or int): Class label id. + lost (int): Number of times the object or track was not tracked by tracker in consecutive frames. + iou_score (float): Intersection over union score. + data_output_format (str): Output format for data in tracker. + Options ``['mot_challenge', 'visdrone_challenge']``. Default is ``mot_challenge``. + process_noise_scale (float): Process noise covariance scale or covariance magnitude as scalar value. + measurement_noise_scale (float): Measurement noise covariance scale or covariance magnitude as scalar value. + kwargs (dict): Additional key word arguments. + """ + def __init__(self, track_id, frame_id, bbox, detection_confidence, class_id=None, lost=0, iou_score=0., + data_output_format='mot_challenge', process_noise_scale=1.0, measurement_noise_scale=1.0, **kwargs): + bbz = np.array([bbox[0]+0.5*bbox[2], bbox[1]+0.5*bbox[3], bbox[2]*bbox[3], bbox[2]/float(bbox[3])]) + self.kf = KFTrackerSORT( + bbz, process_noise_scale=process_noise_scale, measurement_noise_scale=measurement_noise_scale) + super().__init__(track_id, frame_id, bbox, detection_confidence, class_id=class_id, lost=lost, + iou_score=iou_score, data_output_format=data_output_format, **kwargs) + +
[docs] def predict(self): + """ + Predicts the next estimate of the bounding box of the track. + + Returns: + numpy.ndarray: Bounding box pixel coordinates as (xmin, ymin, width, height) of the track. + + """ + if (self.kf.x[6] + self.kf.x[2]) <= 0: + self.kf.x[6] *= 0.0 + + x = self.kf.predict() + + if x[2] * x[3] < 0: + return np.array([np.nan, np.nan, np.nan, np.nan]) + + w = np.sqrt(x[2] * x[3]) + h = x[2] / float(w) + bb = np.array([x[0]-0.5*w, x[1]-0.5*h, w, h]) + return bb
+ +
[docs] def update(self, frame_id, bbox, detection_confidence, class_id=None, lost=0, iou_score=0., **kwargs): + super().update( + frame_id, bbox, detection_confidence, class_id=class_id, lost=lost, iou_score=iou_score, **kwargs) + z = np.array([bbox[0]+0.5*bbox[2], bbox[1]+0.5*bbox[3], bbox[2]*bbox[3], bbox[2]/float(bbox[3])]) + self.kf.update(z)
+ + +
[docs]class KFTrack4DSORT(Track): + """ + Track based on Kalman filter tracker used for SORT MOT-Algorithm. + + Args: + track_id (int): Track Id + frame_id (int): Camera frame id. + bbox (numpy.ndarray): Bounding box pixel coordinates as (xmin, ymin, width, height) of the track. + detection_confidence (float): Detection confidence of the object (probability). + class_id (str or int): Class label id. + lost (int): Number of times the object or track was not tracked by tracker in consecutive frames. + iou_score (float): Intersection over union score. + data_output_format (str): Output format for data in tracker. + Options ``['mot_challenge', 'visdrone_challenge']``. Default is ``mot_challenge``. + process_noise_scale (float): Process noise covariance scale or covariance magnitude as scalar value. + measurement_noise_scale (float): Measurement noise covariance scale or covariance magnitude as scalar value. + kwargs (dict): Additional key word arguments. + + """ + def __init__(self, track_id, frame_id, bbox, detection_confidence, class_id=None, lost=0, iou_score=0., + data_output_format='mot_challenge', process_noise_scale=1.0, measurement_noise_scale=1.0, + kf_time_step=1, **kwargs): + self.kf = KFTracker4D( + bbox.copy(), process_noise_scale=process_noise_scale, measurement_noise_scale=measurement_noise_scale, + time_step=kf_time_step) + super().__init__(track_id, frame_id, bbox, detection_confidence, class_id=class_id, lost=lost, + iou_score=iou_score, data_output_format=data_output_format, **kwargs) + +
[docs] def predict(self): + x = self.kf.predict() + bb = np.array([x[0], x[3], x[6], x[9]]) + return bb
+ +
[docs] def update(self, frame_id, bbox, detection_confidence, class_id=None, lost=0, iou_score=0., **kwargs): + super().update( + frame_id, bbox, detection_confidence, class_id=class_id, lost=lost, iou_score=iou_score, **kwargs) + self.kf.update(bbox.copy())
+ + +
[docs]class KFTrackCentroid(Track): + """ + Track based on Kalman filter used for Centroid Tracking of bounding box in MOT. + + Args: + track_id (int): Track Id + frame_id (int): Camera frame id. + bbox (numpy.ndarray): Bounding box pixel coordinates as (xmin, ymin, width, height) of the track. + detection_confidence (float): Detection confidence of the object (probability). + class_id (str or int): Class label id. + lost (int): Number of times the object or track was not tracked by tracker in consecutive frames. + iou_score (float): Intersection over union score. + data_output_format (str): Output format for data in tracker. + Options ``['mot_challenge', 'visdrone_challenge']``. Default is ``mot_challenge``. + process_noise_scale (float): Process noise covariance scale or covariance magnitude as scalar value. + measurement_noise_scale (float): Measurement noise covariance scale or covariance magnitude as scalar value. + kwargs (dict): Additional key word arguments. + """ + def __init__(self, track_id, frame_id, bbox, detection_confidence, class_id=None, lost=0, iou_score=0., + data_output_format='mot_challenge', process_noise_scale=1.0, measurement_noise_scale=1.0, **kwargs): + c = np.array((bbox[0]+0.5*bbox[2], bbox[1]+0.5*bbox[3])) + self.kf = KFTracker2D(c, process_noise_scale=process_noise_scale, measurement_noise_scale=measurement_noise_scale) + super().__init__(track_id, frame_id, bbox, detection_confidence, class_id=class_id, lost=lost, + iou_score=iou_score, data_output_format=data_output_format, **kwargs) + +
[docs] def predict(self): + """ + Predicts the next estimate of the bounding box of the track. + + Returns: + numpy.ndarray: Bounding box pixel coordinates as (xmin, ymin, width, height) of the track. + + """ + s = self.kf.predict() + xmid, ymid = s[0], s[3] + w, h = self.bbox[2], self.bbox[3] + xmin = xmid - 0.5*w + ymin = ymid - 0.5*h + return np.array([xmin, ymin, w, h]).astype(int)
+ +
[docs] def update(self, frame_id, bbox, detection_confidence, class_id=None, lost=0, iou_score=0., **kwargs): + super().update( + frame_id, bbox, detection_confidence, class_id=class_id, lost=lost, iou_score=iou_score, **kwargs) + self.kf.update(self.centroid)
+
+ +
+
+
+ +
+ +
+

© Copyright 2021, Aditya M. Deshpande.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_modules/motrackers/tracker.html b/docs/_modules/motrackers/tracker.html new file mode 100644 index 0000000..78459d0 --- /dev/null +++ b/docs/_modules/motrackers/tracker.html @@ -0,0 +1,285 @@ + + + + + + motrackers.tracker — Multi-object trackers in Python 1.0.0 documentation + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for motrackers.tracker

+from collections import OrderedDict
+import numpy as np
+from scipy.spatial import distance
+from motrackers.utils.misc import get_centroid
+from motrackers.track import Track
+
+
+
[docs]class Tracker: + """ + Greedy Tracker with tracking based on ``centroid`` location of the bounding box of the object. + This tracker is also referred as ``CentroidTracker`` in this repository. + + Args: + max_lost (int): Maximum number of consecutive frames object was not detected. + tracker_output_format (str): Output format of the tracker. + """ + + def __init__(self, max_lost=5, tracker_output_format='mot_challenge'): + self.next_track_id = 0 + self.tracks = OrderedDict() + self.max_lost = max_lost + self.frame_count = 0 + self.tracker_output_format = tracker_output_format + + def _add_track(self, frame_id, bbox, detection_confidence, class_id, **kwargs): + """ + Add a newly detected object to the queue. + + Args: + frame_id (int): Camera frame id. + bbox (numpy.ndarray): Bounding box pixel coordinates as (xmin, ymin, xmax, ymax) of the track. + detection_confidence (float): Detection confidence of the object (probability). + class_id (str or int): Class label id. + kwargs (dict): Additional key word arguments. + """ + + self.tracks[self.next_track_id] = Track( + self.next_track_id, frame_id, bbox, detection_confidence, class_id=class_id, + data_output_format=self.tracker_output_format, + **kwargs + ) + self.next_track_id += 1 + + def _remove_track(self, track_id): + """ + Remove tracker data after object is lost. + + Args: + track_id (int): track_id of the track lost while tracking. + """ + + del self.tracks[track_id] + + def _update_track(self, track_id, frame_id, bbox, detection_confidence, class_id, lost=0, iou_score=0., **kwargs): + """ + Update track state. + + Args: + track_id (int): ID of the track. + frame_id (int): Frame count. + bbox (numpy.ndarray or list): Bounding box coordinates as `(xmin, ymin, width, height)`. + detection_confidence (float): Detection confidence (a.k.a. detection probability). + class_id (int): ID of the class (aka label) of the object being tracked. + lost (int): Number of frames the object was lost while tracking. + iou_score (float): Intersection over union. + kwargs (dict): Additional keyword arguments. + """ + + self.tracks[track_id].update( + frame_id, bbox, detection_confidence, class_id=class_id, lost=lost, iou_score=iou_score, **kwargs + ) + + @staticmethod + def _get_tracks(tracks): + """ + Output the information of tracks. + + Args: + tracks (OrderedDict): Tracks dictionary with (key, value) as (track_id, corresponding `Track` objects). + + Returns: + list: List of tracks being currently tracked by the tracker. + """ + + outputs = [] + for trackid, track in tracks.items(): + if not track.lost: + outputs.append(track.output()) + return outputs + +
[docs] @staticmethod + def preprocess_input(bboxes, class_ids, detection_scores): + """ + Preprocess the input data. + + Args: + bboxes (list or numpy.ndarray): Array of bounding boxes with each bbox as a tuple containing `(xmin, ymin, width, height)`. + class_ids (list or numpy.ndarray): Array of Class ID or label ID. + detection_scores (list or numpy.ndarray): Array of detection scores (a.k.a. detection probabilities). + + Returns: + detections (list[Tuple]): Data for detections as list of tuples containing `(bbox, class_id, detection_score)`. + """ + + new_bboxes = np.array(bboxes, dtype='float') + new_class_ids = np.array(class_ids, dtype='int') + new_detection_scores = np.array(detection_scores) + + new_detections = list(zip(new_bboxes, new_class_ids, new_detection_scores)) + return new_detections
+ +
[docs] def update(self, bboxes, detection_scores, class_ids): + """ + Update the tracker based on the new bounding boxes. + + Args: + bboxes (numpy.ndarray or list): List of bounding boxes detected in the current frame. Each element of the list represent + coordinates of bounding box as tuple `(top-left-x, top-left-y, width, height)`. + detection_scores(numpy.ndarray or list): List of detection scores (probability) of each detected object. + class_ids (numpy.ndarray or list): List of class_ids (int) corresponding to labels of the detected object. Default is `None`. + + Returns: + list: List of tracks being currently tracked by the tracker. Each track is represented by the tuple with elements `(frame_id, track_id, bb_left, bb_top, bb_width, bb_height, conf, x, y, z)`. + """ + + self.frame_count += 1 + + if len(bboxes) == 0: + lost_ids = list(self.tracks.keys()) + + for track_id in lost_ids: + self.tracks[track_id].lost += 1 + if self.tracks[track_id].lost > self.max_lost: + self._remove_track(track_id) + + outputs = self._get_tracks(self.tracks) + return outputs + + detections = Tracker.preprocess_input(bboxes, class_ids, detection_scores) + + track_ids = list(self.tracks.keys()) + + updated_tracks, updated_detections = [], [] + + if len(track_ids): + track_centroids = np.array([self.tracks[tid].centroid for tid in track_ids]) + detection_centroids = get_centroid(np.asarray(bboxes)) + + centroid_distances = distance.cdist(track_centroids, detection_centroids) + + track_indices = np.amin(centroid_distances, axis=1).argsort() + + for idx in track_indices: + track_id = track_ids[idx] + + remaining_detections = [ + (i, d) for (i, d) in enumerate(centroid_distances[idx, :]) if i not in updated_detections] + + if len(remaining_detections): + detection_idx, detection_distance = min(remaining_detections, key=lambda x: x[1]) + bbox, class_id, confidence = detections[detection_idx] + self._update_track(track_id, self.frame_count, bbox, confidence, class_id=class_id) + updated_detections.append(detection_idx) + updated_tracks.append(track_id) + + if len(updated_tracks) == 0 or track_id is not updated_tracks[-1]: + self.tracks[track_id].lost += 1 + if self.tracks[track_id].lost > self.max_lost: + self._remove_track(track_id) + + for i, (bbox, class_id, confidence) in enumerate(detections): + if i not in updated_detections: + self._add_track(self.frame_count, bbox, confidence, class_id=class_id) + + outputs = self._get_tracks(self.tracks) + return outputs
+
+ +
+
+
+ +
+ +
+

© Copyright 2021, Aditya M. Deshpande.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_modules/motrackers/utils/filechooser_utils.html b/docs/_modules/motrackers/utils/filechooser_utils.html new file mode 100644 index 0000000..6fb4ae1 --- /dev/null +++ b/docs/_modules/motrackers/utils/filechooser_utils.html @@ -0,0 +1,200 @@ + + + + + + motrackers.utils.filechooser_utils — Multi-object trackers in Python 1.0.0 documentation + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • »
  • +
  • Module code »
  • +
  • motrackers.utils.filechooser_utils
  • +
  • +
  • +
+
+
+
+
+ +

Source code for motrackers.utils.filechooser_utils

+from ipyfilechooser import FileChooser
+
+
+
[docs]def create_filechooser(default_path="~/", html_title="Select File", use_dir_icons=True): + fc = FileChooser(default_path) + fc.title = html_title + fc.use_dir_icons = use_dir_icons + return fc
+ + +
[docs]def select_caffemodel_prototxt(default_path="~/", use_dir_icons=True): + html_title = '<b>Select <code>.prototxt</code> file for the caffemodel:</b>' + fc = create_filechooser(default_path=default_path, + html_title=html_title, + use_dir_icons=use_dir_icons) + return fc
+ + +
[docs]def select_caffemodel_weights(default_path="~/", use_dir_icons=True): + html_title = '<b>Select caffemodel weights (file with extention <code>.caffemodel</code>):</b>' + fc = create_filechooser(default_path=default_path, + html_title=html_title, + use_dir_icons=use_dir_icons) + return fc
+ + +
[docs]def select_caffemodel(default_path="~/", use_dir_icons=True): + prototxt = select_caffemodel_prototxt(default_path=default_path, use_dir_icons=use_dir_icons) + weights = select_caffemodel_weights(default_path=default_path, use_dir_icons=use_dir_icons) + return prototxt, weights
+ + +
[docs]def select_videofile(default_path="~/", use_dir_icons=True): + html_title = '<b>Select video file:</b>' + fc = create_filechooser(default_path=default_path, + html_title=html_title, + use_dir_icons=use_dir_icons) + return fc
+ + +
[docs]def select_yolo_weights(default_path="~/", use_dir_icons=True): + html_title = '<b>Select YOLO weights (<code>.weights</code> file):</b>' + fc = create_filechooser(default_path=default_path, + html_title=html_title, + use_dir_icons=use_dir_icons) + return fc
+ + +
[docs]def select_coco_labels(default_path="~/", use_dir_icons=True): + html_title = '<b>Select coco labels file (<code>.name</code> file):</b>' + fc = create_filechooser(default_path=default_path, + html_title=html_title, + use_dir_icons=use_dir_icons) + return fc
+ + +
[docs]def select_yolo_config(default_path="~/", use_dir_icons=True): + html_title = '<b>Choose YOLO config file (<code>.cfg</code> file):</b>' + fc = create_filechooser(default_path=default_path, + html_title=html_title, + use_dir_icons=use_dir_icons) + return fc
+ + +
[docs]def select_yolo_model(default_path="~/", use_dir_icons=True): + yolo_weights = select_yolo_weights(default_path, use_dir_icons) + yolo_config = select_yolo_config(default_path, use_dir_icons) + coco_names = select_coco_labels(default_path, use_dir_icons) + return yolo_weights, yolo_config, coco_names
+ + +
[docs]def select_pbtxt(default_path="~/", use_dir_icons=True): + html_title = '<b>Select <code>.pbtxt</code> file:</b>' + fc = create_filechooser(default_path=default_path, + html_title=html_title, + use_dir_icons=use_dir_icons) + return fc
+ + +
[docs]def select_tfmobilenet_weights(default_path="~/", use_dir_icons=True): + html_title = '<b>Select tf-frozen graph of mobilenet (<code>.pb</code> file):</b>' + fc = create_filechooser(default_path=default_path, + html_title=html_title, + use_dir_icons=use_dir_icons) + return fc
+ + +
[docs]def select_tfmobilenet(default_path="~/", use_dir_icons=True): + prototxt = select_pbtxt(default_path, use_dir_icons) + tfweights = select_tfmobilenet_weights(default_path, use_dir_icons) + return prototxt, tfweights
+
+ +
+
+
+ +
+ +
+

© Copyright 2021, Aditya M. Deshpande.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_modules/motrackers/utils/misc.html b/docs/_modules/motrackers/utils/misc.html new file mode 100644 index 0000000..cffbab8 --- /dev/null +++ b/docs/_modules/motrackers/utils/misc.html @@ -0,0 +1,414 @@ + + + + + + motrackers.utils.misc — Multi-object trackers in Python 1.0.0 documentation + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for motrackers.utils.misc

+import numpy as np
+import cv2 as cv
+
+
+
[docs]def get_centroid(bboxes): + """ + Calculate centroids for multiple bounding boxes. + + Args: + bboxes (numpy.ndarray): Array of shape `(n, 4)` or of shape `(4,)` where + each row contains `(xmin, ymin, width, height)`. + + Returns: + numpy.ndarray: Centroid (x, y) coordinates of shape `(n, 2)` or `(2,)`. + + """ + + one_bbox = False + if len(bboxes.shape) == 1: + one_bbox = True + bboxes = bboxes[None, :] + + xmin = bboxes[:, 0] + ymin = bboxes[:, 1] + w, h = bboxes[:, 2], bboxes[:, 3] + + xc = xmin + 0.5*w + yc = ymin + 0.5*h + + x = np.hstack([xc[:, None], yc[:, None]]) + + if one_bbox: + x = x.flatten() + return x
+ + +
[docs]def iou(bbox1, bbox2): + """ + Calculates the intersection-over-union of two bounding boxes. + Source: https://github.com/bochinski/iou-tracker/blob/master/util.py + + Args: + bbox1 (numpy.array or list[floats]): Bounding box of length 4 containing + ``(x-top-left, y-top-left, x-bottom-right, y-bottom-right)``. + bbox2 (numpy.array or list[floats]): Bounding box of length 4 containing + ``(x-top-left, y-top-left, x-bottom-right, y-bottom-right)``. + + Returns: + float: intersection-over-onion of bbox1, bbox2. + """ + + bbox1 = [float(x) for x in bbox1] + bbox2 = [float(x) for x in bbox2] + + (x0_1, y0_1, x1_1, y1_1), (x0_2, y0_2, x1_2, y1_2) = bbox1, bbox2 + + # get the overlap rectangle + overlap_x0 = max(x0_1, x0_2) + overlap_y0 = max(y0_1, y0_2) + overlap_x1 = min(x1_1, x1_2) + overlap_y1 = min(y1_1, y1_2) + + # check if there is an overlap + if overlap_x1 - overlap_x0 <= 0 or overlap_y1 - overlap_y0 <= 0: + return 0.0 + + # if yes, calculate the ratio of the overlap to each ROI size and the unified size + size_1 = (x1_1 - x0_1) * (y1_1 - y0_1) + size_2 = (x1_2 - x0_2) * (y1_2 - y0_2) + size_intersection = (overlap_x1 - overlap_x0) * (overlap_y1 - overlap_y0) + size_union = size_1 + size_2 - size_intersection + + iou_ = size_intersection / size_union + + return iou_
+ + +
[docs]def iou_xywh(bbox1, bbox2): + """ + Calculates the intersection-over-union of two bounding boxes. + Source: https://github.com/bochinski/iou-tracker/blob/master/util.py + + Args: + bbox1 (numpy.array or list[floats]): bounding box of length 4 containing ``(x-top-left, y-top-left, width, height)``. + bbox2 (numpy.array or list[floats]): bounding box of length 4 containing ``(x-top-left, y-top-left, width, height)``. + + Returns: + float: intersection-over-onion of bbox1, bbox2. + """ + bbox1 = bbox1[0], bbox1[1], bbox1[0]+bbox1[2], bbox1[1]+bbox1[3] + bbox2 = bbox2[0], bbox2[1], bbox2[0]+bbox2[2], bbox2[1]+bbox2[3] + + iou_ = iou(bbox1, bbox2) + + return iou_
+ + +
[docs]def xyxy2xywh(xyxy): + """ + Convert bounding box coordinates from (xmin, ymin, xmax, ymax) format to (xmin, ymin, width, height). + + Args: + xyxy (numpy.ndarray): + + Returns: + numpy.ndarray: Bounding box coordinates (xmin, ymin, width, height). + + """ + + if len(xyxy.shape) == 2: + w, h = xyxy[:, 2] - xyxy[:, 0] + 1, xyxy[:, 3] - xyxy[:, 1] + 1 + xywh = np.concatenate((xyxy[:, 0:2], w[:, None], h[:, None]), axis=1) + return xywh.astype("int") + elif len(xyxy.shape) == 1: + (left, top, right, bottom) = xyxy + width = right - left + 1 + height = bottom - top + 1 + return np.array([left, top, width, height]).astype('int') + else: + raise ValueError("Input shape not compatible.")
+ + +
[docs]def xywh2xyxy(xywh): + """ + Convert bounding box coordinates from (xmin, ymin, width, height) to (xmin, ymin, xmax, ymax) format. + + Args: + xywh (numpy.ndarray): Bounding box coordinates as `(xmin, ymin, width, height)`. + + Returns: + numpy.ndarray : Bounding box coordinates as `(xmin, ymin, xmax, ymax)`. + + """ + + if len(xywh.shape) == 2: + x = xywh[:, 0] + xywh[:, 2] + y = xywh[:, 1] + xywh[:, 3] + xyxy = np.concatenate((xywh[:, 0:2], x[:, None], y[:, None]), axis=1).astype('int') + return xyxy + if len(xywh.shape) == 1: + x, y, w, h = xywh + xr = x + w + yb = y + h + return np.array([x, y, xr, yb]).astype('int')
+ + +
[docs]def midwh2xywh(midwh): + """ + Convert bounding box coordinates from (xmid, ymid, width, height) to (xmin, ymin, width, height) format. + + Args: + midwh (numpy.ndarray): Bounding box coordinates (xmid, ymid, width, height). + + Returns: + numpy.ndarray: Bounding box coordinates (xmin, ymin, width, height). + """ + + if len(midwh.shape) == 2: + xymin = midwh[:, 0:2] - midwh[:, 2:] * 0.5 + wh = midwh[:, 2:] + xywh = np.concatenate([xymin, wh], axis=1).astype('int') + return xywh + if len(midwh.shape) == 1: + xmid, ymid, w, h = midwh + xywh = np.array([xmid-w*0.5, ymid-h*0.5, w, h]).astype('int') + return xywh
+ + +
[docs]def intersection_complement_indices(big_set_indices, small_set_indices): + """ + Get the complement of intersection of two sets of indices. + + Args: + big_set_indices (numpy.ndarray): Indices of big set. + small_set_indices (numpy.ndarray): Indices of small set. + + Returns: + numpy.ndarray: Indices of set which is complementary to intersection of two input sets. + """ + assert big_set_indices.shape[0] >= small_set_indices.shape[1] + n = len(big_set_indices) + mask = np.ones((n,), dtype=bool) + mask[small_set_indices] = False + intersection_complement = big_set_indices[mask] + return intersection_complement
+ + +
[docs]def nms(boxes, scores, overlapThresh, classes=None): + """ + Non-maximum suppression. based on Malisiewicz et al. + + Args: + boxes (numpy.ndarray): Boxes to process (xmin, ymin, xmax, ymax) + scores (numpy.ndarray): Corresponding scores for each box + overlapThresh (float): Overlap threshold for boxes to merge + classes (numpy.ndarray, optional): Class ids for each box. + + Returns: + tuple: a tuple containing: + - boxes (list): nms boxes + - scores (list): nms scores + - classes (list, optional): nms classes if specified + + """ + + if boxes.dtype.kind == "i": + boxes = boxes.astype("float") + + if scores.dtype.kind == "i": + scores = scores.astype("float") + + pick = [] + + x1 = boxes[:, 0] + y1 = boxes[:, 1] + x2 = boxes[:, 2] + y2 = boxes[:, 3] + area = (x2 - x1 + 1) * (y2 - y1 + 1) + + idxs = np.argsort(scores) + + while len(idxs) > 0: + last = len(idxs) - 1 + i = idxs[last] + pick.append(i) + + xx1 = np.maximum(x1[i], x1[idxs[:last]]) + yy1 = np.maximum(y1[i], y1[idxs[:last]]) + xx2 = np.minimum(x2[i], x2[idxs[:last]]) + yy2 = np.minimum(y2[i], y2[idxs[:last]]) + + w = np.maximum(0, xx2 - xx1 + 1) + h = np.maximum(0, yy2 - yy1 + 1) + + overlap = (w * h) / area[idxs[:last]] + + # delete all indexes from the index list that have + idxs = np.delete(idxs, np.concatenate(([last], np.where(overlap > overlapThresh)[0]))) + + if classes is not None: + return boxes[pick], scores[pick], classes[pick] + else: + return boxes[pick], scores[pick]
+ + +
[docs]def draw_tracks(image, tracks): + """ + Draw on input image. + + Args: + image (numpy.ndarray): image + tracks (list): list of tracks to be drawn on the image. + + Returns: + numpy.ndarray: image with the track-ids drawn on it. + """ + + for trk in tracks: + + trk_id = trk[1] + xmin = trk[2] + ymin = trk[3] + width = trk[4] + height = trk[5] + + xcentroid, ycentroid = int(xmin + 0.5*width), int(ymin + 0.5*height) + + text = "ID {}".format(trk_id) + + cv.putText(image, text, (xcentroid - 10, ycentroid - 10), cv.FONT_HERSHEY_SIMPLEX, 0.5, (0, 255, 0), 2) + cv.circle(image, (xcentroid, ycentroid), 4, (0, 255, 0), -1) + + return image
+ + +
[docs]def load_labelsjson(json_file): + import json + with open(json_file) as file: + data = json.load(file) + labels = {int(k): v for k, v in data.items()} + return labels
+ + +
[docs]def dict2jsonfile(dict_data, json_file_path): + import json + with open(json_file_path, 'w') as outfile: + json.dump(dict_data, outfile)
+ + +if __name__ == '__main__': + bb = np.random.random_integers(0, 100, size=(20,)).reshape((5, 4)) + c = get_centroid(bb) + print(bb, c) + + bb2 = np.array([1, 2, 3, 4]) + c2 = get_centroid(bb2) + print(bb2, c2) + + data = { + 0: 'background', 1: 'aeroplane', 2: 'bicycle', 3: 'bird', 4: 'boat', 5: 'bottle', 6: 'bus', + 7: 'car', 8: 'cat', 9: 'chair', 10: 'cow', 11: 'diningtable', 12: 'dog', 13: 'horse', 14: 'motorbike', + 15: 'person', 16: 'pottedplant', 17: 'sheep', 18: 'sofa', 19: 'train', 20: 'tvmonitor' + } + dict2jsonfile(data, '../../examples/pretrained_models/caffemodel_weights/ssd_mobilenet_caffe_names.json') + +
+ +
+
+
+ +
+ +
+

© Copyright 2021, Aditya M. Deshpande.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_sources/includeme/apidocuments.rst.txt b/docs/_sources/includeme/apidocuments.rst.txt new file mode 100644 index 0000000..fec745d --- /dev/null +++ b/docs/_sources/includeme/apidocuments.rst.txt @@ -0,0 +1,135 @@ +.. reference_docs: + +Tracker +======= + +.. autoclass:: motrackers.tracker.Tracker + :members: + +SORT +==== + +.. autofunction:: motrackers.sort_tracker.assign_tracks2detection_iou + +.. autoclass:: motrackers.sort_tracker.SORT + :members: + +IOU Tracker +=========== + +.. autoclass:: motrackers.iou_tracker.IOUTracker + :members: + +Kalman Filter based Centroid Tracker +==================================== + +.. autofunction:: motrackers.centroid_kf_tracker.assign_tracks2detection_centroid_distances + +.. autoclass:: motrackers.centroid_kf_tracker.CentroidKF_Tracker + :members: + +Tracks +====== + +.. autoclass:: motrackers.track.Track + :members: + +.. autoclass:: motrackers.track.KFTrackSORT + :members: + +.. autoclass:: motrackers.track.KFTrack4DSORT + :members: + +.. autoclass:: motrackers.track.KFTrackCentroid + :members: + +Kalman Filters +============== + +.. autoclass:: motrackers.kalman_tracker.KalmanFilter + :members: + +.. autoclass:: motrackers.kalman_tracker.KFTrackerConstantAcceleration + :members: + +.. autoclass:: motrackers.kalman_tracker.KFTracker1D + :members: + +.. autoclass:: motrackers.kalman_tracker.KFTracker2D + :members: + +.. autoclass:: motrackers.kalman_tracker.KFTracker4D + :members: + +.. autoclass:: motrackers.kalman_tracker.KFTrackerSORT + :members: + +Object Detection +================ + +.. autoclass:: motrackers.detectors.detector.Detector + :members: + +.. autoclass:: motrackers.detectors.caffe.Caffe_SSDMobileNet + :members: + +.. autoclass:: motrackers.detectors.tf.TF_SSDMobileNetV2 + :members: + +.. autoclass:: motrackers.detectors.yolo.YOLOv3 + :members: + +Utilities +========= + +.. autofunction:: motrackers.utils.misc.get_centroid + +.. autofunction:: motrackers.utils.misc.iou + +.. autofunction:: motrackers.utils.misc.iou_xywh + +.. autofunction:: motrackers.utils.misc.xyxy2xywh + +.. autofunction:: motrackers.utils.misc.xywh2xyxy + +.. autofunction:: motrackers.utils.misc.midwh2xywh + +.. autofunction:: motrackers.utils.misc.intersection_complement_indices + +.. autofunction:: motrackers.utils.misc.nms + +.. autofunction:: motrackers.utils.misc.draw_tracks + +.. autofunction:: motrackers.utils.misc.load_labelsjson + +.. autofunction:: motrackers.utils.misc.dict2jsonfile + +.. autofunction:: motrackers.utils.filechooser_utils.create_filechooser + +.. autofunction:: motrackers.utils.filechooser_utils.select_caffemodel_prototxt + +.. autofunction:: motrackers.utils.filechooser_utils.select_caffemodel_weights + +.. autofunction:: motrackers.utils.filechooser_utils.select_caffemodel + +.. autofunction:: motrackers.utils.filechooser_utils.select_videofile + +.. autofunction:: motrackers.utils.filechooser_utils.select_yolo_weights + +.. autofunction:: motrackers.utils.filechooser_utils.select_coco_labels + +.. autofunction:: motrackers.utils.filechooser_utils.select_yolo_config + +.. autofunction:: motrackers.utils.filechooser_utils.select_yolo_model + +.. autofunction:: motrackers.utils.filechooser_utils.select_pbtxt + +.. autofunction:: motrackers.utils.filechooser_utils.select_tfmobilenet_weights + +.. autofunction:: motrackers.utils.filechooser_utils.select_tfmobilenet + +.. mdinclude:: ./../../../DOWNLOAD_WEIGHTS.md + +.. mdinclude:: ./../../readme/REFERENCES.md + +.. mdinclude:: ./../../readme/CODE_OF_CONDUCT.md diff --git a/docs/_sources/includeme/readmefile.rst.txt b/docs/_sources/includeme/readmefile.rst.txt new file mode 100644 index 0000000..80623e6 --- /dev/null +++ b/docs/_sources/includeme/readmefile.rst.txt @@ -0,0 +1,19 @@ +.. mdinclude:: ./../../../README.md + +Example: `TF-MobileNetSSD + CentroidTracker` +============================================ + +.. image:: ./../../../examples/assets/cows.gif + :alt: Cows with tf-SSD + :target: https://flic.kr/p/26WeEWy + :class: with-shadow + :width: 600px + +Example: `YOLOv3 + CentroidTracker` +=================================== + +.. image:: ./../../../examples/assets/cars.gif + :alt: Cars with YOLO + :target: https://flic.kr/p/L6qyxj + :class: with-shadow + :width: 600px \ No newline at end of file diff --git a/docs/_sources/index.rst.txt b/docs/_sources/index.rst.txt new file mode 100644 index 0000000..4fecd30 --- /dev/null +++ b/docs/_sources/index.rst.txt @@ -0,0 +1,20 @@ +.. Multi-object trackers in Python documentation master file, created by + sphinx-quickstart on Sat Feb 27 09:59:32 2021. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to Multi-object trackers in Python's documentation! +=========================================================== + +.. toctree:: + :maxdepth: 2 + + includeme/readmefile.rst + includeme/apidocuments.rst + + +Indices and tables +================== + +* :ref:`genindex` + diff --git a/docs/_static/_sphinx_javascript_frameworks_compat.js b/docs/_static/_sphinx_javascript_frameworks_compat.js new file mode 100644 index 0000000..8549469 --- /dev/null +++ b/docs/_static/_sphinx_javascript_frameworks_compat.js @@ -0,0 +1,134 @@ +/* + * _sphinx_javascript_frameworks_compat.js + * ~~~~~~~~~~ + * + * Compatability shim for jQuery and underscores.js. + * + * WILL BE REMOVED IN Sphinx 6.0 + * xref RemovedInSphinx60Warning + * + */ + +/** + * select a different prefix for underscore + */ +$u = _.noConflict(); + + +/** + * small helper function to urldecode strings + * + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL + */ +jQuery.urldecode = function(x) { + if (!x) { + return x + } + return decodeURIComponent(x.replace(/\+/g, ' ')); +}; + +/** + * small helper function to urlencode strings + */ +jQuery.urlencode = encodeURIComponent; + +/** + * This function returns the parsed url parameters of the + * current request. Multiple values per key are supported, + * it will always return arrays of strings for the value parts. + */ +jQuery.getQueryParameters = function(s) { + if (typeof s === 'undefined') + s = document.location.search; + var parts = s.substr(s.indexOf('?') + 1).split('&'); + var result = {}; + for (var i = 0; i < parts.length; i++) { + var tmp = parts[i].split('=', 2); + var key = jQuery.urldecode(tmp[0]); + var value = jQuery.urldecode(tmp[1]); + if (key in result) + result[key].push(value); + else + result[key] = [value]; + } + return result; +}; + +/** + * highlight a given string on a jquery object by wrapping it in + * span elements with the given class name. + */ +jQuery.fn.highlightText = function(text, className) { + function highlight(node, addItems) { + if (node.nodeType === 3) { + var val = node.nodeValue; + var pos = val.toLowerCase().indexOf(text); + if (pos >= 0 && + !jQuery(node.parentNode).hasClass(className) && + !jQuery(node.parentNode).hasClass("nohighlight")) { + var span; + var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.className = className; + } + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + node.parentNode.insertBefore(span, node.parentNode.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling)); + node.nodeValue = val.substr(0, pos); + if (isInSVG) { + var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); + var bbox = node.parentElement.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute('class', className); + addItems.push({ + "parent": node.parentNode, + "target": rect}); + } + } + } + else if (!jQuery(node).is("button, select, textarea")) { + jQuery.each(node.childNodes, function() { + highlight(this, addItems); + }); + } + } + var addItems = []; + var result = this.each(function() { + highlight(this, addItems); + }); + for (var i = 0; i < addItems.length; ++i) { + jQuery(addItems[i].parent).before(addItems[i].target); + } + return result; +}; + +/* + * backward compatibility for jQuery.browser + * This will be supported until firefox bug is fixed. + */ +if (!jQuery.browser) { + jQuery.uaMatch = function(ua) { + ua = ua.toLowerCase(); + + var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || + /(webkit)[ \/]([\w.]+)/.exec(ua) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || + /(msie) ([\w.]+)/.exec(ua) || + ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || + []; + + return { + browser: match[ 1 ] || "", + version: match[ 2 ] || "0" + }; + }; + jQuery.browser = {}; + jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; +} diff --git a/docs/_static/basic.css b/docs/_static/basic.css new file mode 100644 index 0000000..eeb0519 --- /dev/null +++ b/docs/_static/basic.css @@ -0,0 +1,899 @@ +/* + * basic.css + * ~~~~~~~~~ + * + * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +div.section::after { + display: block; + content: ''; + clear: left; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; + word-wrap: break-word; + overflow-wrap : break-word; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox form.search { + overflow: hidden; +} + +div.sphinxsidebar #searchbox input[type="text"] { + float: left; + width: 80%; + padding: 0.25em; + box-sizing: border-box; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + float: left; + width: 20%; + border-left: none; + padding: 0.25em; + box-sizing: border-box; +} + + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li p.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; + margin-left: auto; + margin-right: auto; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable ul { + margin-top: 0; + margin-bottom: 0; + list-style-type: none; +} + +table.indextable > tbody > tr > td > ul { + padding-left: 0em; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- domain module index --------------------------------------------------- */ + +table.modindextable td { + padding: 2px; + border-collapse: collapse; +} + +/* -- general body styles --------------------------------------------------- */ + +div.body { + min-width: 360px; + max-width: 800px; +} + +div.body p, div.body dd, div.body li, div.body blockquote { + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + +a.headerlink { + visibility: hidden; +} +a.brackets:before, +span.brackets > a:before{ + content: "["; +} + +a.brackets:after, +span.brackets > a:after { + content: "]"; +} + + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, figure.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, figure.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, figure.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +img.align-default, figure.align-default, .figure.align-default { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-default { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar, +aside.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px; + background-color: #ffe; + width: 40%; + float: right; + clear: right; + overflow-x: auto; +} + +p.sidebar-title { + font-weight: bold; +} +div.admonition, div.topic, blockquote { + clear: left; +} + +/* -- topics ---------------------------------------------------------------- */ +div.topic { + border: 1px solid #ccc; + padding: 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- content of sidebars/topics/admonitions -------------------------------- */ + +div.sidebar > :last-child, +aside.sidebar > :last-child, +div.topic > :last-child, +div.admonition > :last-child { + margin-bottom: 0; +} + +div.sidebar::after, +aside.sidebar::after, +div.topic::after, +div.admonition::after, +blockquote::after { + display: block; + content: ''; + clear: both; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + margin-top: 10px; + margin-bottom: 10px; + border: 0; + border-collapse: collapse; +} + +table.align-center { + margin-left: auto; + margin-right: auto; +} + +table.align-default { + margin-left: auto; + margin-right: auto; +} + +table caption span.caption-number { + font-style: italic; +} + +table caption span.caption-text { +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +th > :first-child, +td > :first-child { + margin-top: 0px; +} + +th > :last-child, +td > :last-child { + margin-bottom: 0px; +} + +/* -- figures --------------------------------------------------------------- */ + +div.figure, figure { + margin: 0.5em; + padding: 0.5em; +} + +div.figure p.caption, figcaption { + padding: 0.3em; +} + +div.figure p.caption span.caption-number, +figcaption span.caption-number { + font-style: italic; +} + +div.figure p.caption span.caption-text, +figcaption span.caption-text { +} + +/* -- field list styles ----------------------------------------------------- */ + +table.field-list td, table.field-list th { + border: 0 !important; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +/* -- hlist styles ---------------------------------------------------------- */ + +table.hlist { + margin: 1em 0; +} + +table.hlist td { + vertical-align: top; +} + +/* -- object description styles --------------------------------------------- */ + +.sig { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; +} + +.sig-name, code.descname { + background-color: transparent; + font-weight: bold; +} + +.sig-name { + font-size: 1.1em; +} + +code.descname { + font-size: 1.2em; +} + +.sig-prename, code.descclassname { + background-color: transparent; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.sig-param.n { + font-style: italic; +} + +/* C++ specific styling */ + +.sig-inline.c-texpr, +.sig-inline.cpp-texpr { + font-family: unset; +} + +.sig.c .k, .sig.c .kt, +.sig.cpp .k, .sig.cpp .kt { + color: #0033B3; +} + +.sig.c .m, +.sig.cpp .m { + color: #1750EB; +} + +.sig.c .s, .sig.c .sc, +.sig.cpp .s, .sig.cpp .sc { + color: #067D17; +} + + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +:not(li) > ol > li:first-child > :first-child, +:not(li) > ul > li:first-child > :first-child { + margin-top: 0px; +} + +:not(li) > ol > li:last-child > :last-child, +:not(li) > ul > li:last-child > :last-child { + margin-bottom: 0px; +} + +ol.simple ol p, +ol.simple ul p, +ul.simple ol p, +ul.simple ul p { + margin-top: 0; +} + +ol.simple > li:not(:first-child) > p, +ul.simple > li:not(:first-child) > p { + margin-top: 0; +} + +ol.simple p, +ul.simple p { + margin-bottom: 0; +} +dl.footnote > dt, +dl.citation > dt { + float: left; + margin-right: 0.5em; +} + +dl.footnote > dd, +dl.citation > dd { + margin-bottom: 0em; +} + +dl.footnote > dd:after, +dl.citation > dd:after { + content: ""; + clear: both; +} + +dl.field-list { + display: grid; + grid-template-columns: fit-content(30%) auto; +} + +dl.field-list > dt { + font-weight: bold; + word-break: break-word; + padding-left: 0.5em; + padding-right: 5px; +} +dl.field-list > dt:after { + content: ":"; +} + + +dl.field-list > dd { + padding-left: 0.5em; + margin-top: 0em; + margin-left: 0em; + margin-bottom: 0em; +} + +dl { + margin-bottom: 15px; +} + +dd > :first-child { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +dl > dd:last-child, +dl > dd:last-child > :last-child { + margin-bottom: 0; +} + +dt:target, span.highlighted { + background-color: #fbe54e; +} + +rect.highlighted { + fill: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +.classifier:before { + font-style: normal; + margin: 0 0.5em; + content: ":"; + display: inline-block; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +pre, div[class*="highlight-"] { + clear: both; +} + +span.pre { + -moz-hyphens: none; + -ms-hyphens: none; + -webkit-hyphens: none; + hyphens: none; + white-space: nowrap; +} + +div[class*="highlight-"] { + margin: 1em 0; +} + +td.linenos pre { + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + display: block; +} + +table.highlighttable tbody { + display: block; +} + +table.highlighttable tr { + display: flex; +} + +table.highlighttable td { + margin: 0; + padding: 0; +} + +table.highlighttable td.linenos { + padding-right: 0.5em; +} + +table.highlighttable td.code { + flex: 1; + overflow: hidden; +} + +.highlight .hll { + display: block; +} + +div.highlight pre, +table.highlighttable pre { + margin: 0; +} + +div.code-block-caption + div { + margin-top: 0; +} + +div.code-block-caption { + margin-top: 1em; + padding: 2px 5px; + font-size: small; +} + +div.code-block-caption code { + background-color: transparent; +} + +table.highlighttable td.linenos, +span.linenos, +div.highlight span.gp { /* gp: Generic.Prompt */ + user-select: none; + -webkit-user-select: text; /* Safari fallback only */ + -webkit-user-select: none; /* Chrome/Safari */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* IE10+ */ +} + +div.code-block-caption span.caption-number { + padding: 0.1em 0.3em; + font-style: italic; +} + +div.code-block-caption span.caption-text { +} + +div.literal-block-wrapper { + margin: 1em 0; +} + +code.xref, a code { + background-color: transparent; + font-weight: bold; +} + +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +span.eqno a.headerlink { + position: absolute; + z-index: 1; +} + +div.math:hover a.headerlink { + visibility: visible; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/docs/_static/css/badge_only.css b/docs/_static/css/badge_only.css new file mode 100644 index 0000000..e380325 --- /dev/null +++ b/docs/_static/css/badge_only.css @@ -0,0 +1 @@ +.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}} \ No newline at end of file diff --git a/docs/_static/css/fonts/Roboto-Slab-Bold.woff b/docs/_static/css/fonts/Roboto-Slab-Bold.woff new file mode 100644 index 0000000..6cb6000 Binary files /dev/null and b/docs/_static/css/fonts/Roboto-Slab-Bold.woff differ diff --git a/docs/_static/css/fonts/Roboto-Slab-Bold.woff2 b/docs/_static/css/fonts/Roboto-Slab-Bold.woff2 new file mode 100644 index 0000000..7059e23 Binary files /dev/null and b/docs/_static/css/fonts/Roboto-Slab-Bold.woff2 differ diff --git a/docs/_static/css/fonts/Roboto-Slab-Regular.woff b/docs/_static/css/fonts/Roboto-Slab-Regular.woff new file mode 100644 index 0000000..f815f63 Binary files /dev/null and b/docs/_static/css/fonts/Roboto-Slab-Regular.woff differ diff --git a/docs/_static/css/fonts/Roboto-Slab-Regular.woff2 b/docs/_static/css/fonts/Roboto-Slab-Regular.woff2 new file mode 100644 index 0000000..f2c76e5 Binary files /dev/null and b/docs/_static/css/fonts/Roboto-Slab-Regular.woff2 differ diff --git a/docs/_static/css/fonts/fontawesome-webfont.eot b/docs/_static/css/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000..e9f60ca Binary files /dev/null and b/docs/_static/css/fonts/fontawesome-webfont.eot differ diff --git a/docs/_static/css/fonts/fontawesome-webfont.svg b/docs/_static/css/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000..855c845 --- /dev/null +++ b/docs/_static/css/fonts/fontawesome-webfont.svg @@ -0,0 +1,2671 @@ + + + + +Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 + By ,,, +Copyright Dave Gandy 2016. All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/_static/css/fonts/fontawesome-webfont.ttf b/docs/_static/css/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000..35acda2 Binary files /dev/null and b/docs/_static/css/fonts/fontawesome-webfont.ttf differ diff --git a/docs/_static/css/fonts/fontawesome-webfont.woff b/docs/_static/css/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000..400014a Binary files /dev/null and b/docs/_static/css/fonts/fontawesome-webfont.woff differ diff --git a/docs/_static/css/fonts/fontawesome-webfont.woff2 b/docs/_static/css/fonts/fontawesome-webfont.woff2 new file mode 100644 index 0000000..4d13fc6 Binary files /dev/null and b/docs/_static/css/fonts/fontawesome-webfont.woff2 differ diff --git a/docs/_static/css/fonts/lato-bold-italic.woff b/docs/_static/css/fonts/lato-bold-italic.woff new file mode 100644 index 0000000..88ad05b Binary files /dev/null and b/docs/_static/css/fonts/lato-bold-italic.woff differ diff --git a/docs/_static/css/fonts/lato-bold-italic.woff2 b/docs/_static/css/fonts/lato-bold-italic.woff2 new file mode 100644 index 0000000..c4e3d80 Binary files /dev/null and b/docs/_static/css/fonts/lato-bold-italic.woff2 differ diff --git a/docs/_static/css/fonts/lato-bold.woff b/docs/_static/css/fonts/lato-bold.woff new file mode 100644 index 0000000..c6dff51 Binary files /dev/null and b/docs/_static/css/fonts/lato-bold.woff differ diff --git a/docs/_static/css/fonts/lato-bold.woff2 b/docs/_static/css/fonts/lato-bold.woff2 new file mode 100644 index 0000000..bb19504 Binary files /dev/null and b/docs/_static/css/fonts/lato-bold.woff2 differ diff --git a/docs/_static/css/fonts/lato-normal-italic.woff b/docs/_static/css/fonts/lato-normal-italic.woff new file mode 100644 index 0000000..76114bc Binary files /dev/null and b/docs/_static/css/fonts/lato-normal-italic.woff differ diff --git a/docs/_static/css/fonts/lato-normal-italic.woff2 b/docs/_static/css/fonts/lato-normal-italic.woff2 new file mode 100644 index 0000000..3404f37 Binary files /dev/null and b/docs/_static/css/fonts/lato-normal-italic.woff2 differ diff --git a/docs/_static/css/fonts/lato-normal.woff b/docs/_static/css/fonts/lato-normal.woff new file mode 100644 index 0000000..ae1307f Binary files /dev/null and b/docs/_static/css/fonts/lato-normal.woff differ diff --git a/docs/_static/css/fonts/lato-normal.woff2 b/docs/_static/css/fonts/lato-normal.woff2 new file mode 100644 index 0000000..3bf9843 Binary files /dev/null and b/docs/_static/css/fonts/lato-normal.woff2 differ diff --git a/docs/_static/css/theme.css b/docs/_static/css/theme.css new file mode 100644 index 0000000..0d9ae7e --- /dev/null +++ b/docs/_static/css/theme.css @@ -0,0 +1,4 @@ +html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden],audio:not([controls]){display:none}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}blockquote{margin:0}dfn{font-style:italic}ins{background:#ff9;text-decoration:none}ins,mark{color:#000}mark{background:#ff0;font-style:italic;font-weight:700}.rst-content code,.rst-content tt,code,kbd,pre,samp{font-family:monospace,serif;_font-family:courier new,monospace;font-size:1em}pre{white-space:pre}q{quotes:none}q:after,q:before{content:"";content:none}small{font-size:85%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dl,ol,ul{margin:0;padding:0;list-style:none;list-style-image:none}li{list-style:none}dd{margin:0}img{border:0;-ms-interpolation-mode:bicubic;vertical-align:middle;max-width:100%}svg:not(:root){overflow:hidden}figure,form{margin:0}label{cursor:pointer}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button;*overflow:visible}button[disabled],input[disabled]{cursor:default}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}textarea{resize:vertical}table{border-collapse:collapse;border-spacing:0}td{vertical-align:top}.chromeframe{margin:.2em 0;background:#ccc;color:#000;padding:.2em 0}.ir{display:block;border:0;text-indent:-999em;overflow:hidden;background-color:transparent;background-repeat:no-repeat;text-align:left;direction:ltr;*line-height:0}.ir br{display:none}.hidden{display:none!important;visibility:hidden}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.invisible{visibility:hidden}.relative{position:relative}big,small{font-size:100%}@media print{body,html,section{background:none!important}*{box-shadow:none!important;text-shadow:none!important;filter:none!important;-ms-filter:none!important}a,a:visited{text-decoration:underline}.ir a:after,a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}.rst-content .toctree-wrapper>p.caption,h2,h3,p{orphans:3;widows:3}.rst-content .toctree-wrapper>p.caption,h2,h3{page-break-after:avoid}}.btn,.fa:before,.icon:before,.rst-content .admonition,.rst-content .admonition-title:before,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .code-block-caption .headerlink:before,.rst-content .danger,.rst-content .eqno .headerlink:before,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-alert,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before,.wy-nav-top a,.wy-side-nav-search .wy-dropdown>a,.wy-side-nav-search>a,input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}/*! + * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:FontAwesome;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713);src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix&v=4.7.0) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa-pull-left.icon,.fa.fa-pull-left,.rst-content .code-block-caption .fa-pull-left.headerlink,.rst-content .eqno .fa-pull-left.headerlink,.rst-content .fa-pull-left.admonition-title,.rst-content code.download span.fa-pull-left:first-child,.rst-content dl dt .fa-pull-left.headerlink,.rst-content h1 .fa-pull-left.headerlink,.rst-content h2 .fa-pull-left.headerlink,.rst-content h3 .fa-pull-left.headerlink,.rst-content h4 .fa-pull-left.headerlink,.rst-content h5 .fa-pull-left.headerlink,.rst-content h6 .fa-pull-left.headerlink,.rst-content p .fa-pull-left.headerlink,.rst-content table>caption .fa-pull-left.headerlink,.rst-content tt.download span.fa-pull-left:first-child,.wy-menu-vertical li.current>a button.fa-pull-left.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-left.toctree-expand,.wy-menu-vertical li button.fa-pull-left.toctree-expand{margin-right:.3em}.fa-pull-right.icon,.fa.fa-pull-right,.rst-content .code-block-caption .fa-pull-right.headerlink,.rst-content .eqno .fa-pull-right.headerlink,.rst-content .fa-pull-right.admonition-title,.rst-content code.download span.fa-pull-right:first-child,.rst-content dl dt .fa-pull-right.headerlink,.rst-content h1 .fa-pull-right.headerlink,.rst-content h2 .fa-pull-right.headerlink,.rst-content h3 .fa-pull-right.headerlink,.rst-content h4 .fa-pull-right.headerlink,.rst-content h5 .fa-pull-right.headerlink,.rst-content h6 .fa-pull-right.headerlink,.rst-content p .fa-pull-right.headerlink,.rst-content table>caption .fa-pull-right.headerlink,.rst-content tt.download span.fa-pull-right:first-child,.wy-menu-vertical li.current>a button.fa-pull-right.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-right.toctree-expand,.wy-menu-vertical li button.fa-pull-right.toctree-expand{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left,.pull-left.icon,.rst-content .code-block-caption .pull-left.headerlink,.rst-content .eqno .pull-left.headerlink,.rst-content .pull-left.admonition-title,.rst-content code.download span.pull-left:first-child,.rst-content dl dt .pull-left.headerlink,.rst-content h1 .pull-left.headerlink,.rst-content h2 .pull-left.headerlink,.rst-content h3 .pull-left.headerlink,.rst-content h4 .pull-left.headerlink,.rst-content h5 .pull-left.headerlink,.rst-content h6 .pull-left.headerlink,.rst-content p .pull-left.headerlink,.rst-content table>caption .pull-left.headerlink,.rst-content tt.download span.pull-left:first-child,.wy-menu-vertical li.current>a button.pull-left.toctree-expand,.wy-menu-vertical li.on a button.pull-left.toctree-expand,.wy-menu-vertical li button.pull-left.toctree-expand{margin-right:.3em}.fa.pull-right,.pull-right.icon,.rst-content .code-block-caption .pull-right.headerlink,.rst-content .eqno .pull-right.headerlink,.rst-content .pull-right.admonition-title,.rst-content code.download span.pull-right:first-child,.rst-content dl dt .pull-right.headerlink,.rst-content h1 .pull-right.headerlink,.rst-content h2 .pull-right.headerlink,.rst-content h3 .pull-right.headerlink,.rst-content h4 .pull-right.headerlink,.rst-content h5 .pull-right.headerlink,.rst-content h6 .pull-right.headerlink,.rst-content p .pull-right.headerlink,.rst-content table>caption .pull-right.headerlink,.rst-content tt.download span.pull-right:first-child,.wy-menu-vertical li.current>a button.pull-right.toctree-expand,.wy-menu-vertical li.on a button.pull-right.toctree-expand,.wy-menu-vertical li button.pull-right.toctree-expand{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scaleY(-1);-ms-transform:scaleY(-1);transform:scaleY(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before,.icon-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-close:before,.fa-remove:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-cog:before,.fa-gear:before{content:""}.fa-trash-o:before{content:""}.fa-home:before,.icon-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before,.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-repeat:before,.fa-rotate-right:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before,.icon-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before{content:""}.fa-check-circle:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before,.rst-content .admonition-title:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before,.icon-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-exclamation-triangle:before,.fa-warning:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-cogs:before,.fa-gears:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before,.icon-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before,.icon-circle-arrow-left:before{content:""}.fa-arrow-circle-right:before,.icon-circle-arrow-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before,.icon-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before,.icon-caret-down:before,.wy-dropdown .caret:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-chain-broken:before,.fa-unlink:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before,.icon-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira:before{content:""}.fa-plus-square-o:before,.wy-menu-vertical li button.toctree-expand:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before,.fa-resistance:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before,.fa-battery:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-television:before,.fa-tv:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before,.icon-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-american-sign-language-interpreting:before,.fa-asl-interpreting:before{content:""}.fa-deaf:before,.fa-deafness:before,.fa-hard-of-hearing:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-sign-language:before,.fa-signing:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-address-card:before,.fa-vcard:before{content:""}.fa-address-card-o:before,.fa-vcard-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer-full:before,.fa-thermometer:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bath:before,.fa-bathtub:before,.fa-s15:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-dropdown .caret,.wy-inline-validate.wy-inline-validate-danger .wy-input-context,.wy-inline-validate.wy-inline-validate-info .wy-input-context,.wy-inline-validate.wy-inline-validate-success .wy-input-context,.wy-inline-validate.wy-inline-validate-warning .wy-input-context,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{font-family:inherit}.fa:before,.icon:before,.rst-content .admonition-title:before,.rst-content .code-block-caption .headerlink:before,.rst-content .eqno .headerlink:before,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before{font-family:FontAwesome;display:inline-block;font-style:normal;font-weight:400;line-height:1;text-decoration:inherit}.rst-content .code-block-caption a .headerlink,.rst-content .eqno a .headerlink,.rst-content a .admonition-title,.rst-content code.download a span:first-child,.rst-content dl dt a .headerlink,.rst-content h1 a .headerlink,.rst-content h2 a .headerlink,.rst-content h3 a .headerlink,.rst-content h4 a .headerlink,.rst-content h5 a .headerlink,.rst-content h6 a .headerlink,.rst-content p.caption a .headerlink,.rst-content p a .headerlink,.rst-content table>caption a .headerlink,.rst-content tt.download a span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li a button.toctree-expand,a .fa,a .icon,a .rst-content .admonition-title,a .rst-content .code-block-caption .headerlink,a .rst-content .eqno .headerlink,a .rst-content code.download span:first-child,a .rst-content dl dt .headerlink,a .rst-content h1 .headerlink,a .rst-content h2 .headerlink,a .rst-content h3 .headerlink,a .rst-content h4 .headerlink,a .rst-content h5 .headerlink,a .rst-content h6 .headerlink,a .rst-content p.caption .headerlink,a .rst-content p .headerlink,a .rst-content table>caption .headerlink,a .rst-content tt.download span:first-child,a .wy-menu-vertical li button.toctree-expand{display:inline-block;text-decoration:inherit}.btn .fa,.btn .icon,.btn .rst-content .admonition-title,.btn .rst-content .code-block-caption .headerlink,.btn .rst-content .eqno .headerlink,.btn .rst-content code.download span:first-child,.btn .rst-content dl dt .headerlink,.btn .rst-content h1 .headerlink,.btn .rst-content h2 .headerlink,.btn .rst-content h3 .headerlink,.btn .rst-content h4 .headerlink,.btn .rst-content h5 .headerlink,.btn .rst-content h6 .headerlink,.btn .rst-content p .headerlink,.btn .rst-content table>caption .headerlink,.btn .rst-content tt.download span:first-child,.btn .wy-menu-vertical li.current>a button.toctree-expand,.btn .wy-menu-vertical li.on a button.toctree-expand,.btn .wy-menu-vertical li button.toctree-expand,.nav .fa,.nav .icon,.nav .rst-content .admonition-title,.nav .rst-content .code-block-caption .headerlink,.nav .rst-content .eqno .headerlink,.nav .rst-content code.download span:first-child,.nav .rst-content dl dt .headerlink,.nav .rst-content h1 .headerlink,.nav .rst-content h2 .headerlink,.nav .rst-content h3 .headerlink,.nav .rst-content h4 .headerlink,.nav .rst-content h5 .headerlink,.nav .rst-content h6 .headerlink,.nav .rst-content p .headerlink,.nav .rst-content table>caption .headerlink,.nav .rst-content tt.download span:first-child,.nav .wy-menu-vertical li.current>a button.toctree-expand,.nav .wy-menu-vertical li.on a button.toctree-expand,.nav .wy-menu-vertical li button.toctree-expand,.rst-content .btn .admonition-title,.rst-content .code-block-caption .btn .headerlink,.rst-content .code-block-caption .nav .headerlink,.rst-content .eqno .btn .headerlink,.rst-content .eqno .nav .headerlink,.rst-content .nav .admonition-title,.rst-content code.download .btn span:first-child,.rst-content code.download .nav span:first-child,.rst-content dl dt .btn .headerlink,.rst-content dl dt .nav .headerlink,.rst-content h1 .btn .headerlink,.rst-content h1 .nav .headerlink,.rst-content h2 .btn .headerlink,.rst-content h2 .nav .headerlink,.rst-content h3 .btn .headerlink,.rst-content h3 .nav .headerlink,.rst-content h4 .btn .headerlink,.rst-content h4 .nav .headerlink,.rst-content h5 .btn .headerlink,.rst-content h5 .nav .headerlink,.rst-content h6 .btn .headerlink,.rst-content h6 .nav .headerlink,.rst-content p .btn .headerlink,.rst-content p .nav .headerlink,.rst-content table>caption .btn .headerlink,.rst-content table>caption .nav .headerlink,.rst-content tt.download .btn span:first-child,.rst-content tt.download .nav span:first-child,.wy-menu-vertical li .btn button.toctree-expand,.wy-menu-vertical li.current>a .btn button.toctree-expand,.wy-menu-vertical li.current>a .nav button.toctree-expand,.wy-menu-vertical li .nav button.toctree-expand,.wy-menu-vertical li.on a .btn button.toctree-expand,.wy-menu-vertical li.on a .nav button.toctree-expand{display:inline}.btn .fa-large.icon,.btn .fa.fa-large,.btn .rst-content .code-block-caption .fa-large.headerlink,.btn .rst-content .eqno .fa-large.headerlink,.btn .rst-content .fa-large.admonition-title,.btn .rst-content code.download span.fa-large:first-child,.btn .rst-content dl dt .fa-large.headerlink,.btn .rst-content h1 .fa-large.headerlink,.btn .rst-content h2 .fa-large.headerlink,.btn .rst-content h3 .fa-large.headerlink,.btn .rst-content h4 .fa-large.headerlink,.btn .rst-content h5 .fa-large.headerlink,.btn .rst-content h6 .fa-large.headerlink,.btn .rst-content p .fa-large.headerlink,.btn .rst-content table>caption .fa-large.headerlink,.btn .rst-content tt.download span.fa-large:first-child,.btn .wy-menu-vertical li button.fa-large.toctree-expand,.nav .fa-large.icon,.nav .fa.fa-large,.nav .rst-content .code-block-caption .fa-large.headerlink,.nav .rst-content .eqno .fa-large.headerlink,.nav .rst-content .fa-large.admonition-title,.nav .rst-content code.download span.fa-large:first-child,.nav .rst-content dl dt .fa-large.headerlink,.nav .rst-content h1 .fa-large.headerlink,.nav .rst-content h2 .fa-large.headerlink,.nav .rst-content h3 .fa-large.headerlink,.nav .rst-content h4 .fa-large.headerlink,.nav .rst-content h5 .fa-large.headerlink,.nav .rst-content h6 .fa-large.headerlink,.nav .rst-content p .fa-large.headerlink,.nav .rst-content table>caption .fa-large.headerlink,.nav .rst-content tt.download span.fa-large:first-child,.nav .wy-menu-vertical li button.fa-large.toctree-expand,.rst-content .btn .fa-large.admonition-title,.rst-content .code-block-caption .btn .fa-large.headerlink,.rst-content .code-block-caption .nav .fa-large.headerlink,.rst-content .eqno .btn .fa-large.headerlink,.rst-content .eqno .nav .fa-large.headerlink,.rst-content .nav .fa-large.admonition-title,.rst-content code.download .btn span.fa-large:first-child,.rst-content code.download .nav span.fa-large:first-child,.rst-content dl dt .btn .fa-large.headerlink,.rst-content dl dt .nav .fa-large.headerlink,.rst-content h1 .btn .fa-large.headerlink,.rst-content h1 .nav .fa-large.headerlink,.rst-content h2 .btn .fa-large.headerlink,.rst-content h2 .nav .fa-large.headerlink,.rst-content h3 .btn .fa-large.headerlink,.rst-content h3 .nav .fa-large.headerlink,.rst-content h4 .btn .fa-large.headerlink,.rst-content h4 .nav .fa-large.headerlink,.rst-content h5 .btn .fa-large.headerlink,.rst-content h5 .nav .fa-large.headerlink,.rst-content h6 .btn .fa-large.headerlink,.rst-content h6 .nav .fa-large.headerlink,.rst-content p .btn .fa-large.headerlink,.rst-content p .nav .fa-large.headerlink,.rst-content table>caption .btn .fa-large.headerlink,.rst-content table>caption .nav .fa-large.headerlink,.rst-content tt.download .btn span.fa-large:first-child,.rst-content tt.download .nav span.fa-large:first-child,.wy-menu-vertical li .btn button.fa-large.toctree-expand,.wy-menu-vertical li .nav button.fa-large.toctree-expand{line-height:.9em}.btn .fa-spin.icon,.btn .fa.fa-spin,.btn .rst-content .code-block-caption .fa-spin.headerlink,.btn .rst-content .eqno .fa-spin.headerlink,.btn .rst-content .fa-spin.admonition-title,.btn .rst-content code.download span.fa-spin:first-child,.btn .rst-content dl dt .fa-spin.headerlink,.btn .rst-content h1 .fa-spin.headerlink,.btn .rst-content h2 .fa-spin.headerlink,.btn .rst-content h3 .fa-spin.headerlink,.btn .rst-content h4 .fa-spin.headerlink,.btn .rst-content h5 .fa-spin.headerlink,.btn .rst-content h6 .fa-spin.headerlink,.btn .rst-content p .fa-spin.headerlink,.btn .rst-content table>caption .fa-spin.headerlink,.btn .rst-content tt.download span.fa-spin:first-child,.btn .wy-menu-vertical li button.fa-spin.toctree-expand,.nav .fa-spin.icon,.nav .fa.fa-spin,.nav .rst-content .code-block-caption .fa-spin.headerlink,.nav .rst-content .eqno .fa-spin.headerlink,.nav .rst-content .fa-spin.admonition-title,.nav .rst-content code.download span.fa-spin:first-child,.nav .rst-content dl dt .fa-spin.headerlink,.nav .rst-content h1 .fa-spin.headerlink,.nav .rst-content h2 .fa-spin.headerlink,.nav .rst-content h3 .fa-spin.headerlink,.nav .rst-content h4 .fa-spin.headerlink,.nav .rst-content h5 .fa-spin.headerlink,.nav .rst-content h6 .fa-spin.headerlink,.nav .rst-content p .fa-spin.headerlink,.nav .rst-content table>caption .fa-spin.headerlink,.nav .rst-content tt.download span.fa-spin:first-child,.nav .wy-menu-vertical li button.fa-spin.toctree-expand,.rst-content .btn .fa-spin.admonition-title,.rst-content .code-block-caption .btn .fa-spin.headerlink,.rst-content .code-block-caption .nav .fa-spin.headerlink,.rst-content .eqno .btn .fa-spin.headerlink,.rst-content .eqno .nav .fa-spin.headerlink,.rst-content .nav .fa-spin.admonition-title,.rst-content code.download .btn span.fa-spin:first-child,.rst-content code.download .nav span.fa-spin:first-child,.rst-content dl dt .btn .fa-spin.headerlink,.rst-content dl dt .nav .fa-spin.headerlink,.rst-content h1 .btn .fa-spin.headerlink,.rst-content h1 .nav .fa-spin.headerlink,.rst-content h2 .btn .fa-spin.headerlink,.rst-content h2 .nav .fa-spin.headerlink,.rst-content h3 .btn .fa-spin.headerlink,.rst-content h3 .nav .fa-spin.headerlink,.rst-content h4 .btn .fa-spin.headerlink,.rst-content h4 .nav .fa-spin.headerlink,.rst-content h5 .btn .fa-spin.headerlink,.rst-content h5 .nav .fa-spin.headerlink,.rst-content h6 .btn .fa-spin.headerlink,.rst-content h6 .nav .fa-spin.headerlink,.rst-content p .btn .fa-spin.headerlink,.rst-content p .nav .fa-spin.headerlink,.rst-content table>caption .btn .fa-spin.headerlink,.rst-content table>caption .nav .fa-spin.headerlink,.rst-content tt.download .btn span.fa-spin:first-child,.rst-content tt.download .nav span.fa-spin:first-child,.wy-menu-vertical li .btn button.fa-spin.toctree-expand,.wy-menu-vertical li .nav button.fa-spin.toctree-expand{display:inline-block}.btn.fa:before,.btn.icon:before,.rst-content .btn.admonition-title:before,.rst-content .code-block-caption .btn.headerlink:before,.rst-content .eqno .btn.headerlink:before,.rst-content code.download span.btn:first-child:before,.rst-content dl dt .btn.headerlink:before,.rst-content h1 .btn.headerlink:before,.rst-content h2 .btn.headerlink:before,.rst-content h3 .btn.headerlink:before,.rst-content h4 .btn.headerlink:before,.rst-content h5 .btn.headerlink:before,.rst-content h6 .btn.headerlink:before,.rst-content p .btn.headerlink:before,.rst-content table>caption .btn.headerlink:before,.rst-content tt.download span.btn:first-child:before,.wy-menu-vertical li button.btn.toctree-expand:before{opacity:.5;-webkit-transition:opacity .05s ease-in;-moz-transition:opacity .05s ease-in;transition:opacity .05s ease-in}.btn.fa:hover:before,.btn.icon:hover:before,.rst-content .btn.admonition-title:hover:before,.rst-content .code-block-caption .btn.headerlink:hover:before,.rst-content .eqno .btn.headerlink:hover:before,.rst-content code.download span.btn:first-child:hover:before,.rst-content dl dt .btn.headerlink:hover:before,.rst-content h1 .btn.headerlink:hover:before,.rst-content h2 .btn.headerlink:hover:before,.rst-content h3 .btn.headerlink:hover:before,.rst-content h4 .btn.headerlink:hover:before,.rst-content h5 .btn.headerlink:hover:before,.rst-content h6 .btn.headerlink:hover:before,.rst-content p .btn.headerlink:hover:before,.rst-content table>caption .btn.headerlink:hover:before,.rst-content tt.download span.btn:first-child:hover:before,.wy-menu-vertical li button.btn.toctree-expand:hover:before{opacity:1}.btn-mini .fa:before,.btn-mini .icon:before,.btn-mini .rst-content .admonition-title:before,.btn-mini .rst-content .code-block-caption .headerlink:before,.btn-mini .rst-content .eqno .headerlink:before,.btn-mini .rst-content code.download span:first-child:before,.btn-mini .rst-content dl dt .headerlink:before,.btn-mini .rst-content h1 .headerlink:before,.btn-mini .rst-content h2 .headerlink:before,.btn-mini .rst-content h3 .headerlink:before,.btn-mini .rst-content h4 .headerlink:before,.btn-mini .rst-content h5 .headerlink:before,.btn-mini .rst-content h6 .headerlink:before,.btn-mini .rst-content p .headerlink:before,.btn-mini .rst-content table>caption .headerlink:before,.btn-mini .rst-content tt.download span:first-child:before,.btn-mini .wy-menu-vertical li button.toctree-expand:before,.rst-content .btn-mini .admonition-title:before,.rst-content .code-block-caption .btn-mini .headerlink:before,.rst-content .eqno .btn-mini .headerlink:before,.rst-content code.download .btn-mini span:first-child:before,.rst-content dl dt .btn-mini .headerlink:before,.rst-content h1 .btn-mini .headerlink:before,.rst-content h2 .btn-mini .headerlink:before,.rst-content h3 .btn-mini .headerlink:before,.rst-content h4 .btn-mini .headerlink:before,.rst-content h5 .btn-mini .headerlink:before,.rst-content h6 .btn-mini .headerlink:before,.rst-content p .btn-mini .headerlink:before,.rst-content table>caption .btn-mini .headerlink:before,.rst-content tt.download .btn-mini span:first-child:before,.wy-menu-vertical li .btn-mini button.toctree-expand:before{font-size:14px;vertical-align:-15%}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.wy-alert{padding:12px;line-height:24px;margin-bottom:24px;background:#e7f2fa}.rst-content .admonition-title,.wy-alert-title{font-weight:700;display:block;color:#fff;background:#6ab0de;padding:6px 12px;margin:-12px -12px 12px}.rst-content .danger,.rst-content .error,.rst-content .wy-alert-danger.admonition,.rst-content .wy-alert-danger.admonition-todo,.rst-content .wy-alert-danger.attention,.rst-content .wy-alert-danger.caution,.rst-content .wy-alert-danger.hint,.rst-content .wy-alert-danger.important,.rst-content .wy-alert-danger.note,.rst-content .wy-alert-danger.seealso,.rst-content .wy-alert-danger.tip,.rst-content .wy-alert-danger.warning,.wy-alert.wy-alert-danger{background:#fdf3f2}.rst-content .danger .admonition-title,.rst-content .danger .wy-alert-title,.rst-content .error .admonition-title,.rst-content .error .wy-alert-title,.rst-content .wy-alert-danger.admonition-todo .admonition-title,.rst-content .wy-alert-danger.admonition-todo .wy-alert-title,.rst-content .wy-alert-danger.admonition .admonition-title,.rst-content .wy-alert-danger.admonition .wy-alert-title,.rst-content .wy-alert-danger.attention .admonition-title,.rst-content .wy-alert-danger.attention .wy-alert-title,.rst-content .wy-alert-danger.caution .admonition-title,.rst-content .wy-alert-danger.caution .wy-alert-title,.rst-content .wy-alert-danger.hint .admonition-title,.rst-content .wy-alert-danger.hint .wy-alert-title,.rst-content .wy-alert-danger.important .admonition-title,.rst-content .wy-alert-danger.important .wy-alert-title,.rst-content .wy-alert-danger.note .admonition-title,.rst-content .wy-alert-danger.note .wy-alert-title,.rst-content .wy-alert-danger.seealso .admonition-title,.rst-content .wy-alert-danger.seealso .wy-alert-title,.rst-content .wy-alert-danger.tip .admonition-title,.rst-content .wy-alert-danger.tip .wy-alert-title,.rst-content .wy-alert-danger.warning .admonition-title,.rst-content .wy-alert-danger.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-danger .admonition-title,.wy-alert.wy-alert-danger .rst-content .admonition-title,.wy-alert.wy-alert-danger .wy-alert-title{background:#f29f97}.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .warning,.rst-content .wy-alert-warning.admonition,.rst-content .wy-alert-warning.danger,.rst-content .wy-alert-warning.error,.rst-content .wy-alert-warning.hint,.rst-content .wy-alert-warning.important,.rst-content .wy-alert-warning.note,.rst-content .wy-alert-warning.seealso,.rst-content .wy-alert-warning.tip,.wy-alert.wy-alert-warning{background:#ffedcc}.rst-content .admonition-todo .admonition-title,.rst-content .admonition-todo .wy-alert-title,.rst-content .attention .admonition-title,.rst-content .attention .wy-alert-title,.rst-content .caution .admonition-title,.rst-content .caution .wy-alert-title,.rst-content .warning .admonition-title,.rst-content .warning .wy-alert-title,.rst-content .wy-alert-warning.admonition .admonition-title,.rst-content .wy-alert-warning.admonition .wy-alert-title,.rst-content .wy-alert-warning.danger .admonition-title,.rst-content .wy-alert-warning.danger .wy-alert-title,.rst-content .wy-alert-warning.error .admonition-title,.rst-content .wy-alert-warning.error .wy-alert-title,.rst-content .wy-alert-warning.hint .admonition-title,.rst-content .wy-alert-warning.hint .wy-alert-title,.rst-content .wy-alert-warning.important .admonition-title,.rst-content .wy-alert-warning.important .wy-alert-title,.rst-content .wy-alert-warning.note .admonition-title,.rst-content .wy-alert-warning.note .wy-alert-title,.rst-content .wy-alert-warning.seealso .admonition-title,.rst-content .wy-alert-warning.seealso .wy-alert-title,.rst-content .wy-alert-warning.tip .admonition-title,.rst-content .wy-alert-warning.tip .wy-alert-title,.rst-content .wy-alert.wy-alert-warning .admonition-title,.wy-alert.wy-alert-warning .rst-content .admonition-title,.wy-alert.wy-alert-warning .wy-alert-title{background:#f0b37e}.rst-content .note,.rst-content .seealso,.rst-content .wy-alert-info.admonition,.rst-content .wy-alert-info.admonition-todo,.rst-content .wy-alert-info.attention,.rst-content .wy-alert-info.caution,.rst-content .wy-alert-info.danger,.rst-content .wy-alert-info.error,.rst-content .wy-alert-info.hint,.rst-content .wy-alert-info.important,.rst-content .wy-alert-info.tip,.rst-content .wy-alert-info.warning,.wy-alert.wy-alert-info{background:#e7f2fa}.rst-content .note .admonition-title,.rst-content .note .wy-alert-title,.rst-content .seealso .admonition-title,.rst-content .seealso .wy-alert-title,.rst-content .wy-alert-info.admonition-todo .admonition-title,.rst-content .wy-alert-info.admonition-todo .wy-alert-title,.rst-content .wy-alert-info.admonition .admonition-title,.rst-content .wy-alert-info.admonition .wy-alert-title,.rst-content .wy-alert-info.attention .admonition-title,.rst-content .wy-alert-info.attention .wy-alert-title,.rst-content .wy-alert-info.caution .admonition-title,.rst-content .wy-alert-info.caution .wy-alert-title,.rst-content .wy-alert-info.danger .admonition-title,.rst-content .wy-alert-info.danger .wy-alert-title,.rst-content .wy-alert-info.error .admonition-title,.rst-content .wy-alert-info.error .wy-alert-title,.rst-content .wy-alert-info.hint .admonition-title,.rst-content .wy-alert-info.hint .wy-alert-title,.rst-content .wy-alert-info.important .admonition-title,.rst-content .wy-alert-info.important .wy-alert-title,.rst-content .wy-alert-info.tip .admonition-title,.rst-content .wy-alert-info.tip .wy-alert-title,.rst-content .wy-alert-info.warning .admonition-title,.rst-content .wy-alert-info.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-info .admonition-title,.wy-alert.wy-alert-info .rst-content .admonition-title,.wy-alert.wy-alert-info .wy-alert-title{background:#6ab0de}.rst-content .hint,.rst-content .important,.rst-content .tip,.rst-content .wy-alert-success.admonition,.rst-content .wy-alert-success.admonition-todo,.rst-content .wy-alert-success.attention,.rst-content .wy-alert-success.caution,.rst-content .wy-alert-success.danger,.rst-content .wy-alert-success.error,.rst-content .wy-alert-success.note,.rst-content .wy-alert-success.seealso,.rst-content .wy-alert-success.warning,.wy-alert.wy-alert-success{background:#dbfaf4}.rst-content .hint .admonition-title,.rst-content .hint .wy-alert-title,.rst-content .important .admonition-title,.rst-content .important .wy-alert-title,.rst-content .tip .admonition-title,.rst-content .tip .wy-alert-title,.rst-content .wy-alert-success.admonition-todo .admonition-title,.rst-content .wy-alert-success.admonition-todo .wy-alert-title,.rst-content .wy-alert-success.admonition .admonition-title,.rst-content .wy-alert-success.admonition .wy-alert-title,.rst-content .wy-alert-success.attention .admonition-title,.rst-content .wy-alert-success.attention .wy-alert-title,.rst-content .wy-alert-success.caution .admonition-title,.rst-content .wy-alert-success.caution .wy-alert-title,.rst-content .wy-alert-success.danger .admonition-title,.rst-content .wy-alert-success.danger .wy-alert-title,.rst-content .wy-alert-success.error .admonition-title,.rst-content .wy-alert-success.error .wy-alert-title,.rst-content .wy-alert-success.note .admonition-title,.rst-content .wy-alert-success.note .wy-alert-title,.rst-content .wy-alert-success.seealso .admonition-title,.rst-content .wy-alert-success.seealso .wy-alert-title,.rst-content .wy-alert-success.warning .admonition-title,.rst-content .wy-alert-success.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-success .admonition-title,.wy-alert.wy-alert-success .rst-content .admonition-title,.wy-alert.wy-alert-success .wy-alert-title{background:#1abc9c}.rst-content .wy-alert-neutral.admonition,.rst-content .wy-alert-neutral.admonition-todo,.rst-content .wy-alert-neutral.attention,.rst-content .wy-alert-neutral.caution,.rst-content .wy-alert-neutral.danger,.rst-content .wy-alert-neutral.error,.rst-content .wy-alert-neutral.hint,.rst-content .wy-alert-neutral.important,.rst-content .wy-alert-neutral.note,.rst-content .wy-alert-neutral.seealso,.rst-content .wy-alert-neutral.tip,.rst-content .wy-alert-neutral.warning,.wy-alert.wy-alert-neutral{background:#f3f6f6}.rst-content .wy-alert-neutral.admonition-todo .admonition-title,.rst-content .wy-alert-neutral.admonition-todo .wy-alert-title,.rst-content .wy-alert-neutral.admonition .admonition-title,.rst-content .wy-alert-neutral.admonition .wy-alert-title,.rst-content .wy-alert-neutral.attention .admonition-title,.rst-content .wy-alert-neutral.attention .wy-alert-title,.rst-content .wy-alert-neutral.caution .admonition-title,.rst-content .wy-alert-neutral.caution .wy-alert-title,.rst-content .wy-alert-neutral.danger .admonition-title,.rst-content .wy-alert-neutral.danger .wy-alert-title,.rst-content .wy-alert-neutral.error .admonition-title,.rst-content .wy-alert-neutral.error .wy-alert-title,.rst-content .wy-alert-neutral.hint .admonition-title,.rst-content .wy-alert-neutral.hint .wy-alert-title,.rst-content .wy-alert-neutral.important .admonition-title,.rst-content .wy-alert-neutral.important .wy-alert-title,.rst-content .wy-alert-neutral.note .admonition-title,.rst-content .wy-alert-neutral.note .wy-alert-title,.rst-content .wy-alert-neutral.seealso .admonition-title,.rst-content .wy-alert-neutral.seealso .wy-alert-title,.rst-content .wy-alert-neutral.tip .admonition-title,.rst-content .wy-alert-neutral.tip .wy-alert-title,.rst-content .wy-alert-neutral.warning .admonition-title,.rst-content .wy-alert-neutral.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-neutral .admonition-title,.wy-alert.wy-alert-neutral .rst-content .admonition-title,.wy-alert.wy-alert-neutral .wy-alert-title{color:#404040;background:#e1e4e5}.rst-content .wy-alert-neutral.admonition-todo a,.rst-content .wy-alert-neutral.admonition a,.rst-content .wy-alert-neutral.attention a,.rst-content .wy-alert-neutral.caution a,.rst-content .wy-alert-neutral.danger a,.rst-content .wy-alert-neutral.error a,.rst-content .wy-alert-neutral.hint a,.rst-content .wy-alert-neutral.important a,.rst-content .wy-alert-neutral.note a,.rst-content .wy-alert-neutral.seealso a,.rst-content .wy-alert-neutral.tip a,.rst-content .wy-alert-neutral.warning a,.wy-alert.wy-alert-neutral a{color:#2980b9}.rst-content .admonition-todo p:last-child,.rst-content .admonition p:last-child,.rst-content .attention p:last-child,.rst-content .caution p:last-child,.rst-content .danger p:last-child,.rst-content .error p:last-child,.rst-content .hint p:last-child,.rst-content .important p:last-child,.rst-content .note p:last-child,.rst-content .seealso p:last-child,.rst-content .tip p:last-child,.rst-content .warning p:last-child,.wy-alert p:last-child{margin-bottom:0}.wy-tray-container{position:fixed;bottom:0;left:0;z-index:600}.wy-tray-container li{display:block;width:300px;background:transparent;color:#fff;text-align:center;box-shadow:0 5px 5px 0 rgba(0,0,0,.1);padding:0 24px;min-width:20%;opacity:0;height:0;line-height:56px;overflow:hidden;-webkit-transition:all .3s ease-in;-moz-transition:all .3s ease-in;transition:all .3s ease-in}.wy-tray-container li.wy-tray-item-success{background:#27ae60}.wy-tray-container li.wy-tray-item-info{background:#2980b9}.wy-tray-container li.wy-tray-item-warning{background:#e67e22}.wy-tray-container li.wy-tray-item-danger{background:#e74c3c}.wy-tray-container li.on{opacity:1;height:56px}@media screen and (max-width:768px){.wy-tray-container{bottom:auto;top:0;width:100%}.wy-tray-container li{width:100%}}button{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;cursor:pointer;line-height:normal;-webkit-appearance:button;*overflow:visible}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}button[disabled]{cursor:default}.btn{display:inline-block;border-radius:2px;line-height:normal;white-space:nowrap;text-align:center;cursor:pointer;font-size:100%;padding:6px 12px 8px;color:#fff;border:1px solid rgba(0,0,0,.1);background-color:#27ae60;text-decoration:none;font-weight:400;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 2px -1px hsla(0,0%,100%,.5),inset 0 -2px 0 0 rgba(0,0,0,.1);outline-none:false;vertical-align:middle;*display:inline;zoom:1;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:all .1s linear;-moz-transition:all .1s linear;transition:all .1s linear}.btn-hover{background:#2e8ece;color:#fff}.btn:hover{background:#2cc36b;color:#fff}.btn:focus{background:#2cc36b;outline:0}.btn:active{box-shadow:inset 0 -1px 0 0 rgba(0,0,0,.05),inset 0 2px 0 0 rgba(0,0,0,.1);padding:8px 12px 6px}.btn:visited{color:#fff}.btn-disabled,.btn-disabled:active,.btn-disabled:focus,.btn-disabled:hover,.btn:disabled{background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=40);opacity:.4;cursor:not-allowed;box-shadow:none}.btn::-moz-focus-inner{padding:0;border:0}.btn-small{font-size:80%}.btn-info{background-color:#2980b9!important}.btn-info:hover{background-color:#2e8ece!important}.btn-neutral{background-color:#f3f6f6!important;color:#404040!important}.btn-neutral:hover{background-color:#e5ebeb!important;color:#404040}.btn-neutral:visited{color:#404040!important}.btn-success{background-color:#27ae60!important}.btn-success:hover{background-color:#295!important}.btn-danger{background-color:#e74c3c!important}.btn-danger:hover{background-color:#ea6153!important}.btn-warning{background-color:#e67e22!important}.btn-warning:hover{background-color:#e98b39!important}.btn-invert{background-color:#222}.btn-invert:hover{background-color:#2f2f2f!important}.btn-link{background-color:transparent!important;color:#2980b9;box-shadow:none;border-color:transparent!important}.btn-link:active,.btn-link:hover{background-color:transparent!important;color:#409ad5!important;box-shadow:none}.btn-link:visited{color:#9b59b6}.wy-btn-group .btn,.wy-control .btn{vertical-align:middle}.wy-btn-group{margin-bottom:24px;*zoom:1}.wy-btn-group:after,.wy-btn-group:before{display:table;content:""}.wy-btn-group:after{clear:both}.wy-dropdown{position:relative;display:inline-block}.wy-dropdown-active .wy-dropdown-menu{display:block}.wy-dropdown-menu{position:absolute;left:0;display:none;float:left;top:100%;min-width:100%;background:#fcfcfc;z-index:100;border:1px solid #cfd7dd;box-shadow:0 2px 2px 0 rgba(0,0,0,.1);padding:12px}.wy-dropdown-menu>dd>a{display:block;clear:both;color:#404040;white-space:nowrap;font-size:90%;padding:0 12px;cursor:pointer}.wy-dropdown-menu>dd>a:hover{background:#2980b9;color:#fff}.wy-dropdown-menu>dd.divider{border-top:1px solid #cfd7dd;margin:6px 0}.wy-dropdown-menu>dd.search{padding-bottom:12px}.wy-dropdown-menu>dd.search input[type=search]{width:100%}.wy-dropdown-menu>dd.call-to-action{background:#e3e3e3;text-transform:uppercase;font-weight:500;font-size:80%}.wy-dropdown-menu>dd.call-to-action:hover{background:#e3e3e3}.wy-dropdown-menu>dd.call-to-action .btn{color:#fff}.wy-dropdown.wy-dropdown-up .wy-dropdown-menu{bottom:100%;top:auto;left:auto;right:0}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu{background:#fcfcfc;margin-top:2px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a{padding:6px 12px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a:hover{background:#2980b9;color:#fff}.wy-dropdown.wy-dropdown-left .wy-dropdown-menu{right:0;left:auto;text-align:right}.wy-dropdown-arrow:before{content:" ";border-bottom:5px solid #f5f5f5;border-left:5px solid transparent;border-right:5px solid transparent;position:absolute;display:block;top:-4px;left:50%;margin-left:-3px}.wy-dropdown-arrow.wy-dropdown-arrow-left:before{left:11px}.wy-form-stacked select{display:block}.wy-form-aligned .wy-help-inline,.wy-form-aligned input,.wy-form-aligned label,.wy-form-aligned select,.wy-form-aligned textarea{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-form-aligned .wy-control-group>label{display:inline-block;vertical-align:middle;width:10em;margin:6px 12px 0 0;float:left}.wy-form-aligned .wy-control{float:left}.wy-form-aligned .wy-control label{display:block}.wy-form-aligned .wy-control select{margin-top:6px}fieldset{margin:0}fieldset,legend{border:0;padding:0}legend{width:100%;white-space:normal;margin-bottom:24px;font-size:150%;*margin-left:-7px}label,legend{display:block}label{margin:0 0 .3125em;color:#333;font-size:90%}input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}.wy-control-group{margin-bottom:24px;max-width:1200px;margin-left:auto;margin-right:auto;*zoom:1}.wy-control-group:after,.wy-control-group:before{display:table;content:""}.wy-control-group:after{clear:both}.wy-control-group.wy-control-group-required>label:after{content:" *";color:#e74c3c}.wy-control-group .wy-form-full,.wy-control-group .wy-form-halves,.wy-control-group .wy-form-thirds{padding-bottom:12px}.wy-control-group .wy-form-full input[type=color],.wy-control-group .wy-form-full input[type=date],.wy-control-group .wy-form-full input[type=datetime-local],.wy-control-group .wy-form-full input[type=datetime],.wy-control-group .wy-form-full input[type=email],.wy-control-group .wy-form-full input[type=month],.wy-control-group .wy-form-full input[type=number],.wy-control-group .wy-form-full input[type=password],.wy-control-group .wy-form-full input[type=search],.wy-control-group .wy-form-full input[type=tel],.wy-control-group .wy-form-full input[type=text],.wy-control-group .wy-form-full input[type=time],.wy-control-group .wy-form-full input[type=url],.wy-control-group .wy-form-full input[type=week],.wy-control-group .wy-form-full select,.wy-control-group .wy-form-halves input[type=color],.wy-control-group .wy-form-halves input[type=date],.wy-control-group .wy-form-halves input[type=datetime-local],.wy-control-group .wy-form-halves input[type=datetime],.wy-control-group .wy-form-halves input[type=email],.wy-control-group .wy-form-halves input[type=month],.wy-control-group .wy-form-halves input[type=number],.wy-control-group .wy-form-halves input[type=password],.wy-control-group .wy-form-halves input[type=search],.wy-control-group .wy-form-halves input[type=tel],.wy-control-group .wy-form-halves input[type=text],.wy-control-group .wy-form-halves input[type=time],.wy-control-group .wy-form-halves input[type=url],.wy-control-group .wy-form-halves input[type=week],.wy-control-group .wy-form-halves select,.wy-control-group .wy-form-thirds input[type=color],.wy-control-group .wy-form-thirds input[type=date],.wy-control-group .wy-form-thirds input[type=datetime-local],.wy-control-group .wy-form-thirds input[type=datetime],.wy-control-group .wy-form-thirds input[type=email],.wy-control-group .wy-form-thirds input[type=month],.wy-control-group .wy-form-thirds input[type=number],.wy-control-group .wy-form-thirds input[type=password],.wy-control-group .wy-form-thirds input[type=search],.wy-control-group .wy-form-thirds input[type=tel],.wy-control-group .wy-form-thirds input[type=text],.wy-control-group .wy-form-thirds input[type=time],.wy-control-group .wy-form-thirds input[type=url],.wy-control-group .wy-form-thirds input[type=week],.wy-control-group .wy-form-thirds select{width:100%}.wy-control-group .wy-form-full{float:left;display:block;width:100%;margin-right:0}.wy-control-group .wy-form-full:last-child{margin-right:0}.wy-control-group .wy-form-halves{float:left;display:block;margin-right:2.35765%;width:48.82117%}.wy-control-group .wy-form-halves:last-child,.wy-control-group .wy-form-halves:nth-of-type(2n){margin-right:0}.wy-control-group .wy-form-halves:nth-of-type(odd){clear:left}.wy-control-group .wy-form-thirds{float:left;display:block;margin-right:2.35765%;width:31.76157%}.wy-control-group .wy-form-thirds:last-child,.wy-control-group .wy-form-thirds:nth-of-type(3n){margin-right:0}.wy-control-group .wy-form-thirds:nth-of-type(3n+1){clear:left}.wy-control-group.wy-control-group-no-input .wy-control,.wy-control-no-input{margin:6px 0 0;font-size:90%}.wy-control-no-input{display:inline-block}.wy-control-group.fluid-input input[type=color],.wy-control-group.fluid-input input[type=date],.wy-control-group.fluid-input input[type=datetime-local],.wy-control-group.fluid-input input[type=datetime],.wy-control-group.fluid-input input[type=email],.wy-control-group.fluid-input input[type=month],.wy-control-group.fluid-input input[type=number],.wy-control-group.fluid-input input[type=password],.wy-control-group.fluid-input input[type=search],.wy-control-group.fluid-input input[type=tel],.wy-control-group.fluid-input input[type=text],.wy-control-group.fluid-input input[type=time],.wy-control-group.fluid-input input[type=url],.wy-control-group.fluid-input input[type=week]{width:100%}.wy-form-message-inline{padding-left:.3em;color:#666;font-size:90%}.wy-form-message{display:block;color:#999;font-size:70%;margin-top:.3125em;font-style:italic}.wy-form-message p{font-size:inherit;font-style:italic;margin-bottom:6px}.wy-form-message p:last-child{margin-bottom:0}input{line-height:normal}input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;*overflow:visible}input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week]{-webkit-appearance:none;padding:6px;display:inline-block;border:1px solid #ccc;font-size:80%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 3px #ddd;border-radius:0;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}input[type=datetime-local]{padding:.34375em .625em}input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{padding:0;margin-right:.3125em;*height:13px;*width:13px}input[type=checkbox],input[type=radio],input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus{outline:0;outline:thin dotted\9;border-color:#333}input.no-focus:focus{border-color:#ccc!important}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:thin dotted #333;outline:1px auto #129fea}input[type=color][disabled],input[type=date][disabled],input[type=datetime-local][disabled],input[type=datetime][disabled],input[type=email][disabled],input[type=month][disabled],input[type=number][disabled],input[type=password][disabled],input[type=search][disabled],input[type=tel][disabled],input[type=text][disabled],input[type=time][disabled],input[type=url][disabled],input[type=week][disabled]{cursor:not-allowed;background-color:#fafafa}input:focus:invalid,select:focus:invalid,textarea:focus:invalid{color:#e74c3c;border:1px solid #e74c3c}input:focus:invalid:focus,select:focus:invalid:focus,textarea:focus:invalid:focus{border-color:#e74c3c}input[type=checkbox]:focus:invalid:focus,input[type=file]:focus:invalid:focus,input[type=radio]:focus:invalid:focus{outline-color:#e74c3c}input.wy-input-large{padding:12px;font-size:100%}textarea{overflow:auto;vertical-align:top;width:100%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif}select,textarea{padding:.5em .625em;display:inline-block;border:1px solid #ccc;font-size:80%;box-shadow:inset 0 1px 3px #ddd;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}select{border:1px solid #ccc;background-color:#fff}select[multiple]{height:auto}select:focus,textarea:focus{outline:0}input[readonly],select[disabled],select[readonly],textarea[disabled],textarea[readonly]{cursor:not-allowed;background-color:#fafafa}input[type=checkbox][disabled],input[type=radio][disabled]{cursor:not-allowed}.wy-checkbox,.wy-radio{margin:6px 0;color:#404040;display:block}.wy-checkbox input,.wy-radio input{vertical-align:baseline}.wy-form-message-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-input-prefix,.wy-input-suffix{white-space:nowrap;padding:6px}.wy-input-prefix .wy-input-context,.wy-input-suffix .wy-input-context{line-height:27px;padding:0 8px;display:inline-block;font-size:80%;background-color:#f3f6f6;border:1px solid #ccc;color:#999}.wy-input-suffix .wy-input-context{border-left:0}.wy-input-prefix .wy-input-context{border-right:0}.wy-switch{position:relative;display:block;height:24px;margin-top:12px;cursor:pointer}.wy-switch:before{left:0;top:0;width:36px;height:12px;background:#ccc}.wy-switch:after,.wy-switch:before{position:absolute;content:"";display:block;border-radius:4px;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.wy-switch:after{width:18px;height:18px;background:#999;left:-3px;top:-3px}.wy-switch span{position:absolute;left:48px;display:block;font-size:12px;color:#ccc;line-height:1}.wy-switch.active:before{background:#1e8449}.wy-switch.active:after{left:24px;background:#27ae60}.wy-switch.disabled{cursor:not-allowed;opacity:.8}.wy-control-group.wy-control-group-error .wy-form-message,.wy-control-group.wy-control-group-error>label{color:#e74c3c}.wy-control-group.wy-control-group-error input[type=color],.wy-control-group.wy-control-group-error input[type=date],.wy-control-group.wy-control-group-error input[type=datetime-local],.wy-control-group.wy-control-group-error input[type=datetime],.wy-control-group.wy-control-group-error input[type=email],.wy-control-group.wy-control-group-error input[type=month],.wy-control-group.wy-control-group-error input[type=number],.wy-control-group.wy-control-group-error input[type=password],.wy-control-group.wy-control-group-error input[type=search],.wy-control-group.wy-control-group-error input[type=tel],.wy-control-group.wy-control-group-error input[type=text],.wy-control-group.wy-control-group-error input[type=time],.wy-control-group.wy-control-group-error input[type=url],.wy-control-group.wy-control-group-error input[type=week],.wy-control-group.wy-control-group-error textarea{border:1px solid #e74c3c}.wy-inline-validate{white-space:nowrap}.wy-inline-validate .wy-input-context{padding:.5em .625em;display:inline-block;font-size:80%}.wy-inline-validate.wy-inline-validate-success .wy-input-context{color:#27ae60}.wy-inline-validate.wy-inline-validate-danger .wy-input-context{color:#e74c3c}.wy-inline-validate.wy-inline-validate-warning .wy-input-context{color:#e67e22}.wy-inline-validate.wy-inline-validate-info .wy-input-context{color:#2980b9}.rotate-90{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.rotate-180{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.rotate-270{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.mirror{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);-o-transform:scaleX(-1);transform:scaleX(-1)}.mirror.rotate-90{-webkit-transform:scaleX(-1) rotate(90deg);-moz-transform:scaleX(-1) rotate(90deg);-ms-transform:scaleX(-1) rotate(90deg);-o-transform:scaleX(-1) rotate(90deg);transform:scaleX(-1) rotate(90deg)}.mirror.rotate-180{-webkit-transform:scaleX(-1) rotate(180deg);-moz-transform:scaleX(-1) rotate(180deg);-ms-transform:scaleX(-1) rotate(180deg);-o-transform:scaleX(-1) rotate(180deg);transform:scaleX(-1) rotate(180deg)}.mirror.rotate-270{-webkit-transform:scaleX(-1) rotate(270deg);-moz-transform:scaleX(-1) rotate(270deg);-ms-transform:scaleX(-1) rotate(270deg);-o-transform:scaleX(-1) rotate(270deg);transform:scaleX(-1) rotate(270deg)}@media only screen and (max-width:480px){.wy-form button[type=submit]{margin:.7em 0 0}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=text],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week],.wy-form label{margin-bottom:.3em;display:block}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week]{margin-bottom:0}.wy-form-aligned .wy-control-group label{margin-bottom:.3em;text-align:left;display:block;width:100%}.wy-form-aligned .wy-control{margin:1.5em 0 0}.wy-form-message,.wy-form-message-inline,.wy-form .wy-help-inline{display:block;font-size:80%;padding:6px 0}}@media screen and (max-width:768px){.tablet-hide{display:none}}@media screen and (max-width:480px){.mobile-hide{display:none}}.float-left{float:left}.float-right{float:right}.full-width{width:100%}.rst-content table.docutils,.rst-content table.field-list,.wy-table{border-collapse:collapse;border-spacing:0;empty-cells:show;margin-bottom:24px}.rst-content table.docutils caption,.rst-content table.field-list caption,.wy-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.rst-content table.docutils td,.rst-content table.docutils th,.rst-content table.field-list td,.rst-content table.field-list th,.wy-table td,.wy-table th{font-size:90%;margin:0;overflow:visible;padding:8px 16px}.rst-content table.docutils td:first-child,.rst-content table.docutils th:first-child,.rst-content table.field-list td:first-child,.rst-content table.field-list th:first-child,.wy-table td:first-child,.wy-table th:first-child{border-left-width:0}.rst-content table.docutils thead,.rst-content table.field-list thead,.wy-table thead{color:#000;text-align:left;vertical-align:bottom;white-space:nowrap}.rst-content table.docutils thead th,.rst-content table.field-list thead th,.wy-table thead th{font-weight:700;border-bottom:2px solid #e1e4e5}.rst-content table.docutils td,.rst-content table.field-list td,.wy-table td{background-color:transparent;vertical-align:middle}.rst-content table.docutils td p,.rst-content table.field-list td p,.wy-table td p{line-height:18px}.rst-content table.docutils td p:last-child,.rst-content table.field-list td p:last-child,.wy-table td p:last-child{margin-bottom:0}.rst-content table.docutils .wy-table-cell-min,.rst-content table.field-list .wy-table-cell-min,.wy-table .wy-table-cell-min{width:1%;padding-right:0}.rst-content table.docutils .wy-table-cell-min input[type=checkbox],.rst-content table.field-list .wy-table-cell-min input[type=checkbox],.wy-table .wy-table-cell-min input[type=checkbox]{margin:0}.wy-table-secondary{color:grey;font-size:90%}.wy-table-tertiary{color:grey;font-size:80%}.rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td,.wy-table-backed,.wy-table-odd td,.wy-table-striped tr:nth-child(2n-1) td{background-color:#f3f6f6}.rst-content table.docutils,.wy-table-bordered-all{border:1px solid #e1e4e5}.rst-content table.docutils td,.wy-table-bordered-all td{border-bottom:1px solid #e1e4e5;border-left:1px solid #e1e4e5}.rst-content table.docutils tbody>tr:last-child td,.wy-table-bordered-all tbody>tr:last-child td{border-bottom-width:0}.wy-table-bordered{border:1px solid #e1e4e5}.wy-table-bordered-rows td{border-bottom:1px solid #e1e4e5}.wy-table-bordered-rows tbody>tr:last-child td{border-bottom-width:0}.wy-table-horizontal td,.wy-table-horizontal th{border-width:0 0 1px;border-bottom:1px solid #e1e4e5}.wy-table-horizontal tbody>tr:last-child td{border-bottom-width:0}.wy-table-responsive{margin-bottom:24px;max-width:100%;overflow:auto}.wy-table-responsive table{margin-bottom:0!important}.wy-table-responsive table td,.wy-table-responsive table th{white-space:nowrap}a{color:#2980b9;text-decoration:none;cursor:pointer}a:hover{color:#3091d1}a:visited{color:#9b59b6}html{height:100%}body,html{overflow-x:hidden}body{font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;font-weight:400;color:#404040;min-height:100%;background:#edf0f2}.wy-text-left{text-align:left}.wy-text-center{text-align:center}.wy-text-right{text-align:right}.wy-text-large{font-size:120%}.wy-text-normal{font-size:100%}.wy-text-small,small{font-size:80%}.wy-text-strike{text-decoration:line-through}.wy-text-warning{color:#e67e22!important}a.wy-text-warning:hover{color:#eb9950!important}.wy-text-info{color:#2980b9!important}a.wy-text-info:hover{color:#409ad5!important}.wy-text-success{color:#27ae60!important}a.wy-text-success:hover{color:#36d278!important}.wy-text-danger{color:#e74c3c!important}a.wy-text-danger:hover{color:#ed7669!important}.wy-text-neutral{color:#404040!important}a.wy-text-neutral:hover{color:#595959!important}.rst-content .toctree-wrapper>p.caption,h1,h2,h3,h4,h5,h6,legend{margin-top:0;font-weight:700;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif}p{line-height:24px;font-size:16px;margin:0 0 24px}h1{font-size:175%}.rst-content .toctree-wrapper>p.caption,h2{font-size:150%}h3{font-size:125%}h4{font-size:115%}h5{font-size:110%}h6{font-size:100%}hr{display:block;height:1px;border:0;border-top:1px solid #e1e4e5;margin:24px 0;padding:0}.rst-content code,.rst-content tt,code{white-space:nowrap;max-width:100%;background:#fff;border:1px solid #e1e4e5;font-size:75%;padding:0 5px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#e74c3c;overflow-x:auto}.rst-content tt.code-large,code.code-large{font-size:90%}.rst-content .section ul,.rst-content .toctree-wrapper ul,.rst-content section ul,.wy-plain-list-disc,article ul{list-style:disc;line-height:24px;margin-bottom:24px}.rst-content .section ul li,.rst-content .toctree-wrapper ul li,.rst-content section ul li,.wy-plain-list-disc li,article ul li{list-style:disc;margin-left:24px}.rst-content .section ul li p:last-child,.rst-content .section ul li ul,.rst-content .toctree-wrapper ul li p:last-child,.rst-content .toctree-wrapper ul li ul,.rst-content section ul li p:last-child,.rst-content section ul li ul,.wy-plain-list-disc li p:last-child,.wy-plain-list-disc li ul,article ul li p:last-child,article ul li ul{margin-bottom:0}.rst-content .section ul li li,.rst-content .toctree-wrapper ul li li,.rst-content section ul li li,.wy-plain-list-disc li li,article ul li li{list-style:circle}.rst-content .section ul li li li,.rst-content .toctree-wrapper ul li li li,.rst-content section ul li li li,.wy-plain-list-disc li li li,article ul li li li{list-style:square}.rst-content .section ul li ol li,.rst-content .toctree-wrapper ul li ol li,.rst-content section ul li ol li,.wy-plain-list-disc li ol li,article ul li ol li{list-style:decimal}.rst-content .section ol,.rst-content .section ol.arabic,.rst-content .toctree-wrapper ol,.rst-content .toctree-wrapper ol.arabic,.rst-content section ol,.rst-content section ol.arabic,.wy-plain-list-decimal,article ol{list-style:decimal;line-height:24px;margin-bottom:24px}.rst-content .section ol.arabic li,.rst-content .section ol li,.rst-content .toctree-wrapper ol.arabic li,.rst-content .toctree-wrapper ol li,.rst-content section ol.arabic li,.rst-content section ol li,.wy-plain-list-decimal li,article ol li{list-style:decimal;margin-left:24px}.rst-content .section ol.arabic li ul,.rst-content .section ol li p:last-child,.rst-content .section ol li ul,.rst-content .toctree-wrapper ol.arabic li ul,.rst-content .toctree-wrapper ol li p:last-child,.rst-content .toctree-wrapper ol li ul,.rst-content section ol.arabic li ul,.rst-content section ol li p:last-child,.rst-content section ol li ul,.wy-plain-list-decimal li p:last-child,.wy-plain-list-decimal li ul,article ol li p:last-child,article ol li ul{margin-bottom:0}.rst-content .section ol.arabic li ul li,.rst-content .section ol li ul li,.rst-content .toctree-wrapper ol.arabic li ul li,.rst-content .toctree-wrapper ol li ul li,.rst-content section ol.arabic li ul li,.rst-content section ol li ul li,.wy-plain-list-decimal li ul li,article ol li ul li{list-style:disc}.wy-breadcrumbs{*zoom:1}.wy-breadcrumbs:after,.wy-breadcrumbs:before{display:table;content:""}.wy-breadcrumbs:after{clear:both}.wy-breadcrumbs li{display:inline-block}.wy-breadcrumbs li.wy-breadcrumbs-aside{float:right}.wy-breadcrumbs li a{display:inline-block;padding:5px}.wy-breadcrumbs li a:first-child{padding-left:0}.rst-content .wy-breadcrumbs li tt,.wy-breadcrumbs li .rst-content tt,.wy-breadcrumbs li code{padding:5px;border:none;background:none}.rst-content .wy-breadcrumbs li tt.literal,.wy-breadcrumbs li .rst-content tt.literal,.wy-breadcrumbs li code.literal{color:#404040}.wy-breadcrumbs-extra{margin-bottom:0;color:#b3b3b3;font-size:80%;display:inline-block}@media screen and (max-width:480px){.wy-breadcrumbs-extra,.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}@media print{.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}html{font-size:16px}.wy-affix{position:fixed;top:1.618em}.wy-menu a:hover{text-decoration:none}.wy-menu-horiz{*zoom:1}.wy-menu-horiz:after,.wy-menu-horiz:before{display:table;content:""}.wy-menu-horiz:after{clear:both}.wy-menu-horiz li,.wy-menu-horiz ul{display:inline-block}.wy-menu-horiz li:hover{background:hsla(0,0%,100%,.1)}.wy-menu-horiz li.divide-left{border-left:1px solid #404040}.wy-menu-horiz li.divide-right{border-right:1px solid #404040}.wy-menu-horiz a{height:32px;display:inline-block;line-height:32px;padding:0 16px}.wy-menu-vertical{width:300px}.wy-menu-vertical header,.wy-menu-vertical p.caption{color:#55a5d9;height:32px;line-height:32px;padding:0 1.618em;margin:12px 0 0;display:block;font-weight:700;text-transform:uppercase;font-size:85%;white-space:nowrap}.wy-menu-vertical ul{margin-bottom:0}.wy-menu-vertical li.divide-top{border-top:1px solid #404040}.wy-menu-vertical li.divide-bottom{border-bottom:1px solid #404040}.wy-menu-vertical li.current{background:#e3e3e3}.wy-menu-vertical li.current a{color:grey;border-right:1px solid #c9c9c9;padding:.4045em 2.427em}.wy-menu-vertical li.current a:hover{background:#d6d6d6}.rst-content .wy-menu-vertical li tt,.wy-menu-vertical li .rst-content tt,.wy-menu-vertical li code{border:none;background:inherit;color:inherit;padding-left:0;padding-right:0}.wy-menu-vertical li button.toctree-expand{display:block;float:left;margin-left:-1.2em;line-height:18px;color:#4d4d4d;border:none;background:none;padding:0}.wy-menu-vertical li.current>a,.wy-menu-vertical li.on a{color:#404040;font-weight:700;position:relative;background:#fcfcfc;border:none;padding:.4045em 1.618em}.wy-menu-vertical li.current>a:hover,.wy-menu-vertical li.on a:hover{background:#fcfcfc}.wy-menu-vertical li.current>a:hover button.toctree-expand,.wy-menu-vertical li.on a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand{display:block;line-height:18px;color:#333}.wy-menu-vertical li.toctree-l1.current>a{border-bottom:1px solid #c9c9c9;border-top:1px solid #c9c9c9}.wy-menu-vertical .toctree-l1.current .toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .toctree-l11>ul{display:none}.wy-menu-vertical .toctree-l1.current .current.toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .current.toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .current.toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .current.toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .current.toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .current.toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .current.toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .current.toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .current.toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .current.toctree-l11>ul{display:block}.wy-menu-vertical li.toctree-l3,.wy-menu-vertical li.toctree-l4{font-size:.9em}.wy-menu-vertical li.toctree-l2 a,.wy-menu-vertical li.toctree-l3 a,.wy-menu-vertical li.toctree-l4 a,.wy-menu-vertical li.toctree-l5 a,.wy-menu-vertical li.toctree-l6 a,.wy-menu-vertical li.toctree-l7 a,.wy-menu-vertical li.toctree-l8 a,.wy-menu-vertical li.toctree-l9 a,.wy-menu-vertical li.toctree-l10 a{color:#404040}.wy-menu-vertical li.toctree-l2 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l3 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l4 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l5 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l6 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l7 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l8 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l9 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l10 a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a,.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a,.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a,.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a,.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a,.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a,.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a,.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{display:block}.wy-menu-vertical li.toctree-l2.current>a{padding:.4045em 2.427em}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{padding:.4045em 1.618em .4045em 4.045em}.wy-menu-vertical li.toctree-l3.current>a{padding:.4045em 4.045em}.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{padding:.4045em 1.618em .4045em 5.663em}.wy-menu-vertical li.toctree-l4.current>a{padding:.4045em 5.663em}.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a{padding:.4045em 1.618em .4045em 7.281em}.wy-menu-vertical li.toctree-l5.current>a{padding:.4045em 7.281em}.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a{padding:.4045em 1.618em .4045em 8.899em}.wy-menu-vertical li.toctree-l6.current>a{padding:.4045em 8.899em}.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a{padding:.4045em 1.618em .4045em 10.517em}.wy-menu-vertical li.toctree-l7.current>a{padding:.4045em 10.517em}.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a{padding:.4045em 1.618em .4045em 12.135em}.wy-menu-vertical li.toctree-l8.current>a{padding:.4045em 12.135em}.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a{padding:.4045em 1.618em .4045em 13.753em}.wy-menu-vertical li.toctree-l9.current>a{padding:.4045em 13.753em}.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a{padding:.4045em 1.618em .4045em 15.371em}.wy-menu-vertical li.toctree-l10.current>a{padding:.4045em 15.371em}.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{padding:.4045em 1.618em .4045em 16.989em}.wy-menu-vertical li.toctree-l2.current>a,.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{background:#c9c9c9}.wy-menu-vertical li.toctree-l2 button.toctree-expand{color:#a3a3a3}.wy-menu-vertical li.toctree-l3.current>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{background:#bdbdbd}.wy-menu-vertical li.toctree-l3 button.toctree-expand{color:#969696}.wy-menu-vertical li.current ul{display:block}.wy-menu-vertical li ul{margin-bottom:0;display:none}.wy-menu-vertical li ul li a{margin-bottom:0;color:#d9d9d9;font-weight:400}.wy-menu-vertical a{line-height:18px;padding:.4045em 1.618em;display:block;position:relative;font-size:90%;color:#d9d9d9}.wy-menu-vertical a:hover{background-color:#4e4a4a;cursor:pointer}.wy-menu-vertical a:hover button.toctree-expand{color:#d9d9d9}.wy-menu-vertical a:active{background-color:#2980b9;cursor:pointer;color:#fff}.wy-menu-vertical a:active button.toctree-expand{color:#fff}.wy-side-nav-search{display:block;width:300px;padding:.809em;margin-bottom:.809em;z-index:200;background-color:#2980b9;text-align:center;color:#fcfcfc}.wy-side-nav-search input[type=text]{width:100%;border-radius:50px;padding:6px 12px;border-color:#2472a4}.wy-side-nav-search img{display:block;margin:auto auto .809em;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-side-nav-search .wy-dropdown>a,.wy-side-nav-search>a{color:#fcfcfc;font-size:100%;font-weight:700;display:inline-block;padding:4px 6px;margin-bottom:.809em;max-width:100%}.wy-side-nav-search .wy-dropdown>a:hover,.wy-side-nav-search>a:hover{background:hsla(0,0%,100%,.1)}.wy-side-nav-search .wy-dropdown>a img.logo,.wy-side-nav-search>a img.logo{display:block;margin:0 auto;height:auto;width:auto;border-radius:0;max-width:100%;background:transparent}.wy-side-nav-search .wy-dropdown>a.icon img.logo,.wy-side-nav-search>a.icon img.logo{margin-top:.85em}.wy-side-nav-search>div.version{margin-top:-.4045em;margin-bottom:.809em;font-weight:400;color:hsla(0,0%,100%,.3)}.wy-nav .wy-menu-vertical header{color:#2980b9}.wy-nav .wy-menu-vertical a{color:#b3b3b3}.wy-nav .wy-menu-vertical a:hover{background-color:#2980b9;color:#fff}[data-menu-wrap]{-webkit-transition:all .2s ease-in;-moz-transition:all .2s ease-in;transition:all .2s ease-in;position:absolute;opacity:1;width:100%;opacity:0}[data-menu-wrap].move-center{left:0;right:auto;opacity:1}[data-menu-wrap].move-left{right:auto;left:-100%;opacity:0}[data-menu-wrap].move-right{right:-100%;left:auto;opacity:0}.wy-body-for-nav{background:#fcfcfc}.wy-grid-for-nav{position:absolute;width:100%;height:100%}.wy-nav-side{position:fixed;top:0;bottom:0;left:0;padding-bottom:2em;width:300px;overflow-x:hidden;overflow-y:hidden;min-height:100%;color:#9b9b9b;background:#343131;z-index:200}.wy-side-scroll{width:320px;position:relative;overflow-x:hidden;overflow-y:scroll;height:100%}.wy-nav-top{display:none;background:#2980b9;color:#fff;padding:.4045em .809em;position:relative;line-height:50px;text-align:center;font-size:100%;*zoom:1}.wy-nav-top:after,.wy-nav-top:before{display:table;content:""}.wy-nav-top:after{clear:both}.wy-nav-top a{color:#fff;font-weight:700}.wy-nav-top img{margin-right:12px;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-nav-top i{font-size:30px;float:left;cursor:pointer;padding-top:inherit}.wy-nav-content-wrap{margin-left:300px;background:#fcfcfc;min-height:100%}.wy-nav-content{padding:1.618em 3.236em;height:100%;max-width:800px;margin:auto}.wy-body-mask{position:fixed;width:100%;height:100%;background:rgba(0,0,0,.2);display:none;z-index:499}.wy-body-mask.on{display:block}footer{color:grey}footer p{margin-bottom:12px}.rst-content footer span.commit tt,footer span.commit .rst-content tt,footer span.commit code{padding:0;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:1em;background:none;border:none;color:grey}.rst-footer-buttons{*zoom:1}.rst-footer-buttons:after,.rst-footer-buttons:before{width:100%;display:table;content:""}.rst-footer-buttons:after{clear:both}.rst-breadcrumbs-buttons{margin-top:12px;*zoom:1}.rst-breadcrumbs-buttons:after,.rst-breadcrumbs-buttons:before{display:table;content:""}.rst-breadcrumbs-buttons:after{clear:both}#search-results .search li{margin-bottom:24px;border-bottom:1px solid #e1e4e5;padding-bottom:24px}#search-results .search li:first-child{border-top:1px solid #e1e4e5;padding-top:24px}#search-results .search li a{font-size:120%;margin-bottom:12px;display:inline-block}#search-results .context{color:grey;font-size:90%}.genindextable li>ul{margin-left:24px}@media screen and (max-width:768px){.wy-body-for-nav{background:#fcfcfc}.wy-nav-top{display:block}.wy-nav-side{left:-300px}.wy-nav-side.shift{width:85%;left:0}.wy-menu.wy-menu-vertical,.wy-side-nav-search,.wy-side-scroll{width:auto}.wy-nav-content-wrap{margin-left:0}.wy-nav-content-wrap .wy-nav-content{padding:1.618em}.wy-nav-content-wrap.shift{position:fixed;min-width:100%;left:85%;top:0;height:100%;overflow:hidden}}@media screen and (min-width:1100px){.wy-nav-content-wrap{background:rgba(0,0,0,.05)}.wy-nav-content{margin:0;background:#fcfcfc}}@media print{.rst-versions,.wy-nav-side,footer{display:none}.wy-nav-content-wrap{margin-left:0}}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60;*zoom:1}.rst-versions .rst-current-version:after,.rst-versions .rst-current-version:before{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-content .code-block-caption .rst-versions .rst-current-version .headerlink,.rst-content .eqno .rst-versions .rst-current-version .headerlink,.rst-content .rst-versions .rst-current-version .admonition-title,.rst-content code.download .rst-versions .rst-current-version span:first-child,.rst-content dl dt .rst-versions .rst-current-version .headerlink,.rst-content h1 .rst-versions .rst-current-version .headerlink,.rst-content h2 .rst-versions .rst-current-version .headerlink,.rst-content h3 .rst-versions .rst-current-version .headerlink,.rst-content h4 .rst-versions .rst-current-version .headerlink,.rst-content h5 .rst-versions .rst-current-version .headerlink,.rst-content h6 .rst-versions .rst-current-version .headerlink,.rst-content p .rst-versions .rst-current-version .headerlink,.rst-content table>caption .rst-versions .rst-current-version .headerlink,.rst-content tt.download .rst-versions .rst-current-version span:first-child,.rst-versions .rst-current-version .fa,.rst-versions .rst-current-version .icon,.rst-versions .rst-current-version .rst-content .admonition-title,.rst-versions .rst-current-version .rst-content .code-block-caption .headerlink,.rst-versions .rst-current-version .rst-content .eqno .headerlink,.rst-versions .rst-current-version .rst-content code.download span:first-child,.rst-versions .rst-current-version .rst-content dl dt .headerlink,.rst-versions .rst-current-version .rst-content h1 .headerlink,.rst-versions .rst-current-version .rst-content h2 .headerlink,.rst-versions .rst-current-version .rst-content h3 .headerlink,.rst-versions .rst-current-version .rst-content h4 .headerlink,.rst-versions .rst-current-version .rst-content h5 .headerlink,.rst-versions .rst-current-version .rst-content h6 .headerlink,.rst-versions .rst-current-version .rst-content p .headerlink,.rst-versions .rst-current-version .rst-content table>caption .headerlink,.rst-versions .rst-current-version .rst-content tt.download span:first-child,.rst-versions .rst-current-version .wy-menu-vertical li button.toctree-expand,.wy-menu-vertical li .rst-versions .rst-current-version button.toctree-expand{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}.rst-content .toctree-wrapper>p.caption,.rst-content h1,.rst-content h2,.rst-content h3,.rst-content h4,.rst-content h5,.rst-content h6{margin-bottom:24px}.rst-content img{max-width:100%;height:auto}.rst-content div.figure,.rst-content figure{margin-bottom:24px}.rst-content div.figure .caption-text,.rst-content figure .caption-text{font-style:italic}.rst-content div.figure p:last-child.caption,.rst-content figure p:last-child.caption{margin-bottom:0}.rst-content div.figure.align-center,.rst-content figure.align-center{text-align:center}.rst-content .section>a>img,.rst-content .section>img,.rst-content section>a>img,.rst-content section>img{margin-bottom:24px}.rst-content abbr[title]{text-decoration:none}.rst-content.style-external-links a.reference.external:after{font-family:FontAwesome;content:"\f08e";color:#b3b3b3;vertical-align:super;font-size:60%;margin:0 .2em}.rst-content blockquote{margin-left:24px;line-height:24px;margin-bottom:24px}.rst-content pre.literal-block{white-space:pre;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;display:block;overflow:auto}.rst-content div[class^=highlight],.rst-content pre.literal-block{border:1px solid #e1e4e5;overflow-x:auto;margin:1px 0 24px}.rst-content div[class^=highlight] div[class^=highlight],.rst-content pre.literal-block div[class^=highlight]{padding:0;border:none;margin:0}.rst-content div[class^=highlight] td.code{width:100%}.rst-content .linenodiv pre{border-right:1px solid #e6e9ea;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;user-select:none;pointer-events:none}.rst-content div[class^=highlight] pre{white-space:pre;margin:0;padding:12px;display:block;overflow:auto}.rst-content div[class^=highlight] pre .hll{display:block;margin:0 -12px;padding:0 12px}.rst-content .linenodiv pre,.rst-content div[class^=highlight] pre,.rst-content pre.literal-block{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:12px;line-height:1.4}.rst-content div.highlight .gp,.rst-content div.highlight span.linenos{user-select:none;pointer-events:none}.rst-content div.highlight span.linenos{display:inline-block;padding-left:0;padding-right:12px;margin-right:12px;border-right:1px solid #e6e9ea}.rst-content .code-block-caption{font-style:italic;font-size:85%;line-height:1;padding:1em 0;text-align:center}@media print{.rst-content .codeblock,.rst-content div[class^=highlight],.rst-content div[class^=highlight] pre{white-space:pre-wrap}}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning{clear:both}.rst-content .admonition-todo .last,.rst-content .admonition-todo>:last-child,.rst-content .admonition .last,.rst-content .admonition>:last-child,.rst-content .attention .last,.rst-content .attention>:last-child,.rst-content .caution .last,.rst-content .caution>:last-child,.rst-content .danger .last,.rst-content .danger>:last-child,.rst-content .error .last,.rst-content .error>:last-child,.rst-content .hint .last,.rst-content .hint>:last-child,.rst-content .important .last,.rst-content .important>:last-child,.rst-content .note .last,.rst-content .note>:last-child,.rst-content .seealso .last,.rst-content .seealso>:last-child,.rst-content .tip .last,.rst-content .tip>:last-child,.rst-content .warning .last,.rst-content .warning>:last-child{margin-bottom:0}.rst-content .admonition-title:before{margin-right:4px}.rst-content .admonition table{border-color:rgba(0,0,0,.1)}.rst-content .admonition table td,.rst-content .admonition table th{background:transparent!important;border-color:rgba(0,0,0,.1)!important}.rst-content .section ol.loweralpha,.rst-content .section ol.loweralpha>li,.rst-content .toctree-wrapper ol.loweralpha,.rst-content .toctree-wrapper ol.loweralpha>li,.rst-content section ol.loweralpha,.rst-content section ol.loweralpha>li{list-style:lower-alpha}.rst-content .section ol.upperalpha,.rst-content .section ol.upperalpha>li,.rst-content .toctree-wrapper ol.upperalpha,.rst-content .toctree-wrapper ol.upperalpha>li,.rst-content section ol.upperalpha,.rst-content section ol.upperalpha>li{list-style:upper-alpha}.rst-content .section ol li>*,.rst-content .section ul li>*,.rst-content .toctree-wrapper ol li>*,.rst-content .toctree-wrapper ul li>*,.rst-content section ol li>*,.rst-content section ul li>*{margin-top:12px;margin-bottom:12px}.rst-content .section ol li>:first-child,.rst-content .section ul li>:first-child,.rst-content .toctree-wrapper ol li>:first-child,.rst-content .toctree-wrapper ul li>:first-child,.rst-content section ol li>:first-child,.rst-content section ul li>:first-child{margin-top:0}.rst-content .section ol li>p,.rst-content .section ol li>p:last-child,.rst-content .section ul li>p,.rst-content .section ul li>p:last-child,.rst-content .toctree-wrapper ol li>p,.rst-content .toctree-wrapper ol li>p:last-child,.rst-content .toctree-wrapper ul li>p,.rst-content .toctree-wrapper ul li>p:last-child,.rst-content section ol li>p,.rst-content section ol li>p:last-child,.rst-content section ul li>p,.rst-content section ul li>p:last-child{margin-bottom:12px}.rst-content .section ol li>p:only-child,.rst-content .section ol li>p:only-child:last-child,.rst-content .section ul li>p:only-child,.rst-content .section ul li>p:only-child:last-child,.rst-content .toctree-wrapper ol li>p:only-child,.rst-content .toctree-wrapper ol li>p:only-child:last-child,.rst-content .toctree-wrapper ul li>p:only-child,.rst-content .toctree-wrapper ul li>p:only-child:last-child,.rst-content section ol li>p:only-child,.rst-content section ol li>p:only-child:last-child,.rst-content section ul li>p:only-child,.rst-content section ul li>p:only-child:last-child{margin-bottom:0}.rst-content .section ol li>ol,.rst-content .section ol li>ul,.rst-content .section ul li>ol,.rst-content .section ul li>ul,.rst-content .toctree-wrapper ol li>ol,.rst-content .toctree-wrapper ol li>ul,.rst-content .toctree-wrapper ul li>ol,.rst-content .toctree-wrapper ul li>ul,.rst-content section ol li>ol,.rst-content section ol li>ul,.rst-content section ul li>ol,.rst-content section ul li>ul{margin-bottom:12px}.rst-content .section ol.simple li>*,.rst-content .section ol.simple li ol,.rst-content .section ol.simple li ul,.rst-content .section ul.simple li>*,.rst-content .section ul.simple li ol,.rst-content .section ul.simple li ul,.rst-content .toctree-wrapper ol.simple li>*,.rst-content .toctree-wrapper ol.simple li ol,.rst-content .toctree-wrapper ol.simple li ul,.rst-content .toctree-wrapper ul.simple li>*,.rst-content .toctree-wrapper ul.simple li ol,.rst-content .toctree-wrapper ul.simple li ul,.rst-content section ol.simple li>*,.rst-content section ol.simple li ol,.rst-content section ol.simple li ul,.rst-content section ul.simple li>*,.rst-content section ul.simple li ol,.rst-content section ul.simple li ul{margin-top:0;margin-bottom:0}.rst-content .line-block{margin-left:0;margin-bottom:24px;line-height:24px}.rst-content .line-block .line-block{margin-left:24px;margin-bottom:0}.rst-content .topic-title{font-weight:700;margin-bottom:12px}.rst-content .toc-backref{color:#404040}.rst-content .align-right{float:right;margin:0 0 24px 24px}.rst-content .align-left{float:left;margin:0 24px 24px 0}.rst-content .align-center{margin:auto}.rst-content .align-center:not(table){display:block}.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink{opacity:0;font-size:14px;font-family:FontAwesome;margin-left:.5em}.rst-content .code-block-caption .headerlink:focus,.rst-content .code-block-caption:hover .headerlink,.rst-content .eqno .headerlink:focus,.rst-content .eqno:hover .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink:focus,.rst-content .toctree-wrapper>p.caption:hover .headerlink,.rst-content dl dt .headerlink:focus,.rst-content dl dt:hover .headerlink,.rst-content h1 .headerlink:focus,.rst-content h1:hover .headerlink,.rst-content h2 .headerlink:focus,.rst-content h2:hover .headerlink,.rst-content h3 .headerlink:focus,.rst-content h3:hover .headerlink,.rst-content h4 .headerlink:focus,.rst-content h4:hover .headerlink,.rst-content h5 .headerlink:focus,.rst-content h5:hover .headerlink,.rst-content h6 .headerlink:focus,.rst-content h6:hover .headerlink,.rst-content p.caption .headerlink:focus,.rst-content p.caption:hover .headerlink,.rst-content p .headerlink:focus,.rst-content p:hover .headerlink,.rst-content table>caption .headerlink:focus,.rst-content table>caption:hover .headerlink{opacity:1}.rst-content .btn:focus{outline:2px solid}.rst-content table>caption .headerlink:after{font-size:12px}.rst-content .centered{text-align:center}.rst-content .sidebar{float:right;width:40%;display:block;margin:0 0 24px 24px;padding:24px;background:#f3f6f6;border:1px solid #e1e4e5}.rst-content .sidebar dl,.rst-content .sidebar p,.rst-content .sidebar ul{font-size:90%}.rst-content .sidebar .last,.rst-content .sidebar>:last-child{margin-bottom:0}.rst-content .sidebar .sidebar-title{display:block;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif;font-weight:700;background:#e1e4e5;padding:6px 12px;margin:-24px -24px 24px;font-size:100%}.rst-content .highlighted{background:#f1c40f;box-shadow:0 0 0 2px #f1c40f;display:inline;font-weight:700}.rst-content .citation-reference,.rst-content .footnote-reference{vertical-align:baseline;position:relative;top:-.4em;line-height:0;font-size:90%}.rst-content .hlist{width:100%}.rst-content dl dt span.classifier:before{content:" : "}.rst-content dl dt span.classifier-delimiter{display:none!important}html.writer-html4 .rst-content table.docutils.citation,html.writer-html4 .rst-content table.docutils.footnote{background:none;border:none}html.writer-html4 .rst-content table.docutils.citation td,html.writer-html4 .rst-content table.docutils.citation tr,html.writer-html4 .rst-content table.docutils.footnote td,html.writer-html4 .rst-content table.docutils.footnote tr{border:none;background-color:transparent!important;white-space:normal}html.writer-html4 .rst-content table.docutils.citation td.label,html.writer-html4 .rst-content table.docutils.footnote td.label{padding-left:0;padding-right:0;vertical-align:top}html.writer-html5 .rst-content dl.field-list,html.writer-html5 .rst-content dl.footnote{display:grid;grid-template-columns:max-content auto}html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dt{padding-left:1rem}html.writer-html5 .rst-content dl.field-list>dt:after,html.writer-html5 .rst-content dl.footnote>dt:after{content:":"}html.writer-html5 .rst-content dl.field-list>dd,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dd,html.writer-html5 .rst-content dl.footnote>dt{margin-bottom:0}html.writer-html5 .rst-content dl.footnote{font-size:.9rem}html.writer-html5 .rst-content dl.footnote>dt{margin:0 .5rem .5rem 0;line-height:1.2rem;word-break:break-all;font-weight:400}html.writer-html5 .rst-content dl.footnote>dt>span.brackets{margin-right:.5rem}html.writer-html5 .rst-content dl.footnote>dt>span.brackets:before{content:"["}html.writer-html5 .rst-content dl.footnote>dt>span.brackets:after{content:"]"}html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref{font-style:italic}html.writer-html5 .rst-content dl.footnote>dd{margin:0 0 .5rem;line-height:1.2rem}html.writer-html5 .rst-content dl.footnote>dd p,html.writer-html5 .rst-content dl.option-list kbd{font-size:.9rem}.rst-content table.docutils.footnote,html.writer-html4 .rst-content table.docutils.citation,html.writer-html5 .rst-content dl.footnote{color:grey}.rst-content table.docutils.footnote code,.rst-content table.docutils.footnote tt,html.writer-html4 .rst-content table.docutils.citation code,html.writer-html4 .rst-content table.docutils.citation tt,html.writer-html5 .rst-content dl.footnote code,html.writer-html5 .rst-content dl.footnote tt{color:#555}.rst-content .wy-table-responsive.citation,.rst-content .wy-table-responsive.footnote{margin-bottom:0}.rst-content .wy-table-responsive.citation+:not(.citation),.rst-content .wy-table-responsive.footnote+:not(.footnote){margin-top:24px}.rst-content .wy-table-responsive.citation:last-child,.rst-content .wy-table-responsive.footnote:last-child{margin-bottom:24px}.rst-content table.docutils th{border-color:#e1e4e5}html.writer-html5 .rst-content table.docutils th{border:1px solid #e1e4e5}html.writer-html5 .rst-content table.docutils td>p,html.writer-html5 .rst-content table.docutils th>p{line-height:1rem;margin-bottom:0;font-size:.9rem}.rst-content table.docutils td .last,.rst-content table.docutils td .last>:last-child{margin-bottom:0}.rst-content table.field-list,.rst-content table.field-list td{border:none}.rst-content table.field-list td p{font-size:inherit;line-height:inherit}.rst-content table.field-list td>strong{display:inline-block}.rst-content table.field-list .field-name{padding-right:10px;text-align:left;white-space:nowrap}.rst-content table.field-list .field-body{text-align:left}.rst-content code,.rst-content tt{color:#000;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;padding:2px 5px}.rst-content code big,.rst-content code em,.rst-content tt big,.rst-content tt em{font-size:100%!important;line-height:normal}.rst-content code.literal,.rst-content tt.literal{color:#e74c3c;white-space:normal}.rst-content code.xref,.rst-content tt.xref,a .rst-content code,a .rst-content tt{font-weight:700;color:#404040}.rst-content kbd,.rst-content pre,.rst-content samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace}.rst-content a code,.rst-content a tt{color:#2980b9}.rst-content dl{margin-bottom:24px}.rst-content dl dt{font-weight:700;margin-bottom:12px}.rst-content dl ol,.rst-content dl p,.rst-content dl table,.rst-content dl ul{margin-bottom:12px}.rst-content dl dd{margin:0 0 12px 24px;line-height:24px}html.writer-html4 .rst-content dl:not(.docutils),html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple){margin-bottom:24px}html.writer-html4 .rst-content dl:not(.docutils)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt{display:table;margin:6px 0;font-size:90%;line-height:normal;background:#e7f2fa;color:#2980b9;border-top:3px solid #6ab0de;padding:6px;position:relative}html.writer-html4 .rst-content dl:not(.docutils)>dt:before,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt:before{color:#6ab0de}html.writer-html4 .rst-content dl:not(.docutils)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.field-list)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dl:not(.field-list)>dt{margin-bottom:6px;border:none;border-left:3px solid #ccc;background:#f0f0f0;color:#555}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.field-list)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dl:not(.field-list)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils)>dt:first-child,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt:first-child{margin-top:0}html.writer-html4 .rst-content dl:not(.docutils) code.descclassname,html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descclassname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) code.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) tt.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) tt.descname{background-color:transparent;border:none;padding:0;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) tt.descname{font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .optional,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .optional{display:inline-block;padding:0 4px;color:#000;font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .property,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .property{display:inline-block;padding-right:8px;max-width:100%}html.writer-html4 .rst-content dl:not(.docutils) .k,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .k{font-style:italic}html.writer-html4 .rst-content dl:not(.docutils) .descclassname,html.writer-html4 .rst-content dl:not(.docutils) .descname,html.writer-html4 .rst-content dl:not(.docutils) .sig-name,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .sig-name{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#000}.rst-content .viewcode-back,.rst-content .viewcode-link{display:inline-block;color:#27ae60;font-size:80%;padding-left:24px}.rst-content .viewcode-back{display:block;float:right}.rst-content p.rubric{margin-bottom:12px;font-weight:700}.rst-content code.download,.rst-content tt.download{background:inherit;padding:inherit;font-weight:400;font-family:inherit;font-size:inherit;color:inherit;border:inherit;white-space:inherit}.rst-content code.download span:first-child,.rst-content tt.download span:first-child{-webkit-font-smoothing:subpixel-antialiased}.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{margin-right:4px}.rst-content .guilabel{border:1px solid #7fbbe3;background:#e7f2fa;font-size:80%;font-weight:700;border-radius:4px;padding:2.4px 6px;margin:auto 2px}.rst-content .versionmodified{font-style:italic}@media screen and (max-width:480px){.rst-content .sidebar{width:100%}}span[id*=MathJax-Span]{color:#404040}.math{text-align:center}@font-face{font-family:Lato;src:url(fonts/lato-normal.woff2?bd03a2cc277bbbc338d464e679fe9942) format("woff2"),url(fonts/lato-normal.woff?27bd77b9162d388cb8d4c4217c7c5e2a) format("woff");font-weight:400;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold.woff2?cccb897485813c7c256901dbca54ecf2) format("woff2"),url(fonts/lato-bold.woff?d878b6c29b10beca227e9eef4246111b) format("woff");font-weight:700;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold-italic.woff2?0b6bb6725576b072c5d0b02ecdd1900d) format("woff2"),url(fonts/lato-bold-italic.woff?9c7e4e9eb485b4a121c760e61bc3707c) format("woff");font-weight:700;font-style:italic;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-normal-italic.woff2?4eb103b4d12be57cb1d040ed5e162e9d) format("woff2"),url(fonts/lato-normal-italic.woff?f28f2d6482446544ef1ea1ccc6dd5892) format("woff");font-weight:400;font-style:italic;font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(fonts/Roboto-Slab-Regular.woff2?7abf5b8d04d26a2cafea937019bca958) format("woff2"),url(fonts/Roboto-Slab-Regular.woff?c1be9284088d487c5e3ff0a10a92e58c) format("woff");font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:700;src:url(fonts/Roboto-Slab-Bold.woff2?9984f4a9bda09be08e83f2506954adbe) format("woff2"),url(fonts/Roboto-Slab-Bold.woff?bed5564a116b05148e3b3bea6fb1162a) format("woff");font-display:block} \ No newline at end of file diff --git a/docs/_static/doctools.js b/docs/_static/doctools.js new file mode 100644 index 0000000..527b876 --- /dev/null +++ b/docs/_static/doctools.js @@ -0,0 +1,156 @@ +/* + * doctools.js + * ~~~~~~~~~~~ + * + * Base JavaScript utilities for all Sphinx HTML documentation. + * + * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ + "TEXTAREA", + "INPUT", + "SELECT", + "BUTTON", +]); + +const _ready = (callback) => { + if (document.readyState !== "loading") { + callback(); + } else { + document.addEventListener("DOMContentLoaded", callback); + } +}; + +/** + * Small JavaScript module for the documentation. + */ +const Documentation = { + init: () => { + Documentation.initDomainIndexTable(); + Documentation.initOnKeyListeners(); + }, + + /** + * i18n support + */ + TRANSLATIONS: {}, + PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), + LOCALE: "unknown", + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext: (string) => { + const translated = Documentation.TRANSLATIONS[string]; + switch (typeof translated) { + case "undefined": + return string; // no translation + case "string": + return translated; // translation exists + default: + return translated[0]; // (singular, plural) translation tuple exists + } + }, + + ngettext: (singular, plural, n) => { + const translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated !== "undefined") + return translated[Documentation.PLURAL_EXPR(n)]; + return n === 1 ? singular : plural; + }, + + addTranslations: (catalog) => { + Object.assign(Documentation.TRANSLATIONS, catalog.messages); + Documentation.PLURAL_EXPR = new Function( + "n", + `return (${catalog.plural_expr})` + ); + Documentation.LOCALE = catalog.locale; + }, + + /** + * helper function to focus on search bar + */ + focusSearchBar: () => { + document.querySelectorAll("input[name=q]")[0]?.focus(); + }, + + /** + * Initialise the domain index toggle buttons + */ + initDomainIndexTable: () => { + const toggler = (el) => { + const idNumber = el.id.substr(7); + const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); + if (el.src.substr(-9) === "minus.png") { + el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; + toggledRows.forEach((el) => (el.style.display = "none")); + } else { + el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; + toggledRows.forEach((el) => (el.style.display = "")); + } + }; + + const togglerElements = document.querySelectorAll("img.toggler"); + togglerElements.forEach((el) => + el.addEventListener("click", (event) => toggler(event.currentTarget)) + ); + togglerElements.forEach((el) => (el.style.display = "")); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); + }, + + initOnKeyListeners: () => { + // only install a listener if it is really needed + if ( + !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && + !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS + ) + return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.altKey || event.ctrlKey || event.metaKey) return; + + if (!event.shiftKey) { + switch (event.key) { + case "ArrowLeft": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const prevLink = document.querySelector('link[rel="prev"]'); + if (prevLink && prevLink.href) { + window.location.href = prevLink.href; + event.preventDefault(); + } + break; + case "ArrowRight": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const nextLink = document.querySelector('link[rel="next"]'); + if (nextLink && nextLink.href) { + window.location.href = nextLink.href; + event.preventDefault(); + } + break; + } + } + + // some keyboard layouts may need Shift to get / + switch (event.key) { + case "/": + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; + Documentation.focusSearchBar(); + event.preventDefault(); + } + }); + }, +}; + +// quick alias for translations +const _ = Documentation.gettext; + +_ready(Documentation.init); diff --git a/docs/_static/documentation_options.js b/docs/_static/documentation_options.js new file mode 100644 index 0000000..995f333 --- /dev/null +++ b/docs/_static/documentation_options.js @@ -0,0 +1,14 @@ +var DOCUMENTATION_OPTIONS = { + URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), + VERSION: '1.0.0', + LANGUAGE: 'en', + COLLAPSE_INDEX: false, + BUILDER: 'html', + FILE_SUFFIX: '.html', + LINK_SUFFIX: '.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt', + NAVIGATION_WITH_KEYS: false, + SHOW_SEARCH_SUMMARY: true, + ENABLE_SEARCH_SHORTCUTS: true, +}; \ No newline at end of file diff --git a/docs/_static/file.png b/docs/_static/file.png new file mode 100644 index 0000000..a858a41 Binary files /dev/null and b/docs/_static/file.png differ diff --git a/docs/_static/jquery-3.6.0.js b/docs/_static/jquery-3.6.0.js new file mode 100644 index 0000000..fc6c299 --- /dev/null +++ b/docs/_static/jquery-3.6.0.js @@ -0,0 +1,10881 @@ +/*! + * jQuery JavaScript Library v3.6.0 + * https://jquery.com/ + * + * Includes Sizzle.js + * https://sizzlejs.com/ + * + * Copyright OpenJS Foundation and other contributors + * Released under the MIT license + * https://jquery.org/license + * + * Date: 2021-03-02T17:08Z + */ +( function( global, factory ) { + + "use strict"; + + if ( typeof module === "object" && typeof module.exports === "object" ) { + + // For CommonJS and CommonJS-like environments where a proper `window` + // is present, execute the factory and get jQuery. + // For environments that do not have a `window` with a `document` + // (such as Node.js), expose a factory as module.exports. + // This accentuates the need for the creation of a real `window`. + // e.g. var jQuery = require("jquery")(window); + // See ticket #14549 for more info. + module.exports = global.document ? + factory( global, true ) : + function( w ) { + if ( !w.document ) { + throw new Error( "jQuery requires a window with a document" ); + } + return factory( w ); + }; + } else { + factory( global ); + } + +// Pass this if window is not defined yet +} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { + +// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 +// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode +// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common +// enough that all such attempts are guarded in a try block. +"use strict"; + +var arr = []; + +var getProto = Object.getPrototypeOf; + +var slice = arr.slice; + +var flat = arr.flat ? function( array ) { + return arr.flat.call( array ); +} : function( array ) { + return arr.concat.apply( [], array ); +}; + + +var push = arr.push; + +var indexOf = arr.indexOf; + +var class2type = {}; + +var toString = class2type.toString; + +var hasOwn = class2type.hasOwnProperty; + +var fnToString = hasOwn.toString; + +var ObjectFunctionString = fnToString.call( Object ); + +var support = {}; + +var isFunction = function isFunction( obj ) { + + // Support: Chrome <=57, Firefox <=52 + // In some browsers, typeof returns "function" for HTML elements + // (i.e., `typeof document.createElement( "object" ) === "function"`). + // We don't want to classify *any* DOM node as a function. + // Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5 + // Plus for old WebKit, typeof returns "function" for HTML collections + // (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756) + return typeof obj === "function" && typeof obj.nodeType !== "number" && + typeof obj.item !== "function"; + }; + + +var isWindow = function isWindow( obj ) { + return obj != null && obj === obj.window; + }; + + +var document = window.document; + + + + var preservedScriptAttributes = { + type: true, + src: true, + nonce: true, + noModule: true + }; + + function DOMEval( code, node, doc ) { + doc = doc || document; + + var i, val, + script = doc.createElement( "script" ); + + script.text = code; + if ( node ) { + for ( i in preservedScriptAttributes ) { + + // Support: Firefox 64+, Edge 18+ + // Some browsers don't support the "nonce" property on scripts. + // On the other hand, just using `getAttribute` is not enough as + // the `nonce` attribute is reset to an empty string whenever it + // becomes browsing-context connected. + // See https://github.com/whatwg/html/issues/2369 + // See https://html.spec.whatwg.org/#nonce-attributes + // The `node.getAttribute` check was added for the sake of + // `jQuery.globalEval` so that it can fake a nonce-containing node + // via an object. + val = node[ i ] || node.getAttribute && node.getAttribute( i ); + if ( val ) { + script.setAttribute( i, val ); + } + } + } + doc.head.appendChild( script ).parentNode.removeChild( script ); + } + + +function toType( obj ) { + if ( obj == null ) { + return obj + ""; + } + + // Support: Android <=2.3 only (functionish RegExp) + return typeof obj === "object" || typeof obj === "function" ? + class2type[ toString.call( obj ) ] || "object" : + typeof obj; +} +/* global Symbol */ +// Defining this global in .eslintrc.json would create a danger of using the global +// unguarded in another place, it seems safer to define global only for this module + + + +var + version = "3.6.0", + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + + // The jQuery object is actually just the init constructor 'enhanced' + // Need init if jQuery is called (just allow error to be thrown if not included) + return new jQuery.fn.init( selector, context ); + }; + +jQuery.fn = jQuery.prototype = { + + // The current version of jQuery being used + jquery: version, + + constructor: jQuery, + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + + // Return all the elements in a clean array + if ( num == null ) { + return slice.call( this ); + } + + // Return just the one element from the set + return num < 0 ? this[ num + this.length ] : this[ num ]; + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + each: function( callback ) { + return jQuery.each( this, callback ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map( this, function( elem, i ) { + return callback.call( elem, i, elem ); + } ) ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + even: function() { + return this.pushStack( jQuery.grep( this, function( _elem, i ) { + return ( i + 1 ) % 2; + } ) ); + }, + + odd: function() { + return this.pushStack( jQuery.grep( this, function( _elem, i ) { + return i % 2; + } ) ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); + }, + + end: function() { + return this.prevObject || this.constructor(); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: arr.sort, + splice: arr.splice +}; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[ 0 ] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + + // Skip the boolean and the target + target = arguments[ i ] || {}; + i++; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !isFunction( target ) ) { + target = {}; + } + + // Extend jQuery itself if only one argument is passed + if ( i === length ) { + target = this; + i--; + } + + for ( ; i < length; i++ ) { + + // Only deal with non-null/undefined values + if ( ( options = arguments[ i ] ) != null ) { + + // Extend the base object + for ( name in options ) { + copy = options[ name ]; + + // Prevent Object.prototype pollution + // Prevent never-ending loop + if ( name === "__proto__" || target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject( copy ) || + ( copyIsArray = Array.isArray( copy ) ) ) ) { + src = target[ name ]; + + // Ensure proper type for the source value + if ( copyIsArray && !Array.isArray( src ) ) { + clone = []; + } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { + clone = {}; + } else { + clone = src; + } + copyIsArray = false; + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend( { + + // Unique for each copy of jQuery on the page + expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), + + // Assume jQuery is ready without the ready module + isReady: true, + + error: function( msg ) { + throw new Error( msg ); + }, + + noop: function() {}, + + isPlainObject: function( obj ) { + var proto, Ctor; + + // Detect obvious negatives + // Use toString instead of jQuery.type to catch host objects + if ( !obj || toString.call( obj ) !== "[object Object]" ) { + return false; + } + + proto = getProto( obj ); + + // Objects with no prototype (e.g., `Object.create( null )`) are plain + if ( !proto ) { + return true; + } + + // Objects with prototype are plain iff they were constructed by a global Object function + Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; + return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; + }, + + isEmptyObject: function( obj ) { + var name; + + for ( name in obj ) { + return false; + } + return true; + }, + + // Evaluates a script in a provided context; falls back to the global one + // if not specified. + globalEval: function( code, options, doc ) { + DOMEval( code, { nonce: options && options.nonce }, doc ); + }, + + each: function( obj, callback ) { + var length, i = 0; + + if ( isArrayLike( obj ) ) { + length = obj.length; + for ( ; i < length; i++ ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } else { + for ( i in obj ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } + + return obj; + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArrayLike( Object( arr ) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + return arr == null ? -1 : indexOf.call( arr, elem, i ); + }, + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + merge: function( first, second ) { + var len = +second.length, + j = 0, + i = first.length; + + for ( ; j < len; j++ ) { + first[ i++ ] = second[ j ]; + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, invert ) { + var callbackInverse, + matches = [], + i = 0, + length = elems.length, + callbackExpect = !invert; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + callbackInverse = !callback( elems[ i ], i ); + if ( callbackInverse !== callbackExpect ) { + matches.push( elems[ i ] ); + } + } + + return matches; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var length, value, + i = 0, + ret = []; + + // Go through the array, translating each of the items to their new values + if ( isArrayLike( elems ) ) { + length = elems.length; + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + } + + // Flatten any nested arrays + return flat( ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // jQuery.support is not used in Core but other projects attach their + // properties to it so it needs to exist. + support: support +} ); + +if ( typeof Symbol === "function" ) { + jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; +} + +// Populate the class2type map +jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), + function( _i, name ) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); + } ); + +function isArrayLike( obj ) { + + // Support: real iOS 8.2 only (not reproducible in simulator) + // `in` check used to prevent JIT error (gh-2145) + // hasOwn isn't used here due to false negatives + // regarding Nodelist length in IE + var length = !!obj && "length" in obj && obj.length, + type = toType( obj ); + + if ( isFunction( obj ) || isWindow( obj ) ) { + return false; + } + + return type === "array" || length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj; +} +var Sizzle = +/*! + * Sizzle CSS Selector Engine v2.3.6 + * https://sizzlejs.com/ + * + * Copyright JS Foundation and other contributors + * Released under the MIT license + * https://js.foundation/ + * + * Date: 2021-02-16 + */ +( function( window ) { +var i, + support, + Expr, + getText, + isXML, + tokenize, + compile, + select, + outermostContext, + sortInput, + hasDuplicate, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + 1 * new Date(), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + nonnativeSelectorCache = createCache(), + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + } + return 0; + }, + + // Instance methods + hasOwn = ( {} ).hasOwnProperty, + arr = [], + pop = arr.pop, + pushNative = arr.push, + push = arr.push, + slice = arr.slice, + + // Use a stripped-down indexOf as it's faster than native + // https://jsperf.com/thor-indexof-vs-for/5 + indexOf = function( list, elem ) { + var i = 0, + len = list.length; + for ( ; i < len; i++ ) { + if ( list[ i ] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" + + "ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + + // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram + identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", + + // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + + + // Operator (capture 2) + "*([*^$|!~]?=)" + whitespace + + + // "Attribute values must be CSS identifiers [capture 5] + // or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + + whitespace + "*\\]", + + pseudos = ":(" + identifier + ")(?:\\((" + + + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: + // 1. quoted (capture 3; capture 4 or capture 5) + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + + + // 2. simple (capture 6) + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + + // 3. anything else (capture 2) + ".*" + + ")\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rwhitespace = new RegExp( whitespace + "+", "g" ), + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + + "*" ), + rdescend = new RegExp( whitespace + "|>" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + identifier + ")" ), + "CLASS": new RegExp( "^\\.(" + identifier + ")" ), + "TAG": new RegExp( "^(" + identifier + "|[*])" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rhtml = /HTML$/i, + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rsibling = /[+~]/, + + // CSS escapes + // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ), + funescape = function( escape, nonHex ) { + var high = "0x" + escape.slice( 1 ) - 0x10000; + + return nonHex ? + + // Strip the backslash prefix from a non-hex escape sequence + nonHex : + + // Replace a hexadecimal escape sequence with the encoded Unicode code point + // Support: IE <=11+ + // For values outside the Basic Multilingual Plane (BMP), manually construct a + // surrogate pair + high < 0 ? + String.fromCharCode( high + 0x10000 ) : + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }, + + // CSS string/identifier serialization + // https://drafts.csswg.org/cssom/#common-serializing-idioms + rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, + fcssescape = function( ch, asCodePoint ) { + if ( asCodePoint ) { + + // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER + if ( ch === "\0" ) { + return "\uFFFD"; + } + + // Control characters and (dependent upon position) numbers get escaped as code points + return ch.slice( 0, -1 ) + "\\" + + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; + } + + // Other potentially-special ASCII characters get backslash-escaped + return "\\" + ch; + }, + + // Used for iframes + // See setDocument() + // Removing the function wrapper causes a "Permission Denied" + // error in IE + unloadHandler = function() { + setDocument(); + }, + + inDisabledFieldset = addCombinator( + function( elem ) { + return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; + }, + { dir: "parentNode", next: "legend" } + ); + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + ( arr = slice.call( preferredDoc.childNodes ) ), + preferredDoc.childNodes + ); + + // Support: Android<4.0 + // Detect silently failing push.apply + // eslint-disable-next-line no-unused-expressions + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + pushNative.apply( target, slice.call( els ) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + + // Can't trust NodeList.length + while ( ( target[ j++ ] = els[ i++ ] ) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var m, i, elem, nid, match, groups, newSelector, + newContext = context && context.ownerDocument, + + // nodeType defaults to 9, since context defaults to document + nodeType = context ? context.nodeType : 9; + + results = results || []; + + // Return early from calls with invalid selector or context + if ( typeof selector !== "string" || !selector || + nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { + + return results; + } + + // Try to shortcut find operations (as opposed to filters) in HTML documents + if ( !seed ) { + setDocument( context ); + context = context || document; + + if ( documentIsHTML ) { + + // If the selector is sufficiently simple, try using a "get*By*" DOM method + // (excepting DocumentFragment context, where the methods don't exist) + if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) { + + // ID selector + if ( ( m = match[ 1 ] ) ) { + + // Document context + if ( nodeType === 9 ) { + if ( ( elem = context.getElementById( m ) ) ) { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + + // Element context + } else { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( newContext && ( elem = newContext.getElementById( m ) ) && + contains( context, elem ) && + elem.id === m ) { + + results.push( elem ); + return results; + } + } + + // Type selector + } else if ( match[ 2 ] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Class selector + } else if ( ( m = match[ 3 ] ) && support.getElementsByClassName && + context.getElementsByClassName ) { + + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // Take advantage of querySelectorAll + if ( support.qsa && + !nonnativeSelectorCache[ selector + " " ] && + ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) && + + // Support: IE 8 only + // Exclude object elements + ( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) { + + newSelector = selector; + newContext = context; + + // qSA considers elements outside a scoping root when evaluating child or + // descendant combinators, which is not what we want. + // In such cases, we work around the behavior by prefixing every selector in the + // list with an ID selector referencing the scope context. + // The technique has to be used as well when a leading combinator is used + // as such selectors are not recognized by querySelectorAll. + // Thanks to Andrew Dupont for this technique. + if ( nodeType === 1 && + ( rdescend.test( selector ) || rcombinators.test( selector ) ) ) { + + // Expand context for sibling selectors + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || + context; + + // We can use :scope instead of the ID hack if the browser + // supports it & if we're not changing the context. + if ( newContext !== context || !support.scope ) { + + // Capture the context ID, setting it first if necessary + if ( ( nid = context.getAttribute( "id" ) ) ) { + nid = nid.replace( rcssescape, fcssescape ); + } else { + context.setAttribute( "id", ( nid = expando ) ); + } + } + + // Prefix every selector in the list + groups = tokenize( selector ); + i = groups.length; + while ( i-- ) { + groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " + + toSelector( groups[ i ] ); + } + newSelector = groups.join( "," ); + } + + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch ( qsaError ) { + nonnativeSelectorCache( selector, true ); + } finally { + if ( nid === expando ) { + context.removeAttribute( "id" ); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {function(string, object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key + " " ) > Expr.cacheLength ) { + + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return ( cache[ key + " " ] = value ); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created element and returns a boolean result + */ +function assert( fn ) { + var el = document.createElement( "fieldset" ); + + try { + return !!fn( el ); + } catch ( e ) { + return false; + } finally { + + // Remove from its parent by default + if ( el.parentNode ) { + el.parentNode.removeChild( el ); + } + + // release memory in IE + el = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split( "|" ), + i = arr.length; + + while ( i-- ) { + Expr.attrHandle[ arr[ i ] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + a.sourceIndex - b.sourceIndex; + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( ( cur = cur.nextSibling ) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return ( name === "input" || name === "button" ) && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for :enabled/:disabled + * @param {Boolean} disabled true for :disabled; false for :enabled + */ +function createDisabledPseudo( disabled ) { + + // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable + return function( elem ) { + + // Only certain elements can match :enabled or :disabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled + if ( "form" in elem ) { + + // Check for inherited disabledness on relevant non-disabled elements: + // * listed form-associated elements in a disabled fieldset + // https://html.spec.whatwg.org/multipage/forms.html#category-listed + // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled + // * option elements in a disabled optgroup + // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled + // All such elements have a "form" property. + if ( elem.parentNode && elem.disabled === false ) { + + // Option elements defer to a parent optgroup if present + if ( "label" in elem ) { + if ( "label" in elem.parentNode ) { + return elem.parentNode.disabled === disabled; + } else { + return elem.disabled === disabled; + } + } + + // Support: IE 6 - 11 + // Use the isDisabled shortcut property to check for disabled fieldset ancestors + return elem.isDisabled === disabled || + + // Where there is no isDisabled, check manually + /* jshint -W018 */ + elem.isDisabled !== !disabled && + inDisabledFieldset( elem ) === disabled; + } + + return elem.disabled === disabled; + + // Try to winnow out elements that can't be disabled before trusting the disabled property. + // Some victims get caught in our net (label, legend, menu, track), but it shouldn't + // even exist on them, let alone have a boolean value. + } else if ( "label" in elem ) { + return elem.disabled === disabled; + } + + // Remaining elements are neither :enabled nor :disabled + return false; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction( function( argument ) { + argument = +argument; + return markFunction( function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ ( j = matchIndexes[ i ] ) ] ) { + seed[ j ] = !( matches[ j ] = seed[ j ] ); + } + } + } ); + } ); +} + +/** + * Checks a node for validity as a Sizzle context + * @param {Element|Object=} context + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value + */ +function testContext( context ) { + return context && typeof context.getElementsByTagName !== "undefined" && context; +} + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Detects XML nodes + * @param {Element|Object} elem An element or a document + * @returns {Boolean} True iff elem is a non-HTML XML node + */ +isXML = Sizzle.isXML = function( elem ) { + var namespace = elem && elem.namespaceURI, + docElem = elem && ( elem.ownerDocument || elem ).documentElement; + + // Support: IE <=8 + // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes + // https://bugs.jquery.com/ticket/4833 + return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" ); +}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var hasCompare, subWindow, + doc = node ? node.ownerDocument || node : preferredDoc; + + // Return early if doc is invalid or already selected + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Update global variables + document = doc; + docElem = document.documentElement; + documentIsHTML = !isXML( document ); + + // Support: IE 9 - 11+, Edge 12 - 18+ + // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( preferredDoc != document && + ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) { + + // Support: IE 11, Edge + if ( subWindow.addEventListener ) { + subWindow.addEventListener( "unload", unloadHandler, false ); + + // Support: IE 9 - 10 only + } else if ( subWindow.attachEvent ) { + subWindow.attachEvent( "onunload", unloadHandler ); + } + } + + // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only, + // Safari 4 - 5 only, Opera <=11.6 - 12.x only + // IE/Edge & older browsers don't support the :scope pseudo-class. + // Support: Safari 6.0 only + // Safari 6.0 supports :scope but it's an alias of :root there. + support.scope = assert( function( el ) { + docElem.appendChild( el ).appendChild( document.createElement( "div" ) ); + return typeof el.querySelectorAll !== "undefined" && + !el.querySelectorAll( ":scope fieldset div" ).length; + } ); + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties + // (excepting IE8 booleans) + support.attributes = assert( function( el ) { + el.className = "i"; + return !el.getAttribute( "className" ); + } ); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert( function( el ) { + el.appendChild( document.createComment( "" ) ); + return !el.getElementsByTagName( "*" ).length; + } ); + + // Support: IE<9 + support.getElementsByClassName = rnative.test( document.getElementsByClassName ); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programmatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert( function( el ) { + docElem.appendChild( el ).id = expando; + return !document.getElementsByName || !document.getElementsByName( expando ).length; + } ); + + // ID filter and find + if ( support.getById ) { + Expr.filter[ "ID" ] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute( "id" ) === attrId; + }; + }; + Expr.find[ "ID" ] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var elem = context.getElementById( id ); + return elem ? [ elem ] : []; + } + }; + } else { + Expr.filter[ "ID" ] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== "undefined" && + elem.getAttributeNode( "id" ); + return node && node.value === attrId; + }; + }; + + // Support: IE 6 - 7 only + // getElementById is not reliable as a find shortcut + Expr.find[ "ID" ] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var node, i, elems, + elem = context.getElementById( id ); + + if ( elem ) { + + // Verify the id attribute + node = elem.getAttributeNode( "id" ); + if ( node && node.value === id ) { + return [ elem ]; + } + + // Fall back on getElementsByName + elems = context.getElementsByName( id ); + i = 0; + while ( ( elem = elems[ i++ ] ) ) { + node = elem.getAttributeNode( "id" ); + if ( node && node.value === id ) { + return [ elem ]; + } + } + } + + return []; + } + }; + } + + // Tag + Expr.find[ "TAG" ] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( tag ); + + // DocumentFragment nodes don't have gEBTN + } else if ( support.qsa ) { + return context.querySelectorAll( tag ); + } + } : + + function( tag, context ) { + var elem, + tmp = [], + i = 0, + + // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( ( elem = results[ i++ ] ) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See https://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) { + + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert( function( el ) { + + var input; + + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // https://bugs.jquery.com/ticket/12359 + docElem.appendChild( el ).innerHTML = "" + + ""; + + // Support: IE8, Opera 11-12.16 + // Nothing should be selected when empty strings follow ^= or $= or *= + // The test attribute must be unknown in Opera but "safe" for WinRT + // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section + if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !el.querySelectorAll( "[selected]" ).length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ + if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { + rbuggyQSA.push( "~=" ); + } + + // Support: IE 11+, Edge 15 - 18+ + // IE 11/Edge don't find elements on a `[name='']` query in some cases. + // Adding a temporary attribute to the document before the selection works + // around the issue. + // Interestingly, IE 10 & older don't seem to have the issue. + input = document.createElement( "input" ); + input.setAttribute( "name", "" ); + el.appendChild( input ); + if ( !el.querySelectorAll( "[name='']" ).length ) { + rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" + + whitespace + "*(?:''|\"\")" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !el.querySelectorAll( ":checked" ).length ) { + rbuggyQSA.push( ":checked" ); + } + + // Support: Safari 8+, iOS 8+ + // https://bugs.webkit.org/show_bug.cgi?id=136851 + // In-page `selector#id sibling-combinator selector` fails + if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { + rbuggyQSA.push( ".#.+[+~]" ); + } + + // Support: Firefox <=3.6 - 5 only + // Old Firefox doesn't throw on a badly-escaped identifier. + el.querySelectorAll( "\\\f" ); + rbuggyQSA.push( "[\\r\\n\\f]" ); + } ); + + assert( function( el ) { + el.innerHTML = "" + + ""; + + // Support: Windows 8 Native Apps + // The type and name attributes are restricted during .innerHTML assignment + var input = document.createElement( "input" ); + input.setAttribute( "type", "hidden" ); + el.appendChild( input ).setAttribute( "name", "D" ); + + // Support: IE8 + // Enforce case-sensitivity of name attribute + if ( el.querySelectorAll( "[name=d]" ).length ) { + rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( el.querySelectorAll( ":enabled" ).length !== 2 ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Support: IE9-11+ + // IE's :disabled selector does not pick up the children of disabled fieldsets + docElem.appendChild( el ).disabled = true; + if ( el.querySelectorAll( ":disabled" ).length !== 2 ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Support: Opera 10 - 11 only + // Opera 10-11 does not throw on post-comma invalid pseudos + el.querySelectorAll( "*,:x" ); + rbuggyQSA.push( ",.*:" ); + } ); + } + + if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches || + docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector ) ) ) ) { + + assert( function( el ) { + + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( el, "*" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( el, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + } ); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) ); + + /* Contains + ---------------------------------------------------------------------- */ + hasCompare = rnative.test( docElem.compareDocumentPosition ); + + // Element contains another + // Purposefully self-exclusive + // As in, an element does not contain itself + contains = hasCompare || rnative.test( docElem.contains ) ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + ) ); + } : + function( a, b ) { + if ( b ) { + while ( ( b = b.parentNode ) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = hasCompare ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + // Sort on method existence if only one input has compareDocumentPosition + var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; + if ( compare ) { + return compare; + } + + // Calculate position if both inputs belong to the same document + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ? + a.compareDocumentPosition( b ) : + + // Otherwise we know they are disconnected + 1; + + // Disconnected nodes + if ( compare & 1 || + ( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) { + + // Choose the first element that is related to our preferred document + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( a == document || a.ownerDocument == preferredDoc && + contains( preferredDoc, a ) ) { + return -1; + } + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( b == document || b.ownerDocument == preferredDoc && + contains( preferredDoc, b ) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } : + function( a, b ) { + + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Parentless nodes are either documents or disconnected + if ( !aup || !bup ) { + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + /* eslint-disable eqeqeq */ + return a == document ? -1 : + b == document ? 1 : + /* eslint-enable eqeqeq */ + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( ( cur = cur.parentNode ) ) { + ap.unshift( cur ); + } + cur = b; + while ( ( cur = cur.parentNode ) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[ i ] === bp[ i ] ) { + i++; + } + + return i ? + + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[ i ], bp[ i ] ) : + + // Otherwise nodes in our document sort first + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + /* eslint-disable eqeqeq */ + ap[ i ] == preferredDoc ? -1 : + bp[ i ] == preferredDoc ? 1 : + /* eslint-enable eqeqeq */ + 0; + }; + + return document; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + setDocument( elem ); + + if ( support.matchesSelector && documentIsHTML && + !nonnativeSelectorCache[ expr + " " ] && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch ( e ) { + nonnativeSelectorCache( expr, true ); + } + } + + return Sizzle( expr, document, null, [ elem ] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + + // Set document vars if needed + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( ( context.ownerDocument || context ) != document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + + // Set document vars if needed + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( ( elem.ownerDocument || elem ) != document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val !== undefined ? + val : + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + ( val = elem.getAttributeNode( name ) ) && val.specified ? + val.value : + null; +}; + +Sizzle.escape = function( sel ) { + return ( sel + "" ).replace( rcssescape, fcssescape ); +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( ( elem = results[ i++ ] ) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + // Clear input after sorting to release objects + // See https://github.com/jquery/sizzle/pull/225 + sortInput = null; + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + + // If no nodeType, this is expected to be an array + while ( ( node = elem[ i++ ] ) ) { + + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + + // Use textContent for elements + // innerText usage removed for consistency of new lines (jQuery #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[ 1 ] = match[ 1 ].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[ 3 ] = ( match[ 3 ] || match[ 4 ] || + match[ 5 ] || "" ).replace( runescape, funescape ); + + if ( match[ 2 ] === "~=" ) { + match[ 3 ] = " " + match[ 3 ] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[ 1 ] = match[ 1 ].toLowerCase(); + + if ( match[ 1 ].slice( 0, 3 ) === "nth" ) { + + // nth-* requires argument + if ( !match[ 3 ] ) { + Sizzle.error( match[ 0 ] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[ 4 ] = +( match[ 4 ] ? + match[ 5 ] + ( match[ 6 ] || 1 ) : + 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) ); + match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" ); + + // other types prohibit arguments + } else if ( match[ 3 ] ) { + Sizzle.error( match[ 0 ] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[ 6 ] && match[ 2 ]; + + if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[ 3 ] ) { + match[ 2 ] = match[ 4 ] || match[ 5 ] || ""; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + + // Get excess from tokenize (recursively) + ( excess = tokenize( unquoted, true ) ) && + + // advance to the next closing parenthesis + ( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) { + + // excess is a negative index + match[ 0 ] = match[ 0 ].slice( 0, excess ); + match[ 2 ] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { + return true; + } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + ( pattern = new RegExp( "(^|" + whitespace + + ")" + className + "(" + whitespace + "|$)" ) ) && classCache( + className, function( elem ) { + return pattern.test( + typeof elem.className === "string" && elem.className || + typeof elem.getAttribute !== "undefined" && + elem.getAttribute( "class" ) || + "" + ); + } ); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + /* eslint-disable max-len */ + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + /* eslint-enable max-len */ + + }; + }, + + "CHILD": function( type, what, _argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, _context, xml ) { + var cache, uniqueCache, outerCache, node, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType, + diff = false; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( ( node = node[ dir ] ) ) { + if ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) { + + return false; + } + } + + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + + // Seek `elem` from a previously-cached index + + // ...in a gzip-friendly way + node = parent; + outerCache = node[ expando ] || ( node[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + ( outerCache[ node.uniqueID ] = {} ); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex && cache[ 2 ]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( ( node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + ( diff = nodeIndex = 0 ) || start.pop() ) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + } else { + + // Use previously-cached element index if available + if ( useCache ) { + + // ...in a gzip-friendly way + node = elem; + outerCache = node[ expando ] || ( node[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + ( outerCache[ node.uniqueID ] = {} ); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex; + } + + // xml :nth-child(...) + // or :nth-last-child(...) or :nth(-last)?-of-type(...) + if ( diff === false ) { + + // Use the same loop as above to seek `elem` from the start + while ( ( node = ++nodeIndex && node && node[ dir ] || + ( diff = nodeIndex = 0 ) || start.pop() ) ) { + + if ( ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) && + ++diff ) { + + // Cache the index of each encountered element + if ( useCache ) { + outerCache = node[ expando ] || + ( node[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + ( outerCache[ node.uniqueID ] = {} ); + + uniqueCache[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction( function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf( seed, matched[ i ] ); + seed[ idx ] = !( matches[ idx ] = matched[ i ] ); + } + } ) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + + // Potentially complex pseudos + "not": markFunction( function( selector ) { + + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction( function( seed, matches, _context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( ( elem = unmatched[ i ] ) ) { + seed[ i ] = !( matches[ i ] = elem ); + } + } + } ) : + function( elem, _context, xml ) { + input[ 0 ] = elem; + matcher( input, null, xml, results ); + + // Don't keep the element (issue #299) + input[ 0 ] = null; + return !results.pop(); + }; + } ), + + "has": markFunction( function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + } ), + + "contains": markFunction( function( text ) { + text = text.replace( runescape, funescape ); + return function( elem ) { + return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1; + }; + } ), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + + // lang value must be a valid identifier + if ( !ridentifier.test( lang || "" ) ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( ( elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( ( elem = elem.parentNode ) && elem.nodeType === 1 ); + return false; + }; + } ), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && + ( !document.hasFocus || document.hasFocus() ) && + !!( elem.type || elem.href || ~elem.tabIndex ); + }, + + // Boolean properties + "enabled": createDisabledPseudo( false ), + "disabled": createDisabledPseudo( true ), + + "checked": function( elem ) { + + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return ( nodeName === "input" && !!elem.checked ) || + ( nodeName === "option" && !!elem.selected ); + }, + + "selected": function( elem ) { + + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + // eslint-disable-next-line no-unused-expressions + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), + // but not by others (comment: 8; processing instruction: 7; etc.) + // nodeType < 6 works because attributes (2) do not appear as children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeType < 6 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos[ "empty" ]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + + // Support: IE<8 + // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" + ( ( attr = elem.getAttribute( "type" ) ) == null || + attr.toLowerCase() === "text" ); + }, + + // Position-in-collection + "first": createPositionalPseudo( function() { + return [ 0 ]; + } ), + + "last": createPositionalPseudo( function( _matchIndexes, length ) { + return [ length - 1 ]; + } ), + + "eq": createPositionalPseudo( function( _matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + } ), + + "even": createPositionalPseudo( function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + "odd": createPositionalPseudo( function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + "lt": createPositionalPseudo( function( matchIndexes, length, argument ) { + var i = argument < 0 ? + argument + length : + argument > length ? + length : + argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + "gt": createPositionalPseudo( function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ) + } +}; + +Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +tokenize = Sizzle.tokenize = function( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || ( match = rcomma.exec( soFar ) ) ) { + if ( match ) { + + // Don't consume trailing commas as valid + soFar = soFar.slice( match[ 0 ].length ) || soFar; + } + groups.push( ( tokens = [] ) ); + } + + matched = false; + + // Combinators + if ( ( match = rcombinators.exec( soFar ) ) ) { + matched = match.shift(); + tokens.push( { + value: matched, + + // Cast descendant combinators to space + type: match[ 0 ].replace( rtrim, " " ) + } ); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] || + ( match = preFilters[ type ]( match ) ) ) ) { + matched = match.shift(); + tokens.push( { + value: matched, + type: type, + matches: match + } ); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +}; + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[ i ].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + skip = combinator.next, + key = skip || dir, + checkNonElements = base && key === "parentNode", + doneName = done++; + + return combinator.first ? + + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + return false; + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var oldCache, uniqueCache, outerCache, + newCache = [ dirruns, doneName ]; + + // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching + if ( xml ) { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || ( elem[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ elem.uniqueID ] || + ( outerCache[ elem.uniqueID ] = {} ); + + if ( skip && skip === elem.nodeName.toLowerCase() ) { + elem = elem[ dir ] || elem; + } else if ( ( oldCache = uniqueCache[ key ] ) && + oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { + + // Assign to newCache so results back-propagate to previous elements + return ( newCache[ 2 ] = oldCache[ 2 ] ); + } else { + + // Reuse newcache so results back-propagate to previous elements + uniqueCache[ key ] = newCache; + + // A match means we're done; a fail means we have to keep checking + if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) { + return true; + } + } + } + } + } + return false; + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[ i ]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[ 0 ]; +} + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[ i ], results ); + } + return results; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( ( elem = unmatched[ i ] ) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction( function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( + selector || "*", + context.nodeType ? [ context ] : context, + [] + ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( ( elem = temp[ i ] ) ) { + matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem ); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( ( elem = matcherOut[ i ] ) ) { + + // Restore matcherIn since elem is not yet a final match + temp.push( ( matcherIn[ i ] = elem ) ); + } + } + postFinder( null, ( matcherOut = [] ), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( ( elem = matcherOut[ i ] ) && + ( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) { + + seed[ temp ] = !( results[ temp ] = elem ); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + } ); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[ 0 ].type ], + implicitRelative = leadingRelative || Expr.relative[ " " ], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + ( checkContext = context ).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + + // Avoid hanging onto element (issue #299) + checkContext = null; + return ret; + } ]; + + for ( ; i < len; i++ ) { + if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) { + matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ]; + } else { + matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[ j ].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens + .slice( 0, i - 1 ) + .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } ) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + var bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, outermost ) { + var elem, j, matcher, + matchedCount = 0, + i = "0", + unmatched = seed && [], + setMatched = [], + contextBackup = outermostContext, + + // We must always have either seed elements or outermost context + elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ), + + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ), + len = elems.length; + + if ( outermost ) { + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + outermostContext = context == document || context || outermost; + } + + // Add elements passing elementMatchers directly to results + // Support: IE<9, Safari + // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id + for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( !context && elem.ownerDocument != document ) { + setDocument( elem ); + xml = !documentIsHTML; + } + while ( ( matcher = elementMatchers[ j++ ] ) ) { + if ( matcher( elem, context || document, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + + // They will have gone through all possible matchers + if ( ( elem = !matcher && elem ) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // `i` is now the count of elements visited above, and adding it to `matchedCount` + // makes the latter nonnegative. + matchedCount += i; + + // Apply set filters to unmatched elements + // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` + // equals `i`), unless we didn't visit _any_ elements in the above loop because we have + // no element matchers and no seed. + // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that + // case, which will result in a "00" `matchedCount` that differs from `i` but is also + // numerically zero. + if ( bySet && i !== matchedCount ) { + j = 0; + while ( ( matcher = setMatchers[ j++ ] ) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !( unmatched[ i ] || setMatched[ i ] ) ) { + setMatched[ i ] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + + // Generate a function of recursive functions that can be used to check each element + if ( !match ) { + match = tokenize( selector ); + } + i = match.length; + while ( i-- ) { + cached = matcherFromTokens( match[ i ] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( + selector, + matcherFromGroupMatchers( elementMatchers, setMatchers ) + ); + + // Save selector and tokenization + cached.selector = selector; + } + return cached; +}; + +/** + * A low-level selection function that works with Sizzle's compiled + * selector functions + * @param {String|Function} selector A selector or a pre-compiled + * selector function built with Sizzle.compile + * @param {Element} context + * @param {Array} [results] + * @param {Array} [seed] A set of elements to match against + */ +select = Sizzle.select = function( selector, context, results, seed ) { + var i, tokens, token, type, find, + compiled = typeof selector === "function" && selector, + match = !seed && tokenize( ( selector = compiled.selector || selector ) ); + + results = results || []; + + // Try to minimize operations if there is only one selector in the list and no seed + // (the latter of which guarantees us context) + if ( match.length === 1 ) { + + // Reduce context if the leading compound selector is an ID + tokens = match[ 0 ] = match[ 0 ].slice( 0 ); + if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" && + context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) { + + context = ( Expr.find[ "ID" ]( token.matches[ 0 ] + .replace( runescape, funescape ), context ) || [] )[ 0 ]; + if ( !context ) { + return results; + + // Precompiled matchers will still verify ancestry, so step up a level + } else if ( compiled ) { + context = context.parentNode; + } + + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[ i ]; + + // Abort if we hit a combinator + if ( Expr.relative[ ( type = token.type ) ] ) { + break; + } + if ( ( find = Expr.find[ type ] ) ) { + + // Search, expanding context for leading sibling combinators + if ( ( seed = find( + token.matches[ 0 ].replace( runescape, funescape ), + rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) || + context + ) ) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + + // Compile and execute a filtering function if one is not provided + // Provide `match` to avoid retokenization if we modified the selector above + ( compiled || compile( selector, match ) )( + seed, + context, + !documentIsHTML, + results, + !context || rsibling.test( selector ) && testContext( context.parentNode ) || context + ); + return results; +}; + +// One-time assignments + +// Sort stability +support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando; + +// Support: Chrome 14-35+ +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = !!hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert( function( el ) { + + // Should return 1, but returns 4 (following) + return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1; +} ); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert( function( el ) { + el.innerHTML = ""; + return el.firstChild.getAttribute( "href" ) === "#"; +} ) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + } ); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert( function( el ) { + el.innerHTML = ""; + el.firstChild.setAttribute( "value", "" ); + return el.firstChild.getAttribute( "value" ) === ""; +} ) ) { + addHandle( "value", function( elem, _name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + } ); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert( function( el ) { + return el.getAttribute( "disabled" ) == null; +} ) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return elem[ name ] === true ? name.toLowerCase() : + ( val = elem.getAttributeNode( name ) ) && val.specified ? + val.value : + null; + } + } ); +} + +return Sizzle; + +} )( window ); + + + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; + +// Deprecated +jQuery.expr[ ":" ] = jQuery.expr.pseudos; +jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; +jQuery.escapeSelector = Sizzle.escape; + + + + +var dir = function( elem, dir, until ) { + var matched = [], + truncate = until !== undefined; + + while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { + if ( elem.nodeType === 1 ) { + if ( truncate && jQuery( elem ).is( until ) ) { + break; + } + matched.push( elem ); + } + } + return matched; +}; + + +var siblings = function( n, elem ) { + var matched = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + matched.push( n ); + } + } + + return matched; +}; + + +var rneedsContext = jQuery.expr.match.needsContext; + + + +function nodeName( elem, name ) { + + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + +} +var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); + + + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + return !!qualifier.call( elem, i, elem ) !== not; + } ); + } + + // Single element + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + } ); + } + + // Arraylike of elements (jQuery, arguments, Array) + if ( typeof qualifier !== "string" ) { + return jQuery.grep( elements, function( elem ) { + return ( indexOf.call( qualifier, elem ) > -1 ) !== not; + } ); + } + + // Filtered directly for both simple and complex selectors + return jQuery.filter( qualifier, elements, not ); +} + +jQuery.filter = function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + if ( elems.length === 1 && elem.nodeType === 1 ) { + return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; + } + + return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + } ) ); +}; + +jQuery.fn.extend( { + find: function( selector ) { + var i, ret, + len = this.length, + self = this; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter( function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + } ) ); + } + + ret = this.pushStack( [] ); + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + return len > 1 ? jQuery.uniqueSort( ret ) : ret; + }, + filter: function( selector ) { + return this.pushStack( winnow( this, selector || [], false ) ); + }, + not: function( selector ) { + return this.pushStack( winnow( this, selector || [], true ) ); + }, + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + } +} ); + + +// Initialize a jQuery object + + +// A central reference to the root jQuery(document) +var rootjQuery, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + // Shortcut simple #id case for speed + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, + + init = jQuery.fn.init = function( selector, context, root ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Method init() accepts an alternate rootjQuery + // so migrate can support jQuery.sub (gh-2101) + root = root || rootjQuery; + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector[ 0 ] === "<" && + selector[ selector.length - 1 ] === ">" && + selector.length >= 3 ) { + + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && ( match[ 1 ] || !context ) ) { + + // HANDLE: $(html) -> $(array) + if ( match[ 1 ] ) { + context = context instanceof jQuery ? context[ 0 ] : context; + + // Option to run scripts is true for back-compat + // Intentionally let the error be thrown if parseHTML is not present + jQuery.merge( this, jQuery.parseHTML( + match[ 1 ], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + + // Properties of context are called as methods if possible + if ( isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[ 2 ] ); + + if ( elem ) { + + // Inject the element directly into the jQuery object + this[ 0 ] = elem; + this.length = 1; + } + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || root ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this[ 0 ] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( isFunction( selector ) ) { + return root.ready !== undefined ? + root.ready( selector ) : + + // Execute immediately if ready is not present + selector( jQuery ); + } + + return jQuery.makeArray( selector, this ); + }; + +// Give the init function the jQuery prototype for later instantiation +init.prototype = jQuery.fn; + +// Initialize central reference +rootjQuery = jQuery( document ); + + +var rparentsprev = /^(?:parents|prev(?:Until|All))/, + + // Methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend( { + has: function( target ) { + var targets = jQuery( target, this ), + l = targets.length; + + return this.filter( function() { + var i = 0; + for ( ; i < l; i++ ) { + if ( jQuery.contains( this, targets[ i ] ) ) { + return true; + } + } + } ); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + matched = [], + targets = typeof selectors !== "string" && jQuery( selectors ); + + // Positional selectors never match, since there's no _selection_ context + if ( !rneedsContext.test( selectors ) ) { + for ( ; i < l; i++ ) { + for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { + + // Always skip document fragments + if ( cur.nodeType < 11 && ( targets ? + targets.index( cur ) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector( cur, selectors ) ) ) { + + matched.push( cur ); + break; + } + } + } + } + + return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); + }, + + // Determine the position of an element within the set + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; + } + + // Index in selector + if ( typeof elem === "string" ) { + return indexOf.call( jQuery( elem ), this[ 0 ] ); + } + + // Locate the position of the desired element + return indexOf.call( this, + + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[ 0 ] : elem + ); + }, + + add: function( selector, context ) { + return this.pushStack( + jQuery.uniqueSort( + jQuery.merge( this.get(), jQuery( selector, context ) ) + ) + ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + } +} ); + +function sibling( cur, dir ) { + while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} + return cur; +} + +jQuery.each( { + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, _i, until ) { + return dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, _i, until ) { + return dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, _i, until ) { + return dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return siblings( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return siblings( elem.firstChild ); + }, + contents: function( elem ) { + if ( elem.contentDocument != null && + + // Support: IE 11+ + // elements with no `data` attribute has an object + // `contentDocument` with a `null` prototype. + getProto( elem.contentDocument ) ) { + + return elem.contentDocument; + } + + // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only + // Treat the template element as a regular one in browsers that + // don't support it. + if ( nodeName( elem, "template" ) ) { + elem = elem.content || elem; + } + + return jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var matched = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + matched = jQuery.filter( selector, matched ); + } + + if ( this.length > 1 ) { + + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + jQuery.uniqueSort( matched ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + matched.reverse(); + } + } + + return this.pushStack( matched ); + }; +} ); +var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); + + + +// Convert String-formatted options into Object-formatted ones +function createOptions( options ) { + var object = {}; + jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { + object[ flag ] = true; + } ); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + createOptions( options ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + + // Last fire value for non-forgettable lists + memory, + + // Flag to know if list was already fired + fired, + + // Flag to prevent firing + locked, + + // Actual callback list + list = [], + + // Queue of execution data for repeatable lists + queue = [], + + // Index of currently firing callback (modified by add/remove as needed) + firingIndex = -1, + + // Fire callbacks + fire = function() { + + // Enforce single-firing + locked = locked || options.once; + + // Execute callbacks for all pending executions, + // respecting firingIndex overrides and runtime changes + fired = firing = true; + for ( ; queue.length; firingIndex = -1 ) { + memory = queue.shift(); + while ( ++firingIndex < list.length ) { + + // Run callback and check for early termination + if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && + options.stopOnFalse ) { + + // Jump to end and forget the data so .add doesn't re-fire + firingIndex = list.length; + memory = false; + } + } + } + + // Forget the data if we're done with it + if ( !options.memory ) { + memory = false; + } + + firing = false; + + // Clean up if we're done firing for good + if ( locked ) { + + // Keep an empty list if we have data for future add calls + if ( memory ) { + list = []; + + // Otherwise, this object is spent + } else { + list = ""; + } + } + }, + + // Actual Callbacks object + self = { + + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + + // If we have memory from a past run, we should fire after adding + if ( memory && !firing ) { + firingIndex = list.length - 1; + queue.push( memory ); + } + + ( function add( args ) { + jQuery.each( args, function( _, arg ) { + if ( isFunction( arg ) ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && toType( arg ) !== "string" ) { + + // Inspect recursively + add( arg ); + } + } ); + } )( arguments ); + + if ( memory && !firing ) { + fire(); + } + } + return this; + }, + + // Remove a callback from the list + remove: function() { + jQuery.each( arguments, function( _, arg ) { + var index; + while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + + // Handle firing indexes + if ( index <= firingIndex ) { + firingIndex--; + } + } + } ); + return this; + }, + + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? + jQuery.inArray( fn, list ) > -1 : + list.length > 0; + }, + + // Remove all callbacks from the list + empty: function() { + if ( list ) { + list = []; + } + return this; + }, + + // Disable .fire and .add + // Abort any current/pending executions + // Clear all callbacks and values + disable: function() { + locked = queue = []; + list = memory = ""; + return this; + }, + disabled: function() { + return !list; + }, + + // Disable .fire + // Also disable .add unless we have memory (since it would have no effect) + // Abort any pending executions + lock: function() { + locked = queue = []; + if ( !memory && !firing ) { + list = memory = ""; + } + return this; + }, + locked: function() { + return !!locked; + }, + + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( !locked ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + queue.push( args ); + if ( !firing ) { + fire(); + } + } + return this; + }, + + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; + + +function Identity( v ) { + return v; +} +function Thrower( ex ) { + throw ex; +} + +function adoptValue( value, resolve, reject, noValue ) { + var method; + + try { + + // Check for promise aspect first to privilege synchronous behavior + if ( value && isFunction( ( method = value.promise ) ) ) { + method.call( value ).done( resolve ).fail( reject ); + + // Other thenables + } else if ( value && isFunction( ( method = value.then ) ) ) { + method.call( value, resolve, reject ); + + // Other non-thenables + } else { + + // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: + // * false: [ value ].slice( 0 ) => resolve( value ) + // * true: [ value ].slice( 1 ) => resolve() + resolve.apply( undefined, [ value ].slice( noValue ) ); + } + + // For Promises/A+, convert exceptions into rejections + // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in + // Deferred#then to conditionally suppress rejection. + } catch ( value ) { + + // Support: Android 4.0 only + // Strict mode functions invoked without .call/.apply get global-object context + reject.apply( undefined, [ value ] ); + } +} + +jQuery.extend( { + + Deferred: function( func ) { + var tuples = [ + + // action, add listener, callbacks, + // ... .then handlers, argument index, [final state] + [ "notify", "progress", jQuery.Callbacks( "memory" ), + jQuery.Callbacks( "memory" ), 2 ], + [ "resolve", "done", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 0, "resolved" ], + [ "reject", "fail", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 1, "rejected" ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + "catch": function( fn ) { + return promise.then( null, fn ); + }, + + // Keep pipe for back-compat + pipe: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + + return jQuery.Deferred( function( newDefer ) { + jQuery.each( tuples, function( _i, tuple ) { + + // Map tuples (progress, done, fail) to arguments (done, fail, progress) + var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; + + // deferred.progress(function() { bind to newDefer or newDefer.notify }) + // deferred.done(function() { bind to newDefer or newDefer.resolve }) + // deferred.fail(function() { bind to newDefer or newDefer.reject }) + deferred[ tuple[ 1 ] ]( function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && isFunction( returned.promise ) ) { + returned.promise() + .progress( newDefer.notify ) + .done( newDefer.resolve ) + .fail( newDefer.reject ); + } else { + newDefer[ tuple[ 0 ] + "With" ]( + this, + fn ? [ returned ] : arguments + ); + } + } ); + } ); + fns = null; + } ).promise(); + }, + then: function( onFulfilled, onRejected, onProgress ) { + var maxDepth = 0; + function resolve( depth, deferred, handler, special ) { + return function() { + var that = this, + args = arguments, + mightThrow = function() { + var returned, then; + + // Support: Promises/A+ section 2.3.3.3.3 + // https://promisesaplus.com/#point-59 + // Ignore double-resolution attempts + if ( depth < maxDepth ) { + return; + } + + returned = handler.apply( that, args ); + + // Support: Promises/A+ section 2.3.1 + // https://promisesaplus.com/#point-48 + if ( returned === deferred.promise() ) { + throw new TypeError( "Thenable self-resolution" ); + } + + // Support: Promises/A+ sections 2.3.3.1, 3.5 + // https://promisesaplus.com/#point-54 + // https://promisesaplus.com/#point-75 + // Retrieve `then` only once + then = returned && + + // Support: Promises/A+ section 2.3.4 + // https://promisesaplus.com/#point-64 + // Only check objects and functions for thenability + ( typeof returned === "object" || + typeof returned === "function" ) && + returned.then; + + // Handle a returned thenable + if ( isFunction( then ) ) { + + // Special processors (notify) just wait for resolution + if ( special ) { + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ) + ); + + // Normal processors (resolve) also hook into progress + } else { + + // ...and disregard older resolution values + maxDepth++; + + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ), + resolve( maxDepth, deferred, Identity, + deferred.notifyWith ) + ); + } + + // Handle all other returned values + } else { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Identity ) { + that = undefined; + args = [ returned ]; + } + + // Process the value(s) + // Default process is resolve + ( special || deferred.resolveWith )( that, args ); + } + }, + + // Only normal processors (resolve) catch and reject exceptions + process = special ? + mightThrow : + function() { + try { + mightThrow(); + } catch ( e ) { + + if ( jQuery.Deferred.exceptionHook ) { + jQuery.Deferred.exceptionHook( e, + process.stackTrace ); + } + + // Support: Promises/A+ section 2.3.3.3.4.1 + // https://promisesaplus.com/#point-61 + // Ignore post-resolution exceptions + if ( depth + 1 >= maxDepth ) { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Thrower ) { + that = undefined; + args = [ e ]; + } + + deferred.rejectWith( that, args ); + } + } + }; + + // Support: Promises/A+ section 2.3.3.3.1 + // https://promisesaplus.com/#point-57 + // Re-resolve promises immediately to dodge false rejection from + // subsequent errors + if ( depth ) { + process(); + } else { + + // Call an optional hook to record the stack, in case of exception + // since it's otherwise lost when execution goes async + if ( jQuery.Deferred.getStackHook ) { + process.stackTrace = jQuery.Deferred.getStackHook(); + } + window.setTimeout( process ); + } + }; + } + + return jQuery.Deferred( function( newDefer ) { + + // progress_handlers.add( ... ) + tuples[ 0 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onProgress ) ? + onProgress : + Identity, + newDefer.notifyWith + ) + ); + + // fulfilled_handlers.add( ... ) + tuples[ 1 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onFulfilled ) ? + onFulfilled : + Identity + ) + ); + + // rejected_handlers.add( ... ) + tuples[ 2 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onRejected ) ? + onRejected : + Thrower + ) + ); + } ).promise(); + }, + + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 5 ]; + + // promise.progress = list.add + // promise.done = list.add + // promise.fail = list.add + promise[ tuple[ 1 ] ] = list.add; + + // Handle state + if ( stateString ) { + list.add( + function() { + + // state = "resolved" (i.e., fulfilled) + // state = "rejected" + state = stateString; + }, + + // rejected_callbacks.disable + // fulfilled_callbacks.disable + tuples[ 3 - i ][ 2 ].disable, + + // rejected_handlers.disable + // fulfilled_handlers.disable + tuples[ 3 - i ][ 3 ].disable, + + // progress_callbacks.lock + tuples[ 0 ][ 2 ].lock, + + // progress_handlers.lock + tuples[ 0 ][ 3 ].lock + ); + } + + // progress_handlers.fire + // fulfilled_handlers.fire + // rejected_handlers.fire + list.add( tuple[ 3 ].fire ); + + // deferred.notify = function() { deferred.notifyWith(...) } + // deferred.resolve = function() { deferred.resolveWith(...) } + // deferred.reject = function() { deferred.rejectWith(...) } + deferred[ tuple[ 0 ] ] = function() { + deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); + return this; + }; + + // deferred.notifyWith = list.fireWith + // deferred.resolveWith = list.fireWith + // deferred.rejectWith = list.fireWith + deferred[ tuple[ 0 ] + "With" ] = list.fireWith; + } ); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( singleValue ) { + var + + // count of uncompleted subordinates + remaining = arguments.length, + + // count of unprocessed arguments + i = remaining, + + // subordinate fulfillment data + resolveContexts = Array( i ), + resolveValues = slice.call( arguments ), + + // the primary Deferred + primary = jQuery.Deferred(), + + // subordinate callback factory + updateFunc = function( i ) { + return function( value ) { + resolveContexts[ i ] = this; + resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; + if ( !( --remaining ) ) { + primary.resolveWith( resolveContexts, resolveValues ); + } + }; + }; + + // Single- and empty arguments are adopted like Promise.resolve + if ( remaining <= 1 ) { + adoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject, + !remaining ); + + // Use .then() to unwrap secondary thenables (cf. gh-3000) + if ( primary.state() === "pending" || + isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { + + return primary.then(); + } + } + + // Multiple arguments are aggregated like Promise.all array elements + while ( i-- ) { + adoptValue( resolveValues[ i ], updateFunc( i ), primary.reject ); + } + + return primary.promise(); + } +} ); + + +// These usually indicate a programmer mistake during development, +// warn about them ASAP rather than swallowing them by default. +var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; + +jQuery.Deferred.exceptionHook = function( error, stack ) { + + // Support: IE 8 - 9 only + // Console exists when dev tools are open, which can happen at any time + if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { + window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); + } +}; + + + + +jQuery.readyException = function( error ) { + window.setTimeout( function() { + throw error; + } ); +}; + + + + +// The deferred used on DOM ready +var readyList = jQuery.Deferred(); + +jQuery.fn.ready = function( fn ) { + + readyList + .then( fn ) + + // Wrap jQuery.readyException in a function so that the lookup + // happens at the time of error handling instead of callback + // registration. + .catch( function( error ) { + jQuery.readyException( error ); + } ); + + return this; +}; + +jQuery.extend( { + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + } +} ); + +jQuery.ready.then = readyList.then; + +// The ready event handler and self cleanup method +function completed() { + document.removeEventListener( "DOMContentLoaded", completed ); + window.removeEventListener( "load", completed ); + jQuery.ready(); +} + +// Catch cases where $(document).ready() is called +// after the browser event has already occurred. +// Support: IE <=9 - 10 only +// Older IE sometimes signals "interactive" too soon +if ( document.readyState === "complete" || + ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { + + // Handle it asynchronously to allow scripts the opportunity to delay ready + window.setTimeout( jQuery.ready ); + +} else { + + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed ); +} + + + + +// Multifunctional method to get and set values of a collection +// The value/s can optionally be executed if it's a function +var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + len = elems.length, + bulk = key == null; + + // Sets many values + if ( toType( key ) === "object" ) { + chainable = true; + for ( i in key ) { + access( elems, fn, i, key[ i ], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, _key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < len; i++ ) { + fn( + elems[ i ], key, raw ? + value : + value.call( elems[ i ], i, fn( elems[ i ], key ) ) + ); + } + } + } + + if ( chainable ) { + return elems; + } + + // Gets + if ( bulk ) { + return fn.call( elems ); + } + + return len ? fn( elems[ 0 ], key ) : emptyGet; +}; + + +// Matches dashed string for camelizing +var rmsPrefix = /^-ms-/, + rdashAlpha = /-([a-z])/g; + +// Used by camelCase as callback to replace() +function fcamelCase( _all, letter ) { + return letter.toUpperCase(); +} + +// Convert dashed to camelCase; used by the css and data modules +// Support: IE <=9 - 11, Edge 12 - 15 +// Microsoft forgot to hump their vendor prefix (#9572) +function camelCase( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); +} +var acceptData = function( owner ) { + + // Accepts only: + // - Node + // - Node.ELEMENT_NODE + // - Node.DOCUMENT_NODE + // - Object + // - Any + return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); +}; + + + + +function Data() { + this.expando = jQuery.expando + Data.uid++; +} + +Data.uid = 1; + +Data.prototype = { + + cache: function( owner ) { + + // Check if the owner object already has a cache + var value = owner[ this.expando ]; + + // If not, create one + if ( !value ) { + value = {}; + + // We can accept data for non-element nodes in modern browsers, + // but we should not, see #8335. + // Always return an empty object. + if ( acceptData( owner ) ) { + + // If it is a node unlikely to be stringify-ed or looped over + // use plain assignment + if ( owner.nodeType ) { + owner[ this.expando ] = value; + + // Otherwise secure it in a non-enumerable property + // configurable must be true to allow the property to be + // deleted when data is removed + } else { + Object.defineProperty( owner, this.expando, { + value: value, + configurable: true + } ); + } + } + } + + return value; + }, + set: function( owner, data, value ) { + var prop, + cache = this.cache( owner ); + + // Handle: [ owner, key, value ] args + // Always use camelCase key (gh-2257) + if ( typeof data === "string" ) { + cache[ camelCase( data ) ] = value; + + // Handle: [ owner, { properties } ] args + } else { + + // Copy the properties one-by-one to the cache object + for ( prop in data ) { + cache[ camelCase( prop ) ] = data[ prop ]; + } + } + return cache; + }, + get: function( owner, key ) { + return key === undefined ? + this.cache( owner ) : + + // Always use camelCase key (gh-2257) + owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; + }, + access: function( owner, key, value ) { + + // In cases where either: + // + // 1. No key was specified + // 2. A string key was specified, but no value provided + // + // Take the "read" path and allow the get method to determine + // which value to return, respectively either: + // + // 1. The entire cache object + // 2. The data stored at the key + // + if ( key === undefined || + ( ( key && typeof key === "string" ) && value === undefined ) ) { + + return this.get( owner, key ); + } + + // When the key is not a string, or both a key and value + // are specified, set or extend (existing objects) with either: + // + // 1. An object of properties + // 2. A key and value + // + this.set( owner, key, value ); + + // Since the "set" path can have two possible entry points + // return the expected data based on which path was taken[*] + return value !== undefined ? value : key; + }, + remove: function( owner, key ) { + var i, + cache = owner[ this.expando ]; + + if ( cache === undefined ) { + return; + } + + if ( key !== undefined ) { + + // Support array or space separated string of keys + if ( Array.isArray( key ) ) { + + // If key is an array of keys... + // We always set camelCase keys, so remove that. + key = key.map( camelCase ); + } else { + key = camelCase( key ); + + // If a key with the spaces exists, use it. + // Otherwise, create an array by matching non-whitespace + key = key in cache ? + [ key ] : + ( key.match( rnothtmlwhite ) || [] ); + } + + i = key.length; + + while ( i-- ) { + delete cache[ key[ i ] ]; + } + } + + // Remove the expando if there's no more data + if ( key === undefined || jQuery.isEmptyObject( cache ) ) { + + // Support: Chrome <=35 - 45 + // Webkit & Blink performance suffers when deleting properties + // from DOM nodes, so set to undefined instead + // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) + if ( owner.nodeType ) { + owner[ this.expando ] = undefined; + } else { + delete owner[ this.expando ]; + } + } + }, + hasData: function( owner ) { + var cache = owner[ this.expando ]; + return cache !== undefined && !jQuery.isEmptyObject( cache ); + } +}; +var dataPriv = new Data(); + +var dataUser = new Data(); + + + +// Implementation Summary +// +// 1. Enforce API surface and semantic compatibility with 1.9.x branch +// 2. Improve the module's maintainability by reducing the storage +// paths to a single mechanism. +// 3. Use the same single mechanism to support "private" and "user" data. +// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) +// 5. Avoid exposing implementation details on user objects (eg. expando properties) +// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 + +var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, + rmultiDash = /[A-Z]/g; + +function getData( data ) { + if ( data === "true" ) { + return true; + } + + if ( data === "false" ) { + return false; + } + + if ( data === "null" ) { + return null; + } + + // Only convert to a number if it doesn't change the string + if ( data === +data + "" ) { + return +data; + } + + if ( rbrace.test( data ) ) { + return JSON.parse( data ); + } + + return data; +} + +function dataAttr( elem, key, data ) { + var name; + + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = getData( data ); + } catch ( e ) {} + + // Make sure we set the data so it isn't changed later + dataUser.set( elem, key, data ); + } else { + data = undefined; + } + } + return data; +} + +jQuery.extend( { + hasData: function( elem ) { + return dataUser.hasData( elem ) || dataPriv.hasData( elem ); + }, + + data: function( elem, name, data ) { + return dataUser.access( elem, name, data ); + }, + + removeData: function( elem, name ) { + dataUser.remove( elem, name ); + }, + + // TODO: Now that all calls to _data and _removeData have been replaced + // with direct calls to dataPriv methods, these can be deprecated. + _data: function( elem, name, data ) { + return dataPriv.access( elem, name, data ); + }, + + _removeData: function( elem, name ) { + dataPriv.remove( elem, name ); + } +} ); + +jQuery.fn.extend( { + data: function( key, value ) { + var i, name, data, + elem = this[ 0 ], + attrs = elem && elem.attributes; + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = dataUser.get( elem ); + + if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { + i = attrs.length; + while ( i-- ) { + + // Support: IE 11 only + // The attrs elements can be null (#14894) + if ( attrs[ i ] ) { + name = attrs[ i ].name; + if ( name.indexOf( "data-" ) === 0 ) { + name = camelCase( name.slice( 5 ) ); + dataAttr( elem, name, data[ name ] ); + } + } + } + dataPriv.set( elem, "hasDataAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each( function() { + dataUser.set( this, key ); + } ); + } + + return access( this, function( value ) { + var data; + + // The calling jQuery object (element matches) is not empty + // (and therefore has an element appears at this[ 0 ]) and the + // `value` parameter was not undefined. An empty jQuery object + // will result in `undefined` for elem = this[ 0 ] which will + // throw an exception if an attempt to read a data cache is made. + if ( elem && value === undefined ) { + + // Attempt to get data from the cache + // The key will always be camelCased in Data + data = dataUser.get( elem, key ); + if ( data !== undefined ) { + return data; + } + + // Attempt to "discover" the data in + // HTML5 custom data-* attrs + data = dataAttr( elem, key ); + if ( data !== undefined ) { + return data; + } + + // We tried really hard, but the data doesn't exist. + return; + } + + // Set the data... + this.each( function() { + + // We always store the camelCased key + dataUser.set( this, key, value ); + } ); + }, null, value, arguments.length > 1, null, true ); + }, + + removeData: function( key ) { + return this.each( function() { + dataUser.remove( this, key ); + } ); + } +} ); + + +jQuery.extend( { + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = dataPriv.get( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || Array.isArray( data ) ) { + queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // Clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // Not public - generate a queueHooks object, or return the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { + empty: jQuery.Callbacks( "once memory" ).add( function() { + dataPriv.remove( elem, [ type + "queue", key ] ); + } ) + } ); + } +} ); + +jQuery.fn.extend( { + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[ 0 ], type ); + } + + return data === undefined ? + this : + this.each( function() { + var queue = jQuery.queue( this, type, data ); + + // Ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + } ); + }, + dequeue: function( type ) { + return this.each( function() { + jQuery.dequeue( this, type ); + } ); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while ( i-- ) { + tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +} ); +var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; + +var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); + + +var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; + +var documentElement = document.documentElement; + + + + var isAttached = function( elem ) { + return jQuery.contains( elem.ownerDocument, elem ); + }, + composed = { composed: true }; + + // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only + // Check attachment across shadow DOM boundaries when possible (gh-3504) + // Support: iOS 10.0-10.2 only + // Early iOS 10 versions support `attachShadow` but not `getRootNode`, + // leading to errors. We need to check for `getRootNode`. + if ( documentElement.getRootNode ) { + isAttached = function( elem ) { + return jQuery.contains( elem.ownerDocument, elem ) || + elem.getRootNode( composed ) === elem.ownerDocument; + }; + } +var isHiddenWithinTree = function( elem, el ) { + + // isHiddenWithinTree might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + + // Inline style trumps all + return elem.style.display === "none" || + elem.style.display === "" && + + // Otherwise, check computed style + // Support: Firefox <=43 - 45 + // Disconnected elements can have computed display: none, so first confirm that elem is + // in the document. + isAttached( elem ) && + + jQuery.css( elem, "display" ) === "none"; + }; + + + +function adjustCSS( elem, prop, valueParts, tween ) { + var adjusted, scale, + maxIterations = 20, + currentValue = tween ? + function() { + return tween.cur(); + } : + function() { + return jQuery.css( elem, prop, "" ); + }, + initial = currentValue(), + unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), + + // Starting value computation is required for potential unit mismatches + initialInUnit = elem.nodeType && + ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && + rcssNum.exec( jQuery.css( elem, prop ) ); + + if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { + + // Support: Firefox <=54 + // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) + initial = initial / 2; + + // Trust units reported by jQuery.css + unit = unit || initialInUnit[ 3 ]; + + // Iteratively approximate from a nonzero starting point + initialInUnit = +initial || 1; + + while ( maxIterations-- ) { + + // Evaluate and update our best guess (doubling guesses that zero out). + // Finish if the scale equals or crosses 1 (making the old*new product non-positive). + jQuery.style( elem, prop, initialInUnit + unit ); + if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { + maxIterations = 0; + } + initialInUnit = initialInUnit / scale; + + } + + initialInUnit = initialInUnit * 2; + jQuery.style( elem, prop, initialInUnit + unit ); + + // Make sure we update the tween properties later on + valueParts = valueParts || []; + } + + if ( valueParts ) { + initialInUnit = +initialInUnit || +initial || 0; + + // Apply relative offset (+=/-=) if specified + adjusted = valueParts[ 1 ] ? + initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : + +valueParts[ 2 ]; + if ( tween ) { + tween.unit = unit; + tween.start = initialInUnit; + tween.end = adjusted; + } + } + return adjusted; +} + + +var defaultDisplayMap = {}; + +function getDefaultDisplay( elem ) { + var temp, + doc = elem.ownerDocument, + nodeName = elem.nodeName, + display = defaultDisplayMap[ nodeName ]; + + if ( display ) { + return display; + } + + temp = doc.body.appendChild( doc.createElement( nodeName ) ); + display = jQuery.css( temp, "display" ); + + temp.parentNode.removeChild( temp ); + + if ( display === "none" ) { + display = "block"; + } + defaultDisplayMap[ nodeName ] = display; + + return display; +} + +function showHide( elements, show ) { + var display, elem, + values = [], + index = 0, + length = elements.length; + + // Determine new display value for elements that need to change + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + + display = elem.style.display; + if ( show ) { + + // Since we force visibility upon cascade-hidden elements, an immediate (and slow) + // check is required in this first loop unless we have a nonempty display value (either + // inline or about-to-be-restored) + if ( display === "none" ) { + values[ index ] = dataPriv.get( elem, "display" ) || null; + if ( !values[ index ] ) { + elem.style.display = ""; + } + } + if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { + values[ index ] = getDefaultDisplay( elem ); + } + } else { + if ( display !== "none" ) { + values[ index ] = "none"; + + // Remember what we're overwriting + dataPriv.set( elem, "display", display ); + } + } + } + + // Set the display of the elements in a second loop to avoid constant reflow + for ( index = 0; index < length; index++ ) { + if ( values[ index ] != null ) { + elements[ index ].style.display = values[ index ]; + } + } + + return elements; +} + +jQuery.fn.extend( { + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state ) { + if ( typeof state === "boolean" ) { + return state ? this.show() : this.hide(); + } + + return this.each( function() { + if ( isHiddenWithinTree( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + } ); + } +} ); +var rcheckableType = ( /^(?:checkbox|radio)$/i ); + +var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); + +var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); + + + +( function() { + var fragment = document.createDocumentFragment(), + div = fragment.appendChild( document.createElement( "div" ) ), + input = document.createElement( "input" ); + + // Support: Android 4.0 - 4.3 only + // Check state lost if the name is set (#11217) + // Support: Windows Web Apps (WWA) + // `name` and `type` must use .setAttribute for WWA (#14901) + input.setAttribute( "type", "radio" ); + input.setAttribute( "checked", "checked" ); + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + + // Support: Android <=4.1 only + // Older WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE <=11 only + // Make sure textarea (and checkbox) defaultValue is properly cloned + div.innerHTML = ""; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; + + // Support: IE <=9 only + // IE <=9 replaces "; + support.option = !!div.lastChild; +} )(); + + +// We have to close these tags to support XHTML (#13200) +var wrapMap = { + + // XHTML parsers do not magically insert elements in the + // same way that tag soup parsers do. So we cannot shorten + // this by omitting or other required elements. + thead: [ 1, "", "
" ], + col: [ 2, "", "
" ], + tr: [ 2, "", "
" ], + td: [ 3, "", "
" ], + + _default: [ 0, "", "" ] +}; + +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// Support: IE <=9 only +if ( !support.option ) { + wrapMap.optgroup = wrapMap.option = [ 1, "" ]; +} + + +function getAll( context, tag ) { + + // Support: IE <=9 - 11 only + // Use typeof to avoid zero-argument method invocation on host objects (#15151) + var ret; + + if ( typeof context.getElementsByTagName !== "undefined" ) { + ret = context.getElementsByTagName( tag || "*" ); + + } else if ( typeof context.querySelectorAll !== "undefined" ) { + ret = context.querySelectorAll( tag || "*" ); + + } else { + ret = []; + } + + if ( tag === undefined || tag && nodeName( context, tag ) ) { + return jQuery.merge( [ context ], ret ); + } + + return ret; +} + + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + dataPriv.set( + elems[ i ], + "globalEval", + !refElements || dataPriv.get( refElements[ i ], "globalEval" ) + ); + } +} + + +var rhtml = /<|&#?\w+;/; + +function buildFragment( elems, context, scripts, selection, ignored ) { + var elem, tmp, tag, wrap, attached, j, + fragment = context.createDocumentFragment(), + nodes = [], + i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( toType( elem ) === "object" ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; + + // Descend through wrappers to the right content + j = wrap[ 0 ]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, tmp.childNodes ); + + // Remember the top-level container + tmp = fragment.firstChild; + + // Ensure the created nodes are orphaned (#12392) + tmp.textContent = ""; + } + } + } + + // Remove wrapper from fragment + fragment.textContent = ""; + + i = 0; + while ( ( elem = nodes[ i++ ] ) ) { + + // Skip elements already in the context collection (trac-4087) + if ( selection && jQuery.inArray( elem, selection ) > -1 ) { + if ( ignored ) { + ignored.push( elem ); + } + continue; + } + + attached = isAttached( elem ); + + // Append to fragment + tmp = getAll( fragment.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( attached ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( ( elem = tmp[ j++ ] ) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + return fragment; +} + + +var rtypenamespace = /^([^.]*)(?:\.(.+)|)/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +// Support: IE <=9 - 11+ +// focus() and blur() are asynchronous, except when they are no-op. +// So expect focus to be synchronous when the element is already active, +// and blur to be synchronous when the element is not already active. +// (focus and blur are always synchronous in other supported browsers, +// this just defines when we can count on it). +function expectSync( elem, type ) { + return ( elem === safeActiveElement() ) === ( type === "focus" ); +} + +// Support: IE <=9 only +// Accessing document.activeElement can throw unexpectedly +// https://bugs.jquery.com/ticket/13393 +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +function on( elem, types, selector, data, fn, one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + on( elem, type, selector, data, types[ type ], one ); + } + return elem; + } + + if ( data == null && fn == null ) { + + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return elem; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return elem.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + } ); +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + + var handleObjIn, eventHandle, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.get( elem ); + + // Only attach events to objects that accept data + if ( !acceptData( elem ) ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Ensure that invalid selectors throw exceptions at attach time + // Evaluate against documentElement in case elem is a non-element node (e.g., document) + if ( selector ) { + jQuery.find.matchesSelector( documentElement, selector ); + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !( events = elemData.events ) ) { + events = elemData.events = Object.create( null ); + } + if ( !( eventHandle = elemData.handle ) ) { + eventHandle = elemData.handle = function( e ) { + + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? + jQuery.event.dispatch.apply( elem, arguments ) : undefined; + }; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend( { + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join( "." ) + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !( handlers = events[ type ] ) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener if the special events handler returns false + if ( !special.setup || + special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var j, origCount, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); + + if ( !elemData || !( events = elemData.events ) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[ 2 ] && + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || + selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || + special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove data and the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + dataPriv.remove( elem, "handle events" ); + } + }, + + dispatch: function( nativeEvent ) { + + var i, j, ret, matched, handleObj, handlerQueue, + args = new Array( arguments.length ), + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( nativeEvent ), + + handlers = ( + dataPriv.get( this, "events" ) || Object.create( null ) + )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[ 0 ] = event; + + for ( i = 1; i < arguments.length; i++ ) { + args[ i ] = arguments[ i ]; + } + + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( ( handleObj = matched.handlers[ j++ ] ) && + !event.isImmediatePropagationStopped() ) { + + // If the event is namespaced, then each handler is only invoked if it is + // specially universal or its namespaces are a superset of the event's. + if ( !event.rnamespace || handleObj.namespace === false || + event.rnamespace.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || + handleObj.handler ).apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( ( event.result = ret ) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var i, handleObj, sel, matchedHandlers, matchedSelectors, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + if ( delegateCount && + + // Support: IE <=9 + // Black-hole SVG instance trees (trac-13180) + cur.nodeType && + + // Support: Firefox <=42 + // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) + // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click + // Support: IE 11 only + // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) + !( event.type === "click" && event.button >= 1 ) ) { + + for ( ; cur !== this; cur = cur.parentNode || this ) { + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { + matchedHandlers = []; + matchedSelectors = {}; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matchedSelectors[ sel ] === undefined ) { + matchedSelectors[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) > -1 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matchedSelectors[ sel ] ) { + matchedHandlers.push( handleObj ); + } + } + if ( matchedHandlers.length ) { + handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); + } + } + } + } + + // Add the remaining (directly-bound) handlers + cur = this; + if ( delegateCount < handlers.length ) { + handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); + } + + return handlerQueue; + }, + + addProp: function( name, hook ) { + Object.defineProperty( jQuery.Event.prototype, name, { + enumerable: true, + configurable: true, + + get: isFunction( hook ) ? + function() { + if ( this.originalEvent ) { + return hook( this.originalEvent ); + } + } : + function() { + if ( this.originalEvent ) { + return this.originalEvent[ name ]; + } + }, + + set: function( value ) { + Object.defineProperty( this, name, { + enumerable: true, + configurable: true, + writable: true, + value: value + } ); + } + } ); + }, + + fix: function( originalEvent ) { + return originalEvent[ jQuery.expando ] ? + originalEvent : + new jQuery.Event( originalEvent ); + }, + + special: { + load: { + + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + click: { + + // Utilize native event to ensure correct state for checkable inputs + setup: function( data ) { + + // For mutual compressibility with _default, replace `this` access with a local var. + // `|| data` is dead code meant only to preserve the variable through minification. + var el = this || data; + + // Claim the first handler + if ( rcheckableType.test( el.type ) && + el.click && nodeName( el, "input" ) ) { + + // dataPriv.set( el, "click", ... ) + leverageNative( el, "click", returnTrue ); + } + + // Return false to allow normal processing in the caller + return false; + }, + trigger: function( data ) { + + // For mutual compressibility with _default, replace `this` access with a local var. + // `|| data` is dead code meant only to preserve the variable through minification. + var el = this || data; + + // Force setup before triggering a click + if ( rcheckableType.test( el.type ) && + el.click && nodeName( el, "input" ) ) { + + leverageNative( el, "click" ); + } + + // Return non-false to allow normal event-path propagation + return true; + }, + + // For cross-browser consistency, suppress native .click() on links + // Also prevent it if we're currently inside a leveraged native-event stack + _default: function( event ) { + var target = event.target; + return rcheckableType.test( target.type ) && + target.click && nodeName( target, "input" ) && + dataPriv.get( target, "click" ) || + nodeName( target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if ( event.result !== undefined && event.originalEvent ) { + event.originalEvent.returnValue = event.result; + } + } + } + } +}; + +// Ensure the presence of an event listener that handles manually-triggered +// synthetic events by interrupting progress until reinvoked in response to +// *native* events that it fires directly, ensuring that state changes have +// already occurred before other listeners are invoked. +function leverageNative( el, type, expectSync ) { + + // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add + if ( !expectSync ) { + if ( dataPriv.get( el, type ) === undefined ) { + jQuery.event.add( el, type, returnTrue ); + } + return; + } + + // Register the controller as a special universal handler for all event namespaces + dataPriv.set( el, type, false ); + jQuery.event.add( el, type, { + namespace: false, + handler: function( event ) { + var notAsync, result, + saved = dataPriv.get( this, type ); + + if ( ( event.isTrigger & 1 ) && this[ type ] ) { + + // Interrupt processing of the outer synthetic .trigger()ed event + // Saved data should be false in such cases, but might be a leftover capture object + // from an async native handler (gh-4350) + if ( !saved.length ) { + + // Store arguments for use when handling the inner native event + // There will always be at least one argument (an event object), so this array + // will not be confused with a leftover capture object. + saved = slice.call( arguments ); + dataPriv.set( this, type, saved ); + + // Trigger the native event and capture its result + // Support: IE <=9 - 11+ + // focus() and blur() are asynchronous + notAsync = expectSync( this, type ); + this[ type ](); + result = dataPriv.get( this, type ); + if ( saved !== result || notAsync ) { + dataPriv.set( this, type, false ); + } else { + result = {}; + } + if ( saved !== result ) { + + // Cancel the outer synthetic event + event.stopImmediatePropagation(); + event.preventDefault(); + + // Support: Chrome 86+ + // In Chrome, if an element having a focusout handler is blurred by + // clicking outside of it, it invokes the handler synchronously. If + // that handler calls `.remove()` on the element, the data is cleared, + // leaving `result` undefined. We need to guard against this. + return result && result.value; + } + + // If this is an inner synthetic event for an event with a bubbling surrogate + // (focus or blur), assume that the surrogate already propagated from triggering the + // native event and prevent that from happening again here. + // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the + // bubbling surrogate propagates *after* the non-bubbling base), but that seems + // less bad than duplication. + } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { + event.stopPropagation(); + } + + // If this is a native event triggered above, everything is now in order + // Fire an inner synthetic event with the original arguments + } else if ( saved.length ) { + + // ...and capture the result + dataPriv.set( this, type, { + value: jQuery.event.trigger( + + // Support: IE <=9 - 11+ + // Extend with the prototype to reset the above stopImmediatePropagation() + jQuery.extend( saved[ 0 ], jQuery.Event.prototype ), + saved.slice( 1 ), + this + ) + } ); + + // Abort handling of the native event + event.stopImmediatePropagation(); + } + } + } ); +} + +jQuery.removeEvent = function( elem, type, handle ) { + + // This "if" is needed for plain objects + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle ); + } +}; + +jQuery.Event = function( src, props ) { + + // Allow instantiation without the 'new' keyword + if ( !( this instanceof jQuery.Event ) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = src.defaultPrevented || + src.defaultPrevented === undefined && + + // Support: Android <=2.3 only + src.returnValue === false ? + returnTrue : + returnFalse; + + // Create target properties + // Support: Safari <=6 - 7 only + // Target should not be a text node (#504, #13143) + this.target = ( src.target && src.target.nodeType === 3 ) ? + src.target.parentNode : + src.target; + + this.currentTarget = src.currentTarget; + this.relatedTarget = src.relatedTarget; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || Date.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + constructor: jQuery.Event, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + isSimulated: false, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + + if ( e && !this.isSimulated ) { + e.preventDefault(); + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopPropagation(); + } + }, + stopImmediatePropagation: function() { + var e = this.originalEvent; + + this.isImmediatePropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopImmediatePropagation(); + } + + this.stopPropagation(); + } +}; + +// Includes all common event props including KeyEvent and MouseEvent specific props +jQuery.each( { + altKey: true, + bubbles: true, + cancelable: true, + changedTouches: true, + ctrlKey: true, + detail: true, + eventPhase: true, + metaKey: true, + pageX: true, + pageY: true, + shiftKey: true, + view: true, + "char": true, + code: true, + charCode: true, + key: true, + keyCode: true, + button: true, + buttons: true, + clientX: true, + clientY: true, + offsetX: true, + offsetY: true, + pointerId: true, + pointerType: true, + screenX: true, + screenY: true, + targetTouches: true, + toElement: true, + touches: true, + which: true +}, jQuery.event.addProp ); + +jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { + jQuery.event.special[ type ] = { + + // Utilize native event if possible so blur/focus sequence is correct + setup: function() { + + // Claim the first handler + // dataPriv.set( this, "focus", ... ) + // dataPriv.set( this, "blur", ... ) + leverageNative( this, type, expectSync ); + + // Return false to allow normal processing in the caller + return false; + }, + trigger: function() { + + // Force setup before trigger + leverageNative( this, type ); + + // Return non-false to allow normal event-path propagation + return true; + }, + + // Suppress native focus or blur as it's already being fired + // in leverageNative. + _default: function() { + return true; + }, + + delegateType: delegateType + }; +} ); + +// Create mouseenter/leave events using mouseover/out and event-time checks +// so that event delegation works in jQuery. +// Do the same for pointerenter/pointerleave and pointerover/pointerout +// +// Support: Safari 7 only +// Safari sends mouseenter too often; see: +// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 +// for the description of the bug (it existed in older Chrome versions as well). +jQuery.each( { + mouseenter: "mouseover", + mouseleave: "mouseout", + pointerenter: "pointerover", + pointerleave: "pointerout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mouseenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +} ); + +jQuery.fn.extend( { + + on: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn ); + }, + one: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? + handleObj.origType + "." + handleObj.namespace : + handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each( function() { + jQuery.event.remove( this, types, fn, selector ); + } ); + } +} ); + + +var + + // Support: IE <=10 - 11, Edge 12 - 13 only + // In IE/Edge using regex groups here causes severe slowdowns. + // See https://connect.microsoft.com/IE/feedback/details/1736512/ + rnoInnerhtml = /\s*$/g; + +// Prefer a tbody over its parent table for containing new rows +function manipulationTarget( elem, content ) { + if ( nodeName( elem, "table" ) && + nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { + + return jQuery( elem ).children( "tbody" )[ 0 ] || elem; + } + + return elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { + elem.type = elem.type.slice( 5 ); + } else { + elem.removeAttribute( "type" ); + } + + return elem; +} + +function cloneCopyEvent( src, dest ) { + var i, l, type, pdataOld, udataOld, udataCur, events; + + if ( dest.nodeType !== 1 ) { + return; + } + + // 1. Copy private data: events, handlers, etc. + if ( dataPriv.hasData( src ) ) { + pdataOld = dataPriv.get( src ); + events = pdataOld.events; + + if ( events ) { + dataPriv.remove( dest, "handle events" ); + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + } + + // 2. Copy user data + if ( dataUser.hasData( src ) ) { + udataOld = dataUser.access( src ); + udataCur = jQuery.extend( {}, udataOld ); + + dataUser.set( dest, udataCur ); + } +} + +// Fix IE bugs, see support tests +function fixInput( src, dest ) { + var nodeName = dest.nodeName.toLowerCase(); + + // Fails to persist the checked state of a cloned checkbox or radio button. + if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + dest.checked = src.checked; + + // Fails to return the selected option to the default selected state when cloning options + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +function domManip( collection, args, callback, ignored ) { + + // Flatten any nested arrays + args = flat( args ); + + var fragment, first, scripts, hasScripts, node, doc, + i = 0, + l = collection.length, + iNoClone = l - 1, + value = args[ 0 ], + valueIsFunction = isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( valueIsFunction || + ( l > 1 && typeof value === "string" && + !support.checkClone && rchecked.test( value ) ) ) { + return collection.each( function( index ) { + var self = collection.eq( index ); + if ( valueIsFunction ) { + args[ 0 ] = value.call( this, index, self.html() ); + } + domManip( self, args, callback, ignored ); + } ); + } + + if ( l ) { + fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + // Require either new content or an interest in ignored elements to invoke the callback + if ( first || ignored ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item + // instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( collection[ i ], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !dataPriv.access( node, "globalEval" ) && + jQuery.contains( doc, node ) ) { + + if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { + + // Optional AJAX dependency, but won't run scripts if not present + if ( jQuery._evalUrl && !node.noModule ) { + jQuery._evalUrl( node.src, { + nonce: node.nonce || node.getAttribute( "nonce" ) + }, doc ); + } + } else { + DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); + } + } + } + } + } + } + + return collection; +} + +function remove( elem, selector, keepData ) { + var node, + nodes = selector ? jQuery.filter( selector, elem ) : elem, + i = 0; + + for ( ; ( node = nodes[ i ] ) != null; i++ ) { + if ( !keepData && node.nodeType === 1 ) { + jQuery.cleanData( getAll( node ) ); + } + + if ( node.parentNode ) { + if ( keepData && isAttached( node ) ) { + setGlobalEval( getAll( node, "script" ) ); + } + node.parentNode.removeChild( node ); + } + } + + return elem; +} + +jQuery.extend( { + htmlPrefilter: function( html ) { + return html; + }, + + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var i, l, srcElements, destElements, + clone = elem.cloneNode( true ), + inPage = isAttached( elem ); + + // Fix IE cloning issues + if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && + !jQuery.isXMLDoc( elem ) ) { + + // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + fixInput( srcElements[ i ], destElements[ i ] ); + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + cloneCopyEvent( srcElements[ i ], destElements[ i ] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + // Return the cloned set + return clone; + }, + + cleanData: function( elems ) { + var data, elem, type, + special = jQuery.event.special, + i = 0; + + for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { + if ( acceptData( elem ) ) { + if ( ( data = elem[ dataPriv.expando ] ) ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataPriv.expando ] = undefined; + } + if ( elem[ dataUser.expando ] ) { + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataUser.expando ] = undefined; + } + } + } + } +} ); + +jQuery.fn.extend( { + detach: function( selector ) { + return remove( this, selector, true ); + }, + + remove: function( selector ) { + return remove( this, selector ); + }, + + text: function( value ) { + return access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().each( function() { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + this.textContent = value; + } + } ); + }, null, value, arguments.length ); + }, + + append: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + } ); + }, + + prepend: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + } ); + }, + + before: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + } ); + }, + + after: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + } ); + }, + + empty: function() { + var elem, + i = 0; + + for ( ; ( elem = this[ i ] ) != null; i++ ) { + if ( elem.nodeType === 1 ) { + + // Prevent memory leaks + jQuery.cleanData( getAll( elem, false ) ); + + // Remove any remaining nodes + elem.textContent = ""; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function() { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + } ); + }, + + html: function( value ) { + return access( this, function( value ) { + var elem = this[ 0 ] || {}, + i = 0, + l = this.length; + + if ( value === undefined && elem.nodeType === 1 ) { + return elem.innerHTML; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { + + value = jQuery.htmlPrefilter( value ); + + try { + for ( ; i < l; i++ ) { + elem = this[ i ] || {}; + + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch ( e ) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var ignored = []; + + // Make the changes, replacing each non-ignored context element with the new content + return domManip( this, arguments, function( elem ) { + var parent = this.parentNode; + + if ( jQuery.inArray( this, ignored ) < 0 ) { + jQuery.cleanData( getAll( this ) ); + if ( parent ) { + parent.replaceChild( elem, this ); + } + } + + // Force callback invocation + }, ignored ); + } +} ); + +jQuery.each( { + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1, + i = 0; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone( true ); + jQuery( insert[ i ] )[ original ]( elems ); + + // Support: Android <=4.0 only, PhantomJS 1 only + // .get() because push.apply(_, arraylike) throws on ancient WebKit + push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +} ); +var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); + +var getStyles = function( elem ) { + + // Support: IE <=11 only, Firefox <=30 (#15098, #14150) + // IE throws on elements created in popups + // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" + var view = elem.ownerDocument.defaultView; + + if ( !view || !view.opener ) { + view = window; + } + + return view.getComputedStyle( elem ); + }; + +var swap = function( elem, options, callback ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.call( elem ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; +}; + + +var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); + + + +( function() { + + // Executing both pixelPosition & boxSizingReliable tests require only one layout + // so they're executed at the same time to save the second computation. + function computeStyleTests() { + + // This is a singleton, we need to execute it only once + if ( !div ) { + return; + } + + container.style.cssText = "position:absolute;left:-11111px;width:60px;" + + "margin-top:1px;padding:0;border:0"; + div.style.cssText = + "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + + "margin:auto;border:1px;padding:1px;" + + "width:60%;top:1%"; + documentElement.appendChild( container ).appendChild( div ); + + var divStyle = window.getComputedStyle( div ); + pixelPositionVal = divStyle.top !== "1%"; + + // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 + reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; + + // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 + // Some styles come back with percentage values, even though they shouldn't + div.style.right = "60%"; + pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; + + // Support: IE 9 - 11 only + // Detect misreporting of content dimensions for box-sizing:border-box elements + boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; + + // Support: IE 9 only + // Detect overflow:scroll screwiness (gh-3699) + // Support: Chrome <=64 + // Don't get tricked when zoom affects offsetWidth (gh-4029) + div.style.position = "absolute"; + scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; + + documentElement.removeChild( container ); + + // Nullify the div so it wouldn't be stored in the memory and + // it will also be a sign that checks already performed + div = null; + } + + function roundPixelMeasures( measure ) { + return Math.round( parseFloat( measure ) ); + } + + var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, + reliableTrDimensionsVal, reliableMarginLeftVal, + container = document.createElement( "div" ), + div = document.createElement( "div" ); + + // Finish early in limited (non-browser) environments + if ( !div.style ) { + return; + } + + // Support: IE <=9 - 11 only + // Style of cloned element affects source element cloned (#8908) + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + + jQuery.extend( support, { + boxSizingReliable: function() { + computeStyleTests(); + return boxSizingReliableVal; + }, + pixelBoxStyles: function() { + computeStyleTests(); + return pixelBoxStylesVal; + }, + pixelPosition: function() { + computeStyleTests(); + return pixelPositionVal; + }, + reliableMarginLeft: function() { + computeStyleTests(); + return reliableMarginLeftVal; + }, + scrollboxSize: function() { + computeStyleTests(); + return scrollboxSizeVal; + }, + + // Support: IE 9 - 11+, Edge 15 - 18+ + // IE/Edge misreport `getComputedStyle` of table rows with width/height + // set in CSS while `offset*` properties report correct values. + // Behavior in IE 9 is more subtle than in newer versions & it passes + // some versions of this test; make sure not to make it pass there! + // + // Support: Firefox 70+ + // Only Firefox includes border widths + // in computed dimensions. (gh-4529) + reliableTrDimensions: function() { + var table, tr, trChild, trStyle; + if ( reliableTrDimensionsVal == null ) { + table = document.createElement( "table" ); + tr = document.createElement( "tr" ); + trChild = document.createElement( "div" ); + + table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate"; + tr.style.cssText = "border:1px solid"; + + // Support: Chrome 86+ + // Height set through cssText does not get applied. + // Computed height then comes back as 0. + tr.style.height = "1px"; + trChild.style.height = "9px"; + + // Support: Android 8 Chrome 86+ + // In our bodyBackground.html iframe, + // display for all div elements is set to "inline", + // which causes a problem only in Android 8 Chrome 86. + // Ensuring the div is display: block + // gets around this issue. + trChild.style.display = "block"; + + documentElement + .appendChild( table ) + .appendChild( tr ) + .appendChild( trChild ); + + trStyle = window.getComputedStyle( tr ); + reliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) + + parseInt( trStyle.borderTopWidth, 10 ) + + parseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight; + + documentElement.removeChild( table ); + } + return reliableTrDimensionsVal; + } + } ); +} )(); + + +function curCSS( elem, name, computed ) { + var width, minWidth, maxWidth, ret, + + // Support: Firefox 51+ + // Retrieving style before computed somehow + // fixes an issue with getting wrong values + // on detached elements + style = elem.style; + + computed = computed || getStyles( elem ); + + // getPropertyValue is needed for: + // .css('filter') (IE 9 only, #12537) + // .css('--customProperty) (#3144) + if ( computed ) { + ret = computed.getPropertyValue( name ) || computed[ name ]; + + if ( ret === "" && !isAttached( elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Android Browser returns percentage for some values, + // but width seems to be reliably pixels. + // This is against the CSSOM draft spec: + // https://drafts.csswg.org/cssom/#resolved-values + if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { + + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret !== undefined ? + + // Support: IE <=9 - 11 only + // IE returns zIndex value as an integer. + ret + "" : + ret; +} + + +function addGetHookIf( conditionFn, hookFn ) { + + // Define the hook, we'll check on the first run if it's really needed. + return { + get: function() { + if ( conditionFn() ) { + + // Hook not needed (or it's not possible to use it due + // to missing dependency), remove it. + delete this.get; + return; + } + + // Hook needed; redefine it so that the support test is not executed again. + return ( this.get = hookFn ).apply( this, arguments ); + } + }; +} + + +var cssPrefixes = [ "Webkit", "Moz", "ms" ], + emptyStyle = document.createElement( "div" ).style, + vendorProps = {}; + +// Return a vendor-prefixed property or undefined +function vendorPropName( name ) { + + // Check for vendor prefixed names + var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in emptyStyle ) { + return name; + } + } +} + +// Return a potentially-mapped jQuery.cssProps or vendor prefixed property +function finalPropName( name ) { + var final = jQuery.cssProps[ name ] || vendorProps[ name ]; + + if ( final ) { + return final; + } + if ( name in emptyStyle ) { + return name; + } + return vendorProps[ name ] = vendorPropName( name ) || name; +} + + +var + + // Swappable if display is none or starts with table + // except "table", "table-cell", or "table-caption" + // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rcustomProp = /^--/, + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: "0", + fontWeight: "400" + }; + +function setPositiveNumber( _elem, value, subtract ) { + + // Any relative (+/-) values have already been + // normalized at this point + var matches = rcssNum.exec( value ); + return matches ? + + // Guard against undefined "subtract", e.g., when used as in cssHooks + Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : + value; +} + +function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { + var i = dimension === "width" ? 1 : 0, + extra = 0, + delta = 0; + + // Adjustment may not be necessary + if ( box === ( isBorderBox ? "border" : "content" ) ) { + return 0; + } + + for ( ; i < 4; i += 2 ) { + + // Both box models exclude margin + if ( box === "margin" ) { + delta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); + } + + // If we get here with a content-box, we're seeking "padding" or "border" or "margin" + if ( !isBorderBox ) { + + // Add padding + delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + + // For "border" or "margin", add border + if ( box !== "padding" ) { + delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + + // But still keep track of it otherwise + } else { + extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + + // If we get here with a border-box (content + padding + border), we're seeking "content" or + // "padding" or "margin" + } else { + + // For "content", subtract padding + if ( box === "content" ) { + delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } + + // For "content" or "padding", subtract border + if ( box !== "margin" ) { + delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } + } + + // Account for positive content-box scroll gutter when requested by providing computedVal + if ( !isBorderBox && computedVal >= 0 ) { + + // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border + // Assuming integer scroll gutter, subtract the rest and round down + delta += Math.max( 0, Math.ceil( + elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - + computedVal - + delta - + extra - + 0.5 + + // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter + // Use an explicit zero to avoid NaN (gh-3964) + ) ) || 0; + } + + return delta; +} + +function getWidthOrHeight( elem, dimension, extra ) { + + // Start with computed style + var styles = getStyles( elem ), + + // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). + // Fake content-box until we know it's needed to know the true value. + boxSizingNeeded = !support.boxSizingReliable() || extra, + isBorderBox = boxSizingNeeded && + jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + valueIsBorderBox = isBorderBox, + + val = curCSS( elem, dimension, styles ), + offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ); + + // Support: Firefox <=54 + // Return a confounding non-pixel value or feign ignorance, as appropriate. + if ( rnumnonpx.test( val ) ) { + if ( !extra ) { + return val; + } + val = "auto"; + } + + + // Support: IE 9 - 11 only + // Use offsetWidth/offsetHeight for when box sizing is unreliable. + // In those cases, the computed value can be trusted to be border-box. + if ( ( !support.boxSizingReliable() && isBorderBox || + + // Support: IE 10 - 11+, Edge 15 - 18+ + // IE/Edge misreport `getComputedStyle` of table rows with width/height + // set in CSS while `offset*` properties report correct values. + // Interestingly, in some cases IE 9 doesn't suffer from this issue. + !support.reliableTrDimensions() && nodeName( elem, "tr" ) || + + // Fall back to offsetWidth/offsetHeight when value is "auto" + // This happens for inline elements with no explicit setting (gh-3571) + val === "auto" || + + // Support: Android <=4.1 - 4.3 only + // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) + !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && + + // Make sure the element is visible & connected + elem.getClientRects().length ) { + + isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + + // Where available, offsetWidth/offsetHeight approximate border box dimensions. + // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the + // retrieved value as a content box dimension. + valueIsBorderBox = offsetProp in elem; + if ( valueIsBorderBox ) { + val = elem[ offsetProp ]; + } + } + + // Normalize "" and auto + val = parseFloat( val ) || 0; + + // Adjust for the element's box model + return ( val + + boxModelAdjustment( + elem, + dimension, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox, + styles, + + // Provide the current computed size to request scroll gutter calculation (gh-3589) + val + ) + ) + "px"; +} + +jQuery.extend( { + + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + } + } + } + }, + + // Don't automatically add "px" to these possibly-unitless properties + cssNumber: { + "animationIterationCount": true, + "columnCount": true, + "fillOpacity": true, + "flexGrow": true, + "flexShrink": true, + "fontWeight": true, + "gridArea": true, + "gridColumn": true, + "gridColumnEnd": true, + "gridColumnStart": true, + "gridRow": true, + "gridRowEnd": true, + "gridRowStart": true, + "lineHeight": true, + "opacity": true, + "order": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: {}, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = camelCase( name ), + isCustomProp = rcustomProp.test( name ), + style = elem.style; + + // Make sure that we're working with the right name. We don't + // want to query the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } + + // Gets hook for the prefixed version, then unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // Convert "+=" or "-=" to relative numbers (#7345) + if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { + value = adjustCSS( elem, name, ret ); + + // Fixes bug #9237 + type = "number"; + } + + // Make sure that null and NaN values aren't set (#7116) + if ( value == null || value !== value ) { + return; + } + + // If a number was passed in, add the unit (except for certain CSS properties) + // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append + // "px" to a few hardcoded values. + if ( type === "number" && !isCustomProp ) { + value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); + } + + // background-* props affect original clone's values + if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { + style[ name ] = "inherit"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !( "set" in hooks ) || + ( value = hooks.set( elem, value, extra ) ) !== undefined ) { + + if ( isCustomProp ) { + style.setProperty( name, value ); + } else { + style[ name ] = value; + } + } + + } else { + + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && + ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { + + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, extra, styles ) { + var val, num, hooks, + origName = camelCase( name ), + isCustomProp = rcustomProp.test( name ); + + // Make sure that we're working with the right name. We don't + // want to modify the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } + + // Try prefixed name followed by the unprefixed name + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name, styles ); + } + + // Convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Make numeric if forced or a qualifier was provided and val looks numeric + if ( extra === "" || extra ) { + num = parseFloat( val ); + return extra === true || isFinite( num ) ? num || 0 : val; + } + + return val; + } +} ); + +jQuery.each( [ "height", "width" ], function( _i, dimension ) { + jQuery.cssHooks[ dimension ] = { + get: function( elem, computed, extra ) { + if ( computed ) { + + // Certain elements can have dimension info if we invisibly show them + // but it must have a current display style that would benefit + return rdisplayswap.test( jQuery.css( elem, "display" ) ) && + + // Support: Safari 8+ + // Table columns in Safari have non-zero offsetWidth & zero + // getBoundingClientRect().width unless display is changed. + // Support: IE <=11 only + // Running getBoundingClientRect on a disconnected node + // in IE throws an error. + ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? + swap( elem, cssShow, function() { + return getWidthOrHeight( elem, dimension, extra ); + } ) : + getWidthOrHeight( elem, dimension, extra ); + } + }, + + set: function( elem, value, extra ) { + var matches, + styles = getStyles( elem ), + + // Only read styles.position if the test has a chance to fail + // to avoid forcing a reflow. + scrollboxSizeBuggy = !support.scrollboxSize() && + styles.position === "absolute", + + // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) + boxSizingNeeded = scrollboxSizeBuggy || extra, + isBorderBox = boxSizingNeeded && + jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + subtract = extra ? + boxModelAdjustment( + elem, + dimension, + extra, + isBorderBox, + styles + ) : + 0; + + // Account for unreliable border-box dimensions by comparing offset* to computed and + // faking a content-box to get border and padding (gh-3699) + if ( isBorderBox && scrollboxSizeBuggy ) { + subtract -= Math.ceil( + elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - + parseFloat( styles[ dimension ] ) - + boxModelAdjustment( elem, dimension, "border", false, styles ) - + 0.5 + ); + } + + // Convert to pixels if value adjustment is needed + if ( subtract && ( matches = rcssNum.exec( value ) ) && + ( matches[ 3 ] || "px" ) !== "px" ) { + + elem.style[ dimension ] = value; + value = jQuery.css( elem, dimension ); + } + + return setPositiveNumber( elem, value, subtract ); + } + }; +} ); + +jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, + function( elem, computed ) { + if ( computed ) { + return ( parseFloat( curCSS( elem, "marginLeft" ) ) || + elem.getBoundingClientRect().left - + swap( elem, { marginLeft: 0 }, function() { + return elem.getBoundingClientRect().left; + } ) + ) + "px"; + } + } +); + +// These hooks are used by animate to expand properties +jQuery.each( { + margin: "", + padding: "", + border: "Width" +}, function( prefix, suffix ) { + jQuery.cssHooks[ prefix + suffix ] = { + expand: function( value ) { + var i = 0, + expanded = {}, + + // Assumes a single number if not a string + parts = typeof value === "string" ? value.split( " " ) : [ value ]; + + for ( ; i < 4; i++ ) { + expanded[ prefix + cssExpand[ i ] + suffix ] = + parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; + } + + return expanded; + } + }; + + if ( prefix !== "margin" ) { + jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; + } +} ); + +jQuery.fn.extend( { + css: function( name, value ) { + return access( this, function( elem, name, value ) { + var styles, len, + map = {}, + i = 0; + + if ( Array.isArray( name ) ) { + styles = getStyles( elem ); + len = name.length; + + for ( ; i < len; i++ ) { + map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); + } + + return map; + } + + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + } +} ); + + +function Tween( elem, options, prop, end, easing ) { + return new Tween.prototype.init( elem, options, prop, end, easing ); +} +jQuery.Tween = Tween; + +Tween.prototype = { + constructor: Tween, + init: function( elem, options, prop, end, easing, unit ) { + this.elem = elem; + this.prop = prop; + this.easing = easing || jQuery.easing._default; + this.options = options; + this.start = this.now = this.cur(); + this.end = end; + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + }, + cur: function() { + var hooks = Tween.propHooks[ this.prop ]; + + return hooks && hooks.get ? + hooks.get( this ) : + Tween.propHooks._default.get( this ); + }, + run: function( percent ) { + var eased, + hooks = Tween.propHooks[ this.prop ]; + + if ( this.options.duration ) { + this.pos = eased = jQuery.easing[ this.easing ]( + percent, this.options.duration * percent, 0, 1, this.options.duration + ); + } else { + this.pos = eased = percent; + } + this.now = ( this.end - this.start ) * eased + this.start; + + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); + } + + if ( hooks && hooks.set ) { + hooks.set( this ); + } else { + Tween.propHooks._default.set( this ); + } + return this; + } +}; + +Tween.prototype.init.prototype = Tween.prototype; + +Tween.propHooks = { + _default: { + get: function( tween ) { + var result; + + // Use a property on the element directly when it is not a DOM element, + // or when there is no matching style property that exists. + if ( tween.elem.nodeType !== 1 || + tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { + return tween.elem[ tween.prop ]; + } + + // Passing an empty string as a 3rd parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails. + // Simple values such as "10px" are parsed to Float; + // complex values such as "rotate(1rad)" are returned as-is. + result = jQuery.css( tween.elem, tween.prop, "" ); + + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === "auto" ? 0 : result; + }, + set: function( tween ) { + + // Use step hook for back compat. + // Use cssHook if its there. + // Use .style if available and use plain properties where available. + if ( jQuery.fx.step[ tween.prop ] ) { + jQuery.fx.step[ tween.prop ]( tween ); + } else if ( tween.elem.nodeType === 1 && ( + jQuery.cssHooks[ tween.prop ] || + tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); + } else { + tween.elem[ tween.prop ] = tween.now; + } + } + } +}; + +// Support: IE <=9 only +// Panic based approach to setting things on disconnected nodes +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { + set: function( tween ) { + if ( tween.elem.nodeType && tween.elem.parentNode ) { + tween.elem[ tween.prop ] = tween.now; + } + } +}; + +jQuery.easing = { + linear: function( p ) { + return p; + }, + swing: function( p ) { + return 0.5 - Math.cos( p * Math.PI ) / 2; + }, + _default: "swing" +}; + +jQuery.fx = Tween.prototype.init; + +// Back compat <1.8 extension point +jQuery.fx.step = {}; + + + + +var + fxNow, inProgress, + rfxtypes = /^(?:toggle|show|hide)$/, + rrun = /queueHooks$/; + +function schedule() { + if ( inProgress ) { + if ( document.hidden === false && window.requestAnimationFrame ) { + window.requestAnimationFrame( schedule ); + } else { + window.setTimeout( schedule, jQuery.fx.interval ); + } + + jQuery.fx.tick(); + } +} + +// Animations created synchronously will run synchronously +function createFxNow() { + window.setTimeout( function() { + fxNow = undefined; + } ); + return ( fxNow = Date.now() ); +} + +// Generate parameters to create a standard animation +function genFx( type, includeWidth ) { + var which, + i = 0, + attrs = { height: type }; + + // If we include width, step value is 1 to do all cssExpand values, + // otherwise step value is 2 to skip over Left and Right + includeWidth = includeWidth ? 1 : 0; + for ( ; i < 4; i += 2 - includeWidth ) { + which = cssExpand[ i ]; + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; + } + + if ( includeWidth ) { + attrs.opacity = attrs.width = type; + } + + return attrs; +} + +function createTween( value, prop, animation ) { + var tween, + collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), + index = 0, + length = collection.length; + for ( ; index < length; index++ ) { + if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { + + // We're done with this property + return tween; + } + } +} + +function defaultPrefilter( elem, props, opts ) { + var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, + isBox = "width" in props || "height" in props, + anim = this, + orig = {}, + style = elem.style, + hidden = elem.nodeType && isHiddenWithinTree( elem ), + dataShow = dataPriv.get( elem, "fxshow" ); + + // Queue-skipping animations hijack the fx hooks + if ( !opts.queue ) { + hooks = jQuery._queueHooks( elem, "fx" ); + if ( hooks.unqueued == null ) { + hooks.unqueued = 0; + oldfire = hooks.empty.fire; + hooks.empty.fire = function() { + if ( !hooks.unqueued ) { + oldfire(); + } + }; + } + hooks.unqueued++; + + anim.always( function() { + + // Ensure the complete handler is called before this completes + anim.always( function() { + hooks.unqueued--; + if ( !jQuery.queue( elem, "fx" ).length ) { + hooks.empty.fire(); + } + } ); + } ); + } + + // Detect show/hide animations + for ( prop in props ) { + value = props[ prop ]; + if ( rfxtypes.test( value ) ) { + delete props[ prop ]; + toggle = toggle || value === "toggle"; + if ( value === ( hidden ? "hide" : "show" ) ) { + + // Pretend to be hidden if this is a "show" and + // there is still data from a stopped show/hide + if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { + hidden = true; + + // Ignore all other no-op show/hide data + } else { + continue; + } + } + orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); + } + } + + // Bail out if this is a no-op like .hide().hide() + propTween = !jQuery.isEmptyObject( props ); + if ( !propTween && jQuery.isEmptyObject( orig ) ) { + return; + } + + // Restrict "overflow" and "display" styles during box animations + if ( isBox && elem.nodeType === 1 ) { + + // Support: IE <=9 - 11, Edge 12 - 15 + // Record all 3 overflow attributes because IE does not infer the shorthand + // from identically-valued overflowX and overflowY and Edge just mirrors + // the overflowX value there. + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; + + // Identify a display type, preferring old show/hide data over the CSS cascade + restoreDisplay = dataShow && dataShow.display; + if ( restoreDisplay == null ) { + restoreDisplay = dataPriv.get( elem, "display" ); + } + display = jQuery.css( elem, "display" ); + if ( display === "none" ) { + if ( restoreDisplay ) { + display = restoreDisplay; + } else { + + // Get nonempty value(s) by temporarily forcing visibility + showHide( [ elem ], true ); + restoreDisplay = elem.style.display || restoreDisplay; + display = jQuery.css( elem, "display" ); + showHide( [ elem ] ); + } + } + + // Animate inline elements as inline-block + if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { + if ( jQuery.css( elem, "float" ) === "none" ) { + + // Restore the original display value at the end of pure show/hide animations + if ( !propTween ) { + anim.done( function() { + style.display = restoreDisplay; + } ); + if ( restoreDisplay == null ) { + display = style.display; + restoreDisplay = display === "none" ? "" : display; + } + } + style.display = "inline-block"; + } + } + } + + if ( opts.overflow ) { + style.overflow = "hidden"; + anim.always( function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + } ); + } + + // Implement show/hide animations + propTween = false; + for ( prop in orig ) { + + // General show/hide setup for this element animation + if ( !propTween ) { + if ( dataShow ) { + if ( "hidden" in dataShow ) { + hidden = dataShow.hidden; + } + } else { + dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); + } + + // Store hidden/visible for toggle so `.stop().toggle()` "reverses" + if ( toggle ) { + dataShow.hidden = !hidden; + } + + // Show elements before animating them + if ( hidden ) { + showHide( [ elem ], true ); + } + + /* eslint-disable no-loop-func */ + + anim.done( function() { + + /* eslint-enable no-loop-func */ + + // The final step of a "hide" animation is actually hiding the element + if ( !hidden ) { + showHide( [ elem ] ); + } + dataPriv.remove( elem, "fxshow" ); + for ( prop in orig ) { + jQuery.style( elem, prop, orig[ prop ] ); + } + } ); + } + + // Per-property setup + propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); + if ( !( prop in dataShow ) ) { + dataShow[ prop ] = propTween.start; + if ( hidden ) { + propTween.end = propTween.start; + propTween.start = 0; + } + } + } +} + +function propFilter( props, specialEasing ) { + var index, name, easing, value, hooks; + + // camelCase, specialEasing and expand cssHook pass + for ( index in props ) { + name = camelCase( index ); + easing = specialEasing[ name ]; + value = props[ index ]; + if ( Array.isArray( value ) ) { + easing = value[ 1 ]; + value = props[ index ] = value[ 0 ]; + } + + if ( index !== name ) { + props[ name ] = value; + delete props[ index ]; + } + + hooks = jQuery.cssHooks[ name ]; + if ( hooks && "expand" in hooks ) { + value = hooks.expand( value ); + delete props[ name ]; + + // Not quite $.extend, this won't overwrite existing keys. + // Reusing 'index' because we have the correct "name" + for ( index in value ) { + if ( !( index in props ) ) { + props[ index ] = value[ index ]; + specialEasing[ index ] = easing; + } + } + } else { + specialEasing[ name ] = easing; + } + } +} + +function Animation( elem, properties, options ) { + var result, + stopped, + index = 0, + length = Animation.prefilters.length, + deferred = jQuery.Deferred().always( function() { + + // Don't match elem in the :animated selector + delete tick.elem; + } ), + tick = function() { + if ( stopped ) { + return false; + } + var currentTime = fxNow || createFxNow(), + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), + + // Support: Android 2.3 only + // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) + temp = remaining / animation.duration || 0, + percent = 1 - temp, + index = 0, + length = animation.tweens.length; + + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( percent ); + } + + deferred.notifyWith( elem, [ animation, percent, remaining ] ); + + // If there's more to do, yield + if ( percent < 1 && length ) { + return remaining; + } + + // If this was an empty animation, synthesize a final progress notification + if ( !length ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + } + + // Resolve the animation and report its conclusion + deferred.resolveWith( elem, [ animation ] ); + return false; + }, + animation = deferred.promise( { + elem: elem, + props: jQuery.extend( {}, properties ), + opts: jQuery.extend( true, { + specialEasing: {}, + easing: jQuery.easing._default + }, options ), + originalProperties: properties, + originalOptions: options, + startTime: fxNow || createFxNow(), + duration: options.duration, + tweens: [], + createTween: function( prop, end ) { + var tween = jQuery.Tween( elem, animation.opts, prop, end, + animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.tweens.push( tween ); + return tween; + }, + stop: function( gotoEnd ) { + var index = 0, + + // If we are going to the end, we want to run all the tweens + // otherwise we skip this part + length = gotoEnd ? animation.tweens.length : 0; + if ( stopped ) { + return this; + } + stopped = true; + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( 1 ); + } + + // Resolve when we played the last frame; otherwise, reject + if ( gotoEnd ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + deferred.resolveWith( elem, [ animation, gotoEnd ] ); + } else { + deferred.rejectWith( elem, [ animation, gotoEnd ] ); + } + return this; + } + } ), + props = animation.props; + + propFilter( props, animation.opts.specialEasing ); + + for ( ; index < length; index++ ) { + result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); + if ( result ) { + if ( isFunction( result.stop ) ) { + jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = + result.stop.bind( result ); + } + return result; + } + } + + jQuery.map( props, createTween, animation ); + + if ( isFunction( animation.opts.start ) ) { + animation.opts.start.call( elem, animation ); + } + + // Attach callbacks from options + animation + .progress( animation.opts.progress ) + .done( animation.opts.done, animation.opts.complete ) + .fail( animation.opts.fail ) + .always( animation.opts.always ); + + jQuery.fx.timer( + jQuery.extend( tick, { + elem: elem, + anim: animation, + queue: animation.opts.queue + } ) + ); + + return animation; +} + +jQuery.Animation = jQuery.extend( Animation, { + + tweeners: { + "*": [ function( prop, value ) { + var tween = this.createTween( prop, value ); + adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); + return tween; + } ] + }, + + tweener: function( props, callback ) { + if ( isFunction( props ) ) { + callback = props; + props = [ "*" ]; + } else { + props = props.match( rnothtmlwhite ); + } + + var prop, + index = 0, + length = props.length; + + for ( ; index < length; index++ ) { + prop = props[ index ]; + Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; + Animation.tweeners[ prop ].unshift( callback ); + } + }, + + prefilters: [ defaultPrefilter ], + + prefilter: function( callback, prepend ) { + if ( prepend ) { + Animation.prefilters.unshift( callback ); + } else { + Animation.prefilters.push( callback ); + } + } +} ); + +jQuery.speed = function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { + complete: fn || !fn && easing || + isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !isFunction( easing ) && easing + }; + + // Go to the end state if fx are off + if ( jQuery.fx.off ) { + opt.duration = 0; + + } else { + if ( typeof opt.duration !== "number" ) { + if ( opt.duration in jQuery.fx.speeds ) { + opt.duration = jQuery.fx.speeds[ opt.duration ]; + + } else { + opt.duration = jQuery.fx.speeds._default; + } + } + } + + // Normalize opt.queue - true/undefined/null -> "fx" + if ( opt.queue == null || opt.queue === true ) { + opt.queue = "fx"; + } + + // Queueing + opt.old = opt.complete; + + opt.complete = function() { + if ( isFunction( opt.old ) ) { + opt.old.call( this ); + } + + if ( opt.queue ) { + jQuery.dequeue( this, opt.queue ); + } + }; + + return opt; +}; + +jQuery.fn.extend( { + fadeTo: function( speed, to, easing, callback ) { + + // Show any hidden elements after setting opacity to 0 + return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() + + // Animate to the value specified + .end().animate( { opacity: to }, speed, easing, callback ); + }, + animate: function( prop, speed, easing, callback ) { + var empty = jQuery.isEmptyObject( prop ), + optall = jQuery.speed( speed, easing, callback ), + doAnimation = function() { + + // Operate on a copy of prop so per-property easing won't be lost + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); + + // Empty animations, or finishing resolves immediately + if ( empty || dataPriv.get( this, "finish" ) ) { + anim.stop( true ); + } + }; + + doAnimation.finish = doAnimation; + + return empty || optall.queue === false ? + this.each( doAnimation ) : + this.queue( optall.queue, doAnimation ); + }, + stop: function( type, clearQueue, gotoEnd ) { + var stopQueue = function( hooks ) { + var stop = hooks.stop; + delete hooks.stop; + stop( gotoEnd ); + }; + + if ( typeof type !== "string" ) { + gotoEnd = clearQueue; + clearQueue = type; + type = undefined; + } + if ( clearQueue ) { + this.queue( type || "fx", [] ); + } + + return this.each( function() { + var dequeue = true, + index = type != null && type + "queueHooks", + timers = jQuery.timers, + data = dataPriv.get( this ); + + if ( index ) { + if ( data[ index ] && data[ index ].stop ) { + stopQueue( data[ index ] ); + } + } else { + for ( index in data ) { + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { + stopQueue( data[ index ] ); + } + } + } + + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && + ( type == null || timers[ index ].queue === type ) ) { + + timers[ index ].anim.stop( gotoEnd ); + dequeue = false; + timers.splice( index, 1 ); + } + } + + // Start the next in the queue if the last step wasn't forced. + // Timers currently will call their complete callbacks, which + // will dequeue but only if they were gotoEnd. + if ( dequeue || !gotoEnd ) { + jQuery.dequeue( this, type ); + } + } ); + }, + finish: function( type ) { + if ( type !== false ) { + type = type || "fx"; + } + return this.each( function() { + var index, + data = dataPriv.get( this ), + queue = data[ type + "queue" ], + hooks = data[ type + "queueHooks" ], + timers = jQuery.timers, + length = queue ? queue.length : 0; + + // Enable finishing flag on private data + data.finish = true; + + // Empty the queue first + jQuery.queue( this, type, [] ); + + if ( hooks && hooks.stop ) { + hooks.stop.call( this, true ); + } + + // Look for any active animations, and finish them + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && timers[ index ].queue === type ) { + timers[ index ].anim.stop( true ); + timers.splice( index, 1 ); + } + } + + // Look for any animations in the old queue and finish them + for ( index = 0; index < length; index++ ) { + if ( queue[ index ] && queue[ index ].finish ) { + queue[ index ].finish.call( this ); + } + } + + // Turn off finishing flag + delete data.finish; + } ); + } +} ); + +jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) { + var cssFn = jQuery.fn[ name ]; + jQuery.fn[ name ] = function( speed, easing, callback ) { + return speed == null || typeof speed === "boolean" ? + cssFn.apply( this, arguments ) : + this.animate( genFx( name, true ), speed, easing, callback ); + }; +} ); + +// Generate shortcuts for custom animations +jQuery.each( { + slideDown: genFx( "show" ), + slideUp: genFx( "hide" ), + slideToggle: genFx( "toggle" ), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, easing, callback ) { + return this.animate( props, speed, easing, callback ); + }; +} ); + +jQuery.timers = []; +jQuery.fx.tick = function() { + var timer, + i = 0, + timers = jQuery.timers; + + fxNow = Date.now(); + + for ( ; i < timers.length; i++ ) { + timer = timers[ i ]; + + // Run the timer and safely remove it when done (allowing for external removal) + if ( !timer() && timers[ i ] === timer ) { + timers.splice( i--, 1 ); + } + } + + if ( !timers.length ) { + jQuery.fx.stop(); + } + fxNow = undefined; +}; + +jQuery.fx.timer = function( timer ) { + jQuery.timers.push( timer ); + jQuery.fx.start(); +}; + +jQuery.fx.interval = 13; +jQuery.fx.start = function() { + if ( inProgress ) { + return; + } + + inProgress = true; + schedule(); +}; + +jQuery.fx.stop = function() { + inProgress = null; +}; + +jQuery.fx.speeds = { + slow: 600, + fast: 200, + + // Default speed + _default: 400 +}; + + +// Based off of the plugin by Clint Helfers, with permission. +// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ +jQuery.fn.delay = function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = window.setTimeout( next, time ); + hooks.stop = function() { + window.clearTimeout( timeout ); + }; + } ); +}; + + +( function() { + var input = document.createElement( "input" ), + select = document.createElement( "select" ), + opt = select.appendChild( document.createElement( "option" ) ); + + input.type = "checkbox"; + + // Support: Android <=4.3 only + // Default value for a checkbox should be "on" + support.checkOn = input.value !== ""; + + // Support: IE <=11 only + // Must access selectedIndex to make default options select + support.optSelected = opt.selected; + + // Support: IE <=11 only + // An input loses its value after becoming a radio + input = document.createElement( "input" ); + input.value = "t"; + input.type = "radio"; + support.radioValue = input.value === "t"; +} )(); + + +var boolHook, + attrHandle = jQuery.expr.attrHandle; + +jQuery.fn.extend( { + attr: function( name, value ) { + return access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each( function() { + jQuery.removeAttr( this, name ); + } ); + } +} ); + +jQuery.extend( { + attr: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; + + // Don't get/set attributes on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === "undefined" ) { + return jQuery.prop( elem, name, value ); + } + + // Attribute hooks are determined by the lowercase version + // Grab necessary hook if one is defined + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + hooks = jQuery.attrHooks[ name.toLowerCase() ] || + ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); + } + + if ( value !== undefined ) { + if ( value === null ) { + jQuery.removeAttr( elem, name ); + return; + } + + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } + + elem.setAttribute( name, value + "" ); + return value; + } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } + + ret = jQuery.find.attr( elem, name ); + + // Non-existent attributes return null, we normalize to undefined + return ret == null ? undefined : ret; + }, + + attrHooks: { + type: { + set: function( elem, value ) { + if ( !support.radioValue && value === "radio" && + nodeName( elem, "input" ) ) { + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + } + }, + + removeAttr: function( elem, value ) { + var name, + i = 0, + + // Attribute names can contain non-HTML whitespace characters + // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 + attrNames = value && value.match( rnothtmlwhite ); + + if ( attrNames && elem.nodeType === 1 ) { + while ( ( name = attrNames[ i++ ] ) ) { + elem.removeAttribute( name ); + } + } + } +} ); + +// Hooks for boolean attributes +boolHook = { + set: function( elem, value, name ) { + if ( value === false ) { + + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + elem.setAttribute( name, name ); + } + return name; + } +}; + +jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) { + var getter = attrHandle[ name ] || jQuery.find.attr; + + attrHandle[ name ] = function( elem, name, isXML ) { + var ret, handle, + lowercaseName = name.toLowerCase(); + + if ( !isXML ) { + + // Avoid an infinite loop by temporarily removing this function from the getter + handle = attrHandle[ lowercaseName ]; + attrHandle[ lowercaseName ] = ret; + ret = getter( elem, name, isXML ) != null ? + lowercaseName : + null; + attrHandle[ lowercaseName ] = handle; + } + return ret; + }; +} ); + + + + +var rfocusable = /^(?:input|select|textarea|button)$/i, + rclickable = /^(?:a|area)$/i; + +jQuery.fn.extend( { + prop: function( name, value ) { + return access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + return this.each( function() { + delete this[ jQuery.propFix[ name ] || name ]; + } ); + } +} ); + +jQuery.extend( { + prop: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; + + // Don't get/set properties on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } + + return ( elem[ name ] = value ); + } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } + + return elem[ name ]; + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + + // Support: IE <=9 - 11 only + // elem.tabIndex doesn't always return the + // correct value when it hasn't been explicitly set + // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + // Use proper attribute retrieval(#12072) + var tabindex = jQuery.find.attr( elem, "tabindex" ); + + if ( tabindex ) { + return parseInt( tabindex, 10 ); + } + + if ( + rfocusable.test( elem.nodeName ) || + rclickable.test( elem.nodeName ) && + elem.href + ) { + return 0; + } + + return -1; + } + } + }, + + propFix: { + "for": "htmlFor", + "class": "className" + } +} ); + +// Support: IE <=11 only +// Accessing the selectedIndex property +// forces the browser to respect setting selected +// on the option +// The getter ensures a default option is selected +// when in an optgroup +// eslint rule "no-unused-expressions" is disabled for this code +// since it considers such accessions noop +if ( !support.optSelected ) { + jQuery.propHooks.selected = { + get: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode; + if ( parent && parent.parentNode ) { + parent.parentNode.selectedIndex; + } + return null; + }, + set: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode; + if ( parent ) { + parent.selectedIndex; + + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + } + }; +} + +jQuery.each( [ + "tabIndex", + "readOnly", + "maxLength", + "cellSpacing", + "cellPadding", + "rowSpan", + "colSpan", + "useMap", + "frameBorder", + "contentEditable" +], function() { + jQuery.propFix[ this.toLowerCase() ] = this; +} ); + + + + + // Strip and collapse whitespace according to HTML spec + // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace + function stripAndCollapse( value ) { + var tokens = value.match( rnothtmlwhite ) || []; + return tokens.join( " " ); + } + + +function getClass( elem ) { + return elem.getAttribute && elem.getAttribute( "class" ) || ""; +} + +function classesToArray( value ) { + if ( Array.isArray( value ) ) { + return value; + } + if ( typeof value === "string" ) { + return value.match( rnothtmlwhite ) || []; + } + return []; +} + +jQuery.fn.extend( { + addClass: function( value ) { + var classes, elem, cur, curValue, clazz, j, finalValue, + i = 0; + + if ( isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); + } ); + } + + classes = classesToArray( value ); + + if ( classes.length ) { + while ( ( elem = this[ i++ ] ) ) { + curValue = getClass( elem ); + cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); + + if ( cur ) { + j = 0; + while ( ( clazz = classes[ j++ ] ) ) { + if ( cur.indexOf( " " + clazz + " " ) < 0 ) { + cur += clazz + " "; + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + elem.setAttribute( "class", finalValue ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classes, elem, cur, curValue, clazz, j, finalValue, + i = 0; + + if ( isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); + } ); + } + + if ( !arguments.length ) { + return this.attr( "class", "" ); + } + + classes = classesToArray( value ); + + if ( classes.length ) { + while ( ( elem = this[ i++ ] ) ) { + curValue = getClass( elem ); + + // This expression is here for better compressibility (see addClass) + cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); + + if ( cur ) { + j = 0; + while ( ( clazz = classes[ j++ ] ) ) { + + // Remove *all* instances + while ( cur.indexOf( " " + clazz + " " ) > -1 ) { + cur = cur.replace( " " + clazz + " ", " " ); + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + elem.setAttribute( "class", finalValue ); + } + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isValidValue = type === "string" || Array.isArray( value ); + + if ( typeof stateVal === "boolean" && isValidValue ) { + return stateVal ? this.addClass( value ) : this.removeClass( value ); + } + + if ( isFunction( value ) ) { + return this.each( function( i ) { + jQuery( this ).toggleClass( + value.call( this, i, getClass( this ), stateVal ), + stateVal + ); + } ); + } + + return this.each( function() { + var className, i, self, classNames; + + if ( isValidValue ) { + + // Toggle individual class names + i = 0; + self = jQuery( this ); + classNames = classesToArray( value ); + + while ( ( className = classNames[ i++ ] ) ) { + + // Check each className given, space separated list + if ( self.hasClass( className ) ) { + self.removeClass( className ); + } else { + self.addClass( className ); + } + } + + // Toggle whole class name + } else if ( value === undefined || type === "boolean" ) { + className = getClass( this ); + if ( className ) { + + // Store className if set + dataPriv.set( this, "__className__", className ); + } + + // If the element has a class name or if we're passed `false`, + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + if ( this.setAttribute ) { + this.setAttribute( "class", + className || value === false ? + "" : + dataPriv.get( this, "__className__" ) || "" + ); + } + } + } ); + }, + + hasClass: function( selector ) { + var className, elem, + i = 0; + + className = " " + selector + " "; + while ( ( elem = this[ i++ ] ) ) { + if ( elem.nodeType === 1 && + ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { + return true; + } + } + + return false; + } +} ); + + + + +var rreturn = /\r/g; + +jQuery.fn.extend( { + val: function( value ) { + var hooks, ret, valueIsFunction, + elem = this[ 0 ]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || + jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && + "get" in hooks && + ( ret = hooks.get( elem, "value" ) ) !== undefined + ) { + return ret; + } + + ret = elem.value; + + // Handle most common string cases + if ( typeof ret === "string" ) { + return ret.replace( rreturn, "" ); + } + + // Handle cases where value is null/undef or number + return ret == null ? "" : ret; + } + + return; + } + + valueIsFunction = isFunction( value ); + + return this.each( function( i ) { + var val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( valueIsFunction ) { + val = value.call( this, i, jQuery( this ).val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + + } else if ( typeof val === "number" ) { + val += ""; + + } else if ( Array.isArray( val ) ) { + val = jQuery.map( val, function( value ) { + return value == null ? "" : value + ""; + } ); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + } ); + } +} ); + +jQuery.extend( { + valHooks: { + option: { + get: function( elem ) { + + var val = jQuery.find.attr( elem, "value" ); + return val != null ? + val : + + // Support: IE <=10 - 11 only + // option.text throws exceptions (#14686, #14858) + // Strip and collapse whitespace + // https://html.spec.whatwg.org/#strip-and-collapse-whitespace + stripAndCollapse( jQuery.text( elem ) ); + } + }, + select: { + get: function( elem ) { + var value, option, i, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one", + values = one ? null : [], + max = one ? index + 1 : options.length; + + if ( index < 0 ) { + i = max; + + } else { + i = one ? index : 0; + } + + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; + + // Support: IE <=9 only + // IE8-9 doesn't update selected after form reset (#2551) + if ( ( option.selected || i === index ) && + + // Don't return options that are disabled or in a disabled optgroup + !option.disabled && + ( !option.parentNode.disabled || + !nodeName( option.parentNode, "optgroup" ) ) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + }, + + set: function( elem, value ) { + var optionSet, option, + options = elem.options, + values = jQuery.makeArray( value ), + i = options.length; + + while ( i-- ) { + option = options[ i ]; + + /* eslint-disable no-cond-assign */ + + if ( option.selected = + jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 + ) { + optionSet = true; + } + + /* eslint-enable no-cond-assign */ + } + + // Force browsers to behave consistently when non-matching value is set + if ( !optionSet ) { + elem.selectedIndex = -1; + } + return values; + } + } + } +} ); + +// Radios and checkboxes getter/setter +jQuery.each( [ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + set: function( elem, value ) { + if ( Array.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); + } + } + }; + if ( !support.checkOn ) { + jQuery.valHooks[ this ].get = function( elem ) { + return elem.getAttribute( "value" ) === null ? "on" : elem.value; + }; + } +} ); + + + + +// Return jQuery for attributes-only inclusion + + +support.focusin = "onfocusin" in window; + + +var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + stopPropagationCallback = function( e ) { + e.stopPropagation(); + }; + +jQuery.extend( jQuery.event, { + + trigger: function( event, data, elem, onlyHandlers ) { + + var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, + eventPath = [ elem || document ], + type = hasOwn.call( event, "type" ) ? event.type : event, + namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; + + cur = lastElement = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf( "." ) > -1 ) { + + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split( "." ); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf( ":" ) < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join( "." ); + event.rnamespace = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === ( elem.ownerDocument || document ) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { + lastElement = cur; + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( dataPriv.get( cur, "events" ) || Object.create( null ) )[ event.type ] && + dataPriv.get( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && handle.apply && acceptData( cur ) ) { + event.result = handle.apply( cur, data ); + if ( event.result === false ) { + event.preventDefault(); + } + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( ( !special._default || + special._default.apply( eventPath.pop(), data ) === false ) && + acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name as the event. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + + if ( event.isPropagationStopped() ) { + lastElement.addEventListener( type, stopPropagationCallback ); + } + + elem[ type ](); + + if ( event.isPropagationStopped() ) { + lastElement.removeEventListener( type, stopPropagationCallback ); + } + + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + // Piggyback on a donor event to simulate a different one + // Used only for `focus(in | out)` events + simulate: function( type, elem, event ) { + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true + } + ); + + jQuery.event.trigger( e, null, elem ); + } + +} ); + +jQuery.fn.extend( { + + trigger: function( type, data ) { + return this.each( function() { + jQuery.event.trigger( type, data, this ); + } ); + }, + triggerHandler: function( type, data ) { + var elem = this[ 0 ]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +} ); + + +// Support: Firefox <=44 +// Firefox doesn't have focus(in | out) events +// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 +// +// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 +// focus(in | out) events fire after focus & blur events, +// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order +// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 +if ( !support.focusin ) { + jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler on the document while someone wants focusin/focusout + var handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + + // Handle: regular nodes (via `this.ownerDocument`), window + // (via `this.document`) & document (via `this`). + var doc = this.ownerDocument || this.document || this, + attaches = dataPriv.access( doc, fix ); + + if ( !attaches ) { + doc.addEventListener( orig, handler, true ); + } + dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); + }, + teardown: function() { + var doc = this.ownerDocument || this.document || this, + attaches = dataPriv.access( doc, fix ) - 1; + + if ( !attaches ) { + doc.removeEventListener( orig, handler, true ); + dataPriv.remove( doc, fix ); + + } else { + dataPriv.access( doc, fix, attaches ); + } + } + }; + } ); +} +var location = window.location; + +var nonce = { guid: Date.now() }; + +var rquery = ( /\?/ ); + + + +// Cross-browser xml parsing +jQuery.parseXML = function( data ) { + var xml, parserErrorElem; + if ( !data || typeof data !== "string" ) { + return null; + } + + // Support: IE 9 - 11 only + // IE throws on parseFromString with invalid input. + try { + xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); + } catch ( e ) {} + + parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ]; + if ( !xml || parserErrorElem ) { + jQuery.error( "Invalid XML: " + ( + parserErrorElem ? + jQuery.map( parserErrorElem.childNodes, function( el ) { + return el.textContent; + } ).join( "\n" ) : + data + ) ); + } + return xml; +}; + + +var + rbracket = /\[\]$/, + rCRLF = /\r?\n/g, + rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, + rsubmittable = /^(?:input|select|textarea|keygen)/i; + +function buildParams( prefix, obj, traditional, add ) { + var name; + + if ( Array.isArray( obj ) ) { + + // Serialize array item. + jQuery.each( obj, function( i, v ) { + if ( traditional || rbracket.test( prefix ) ) { + + // Treat each array item as a scalar. + add( prefix, v ); + + } else { + + // Item is non-scalar (array or object), encode its numeric index. + buildParams( + prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", + v, + traditional, + add + ); + } + } ); + + } else if ( !traditional && toType( obj ) === "object" ) { + + // Serialize object item. + for ( name in obj ) { + buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); + } + + } else { + + // Serialize scalar item. + add( prefix, obj ); + } +} + +// Serialize an array of form elements or a set of +// key/values into a query string +jQuery.param = function( a, traditional ) { + var prefix, + s = [], + add = function( key, valueOrFunction ) { + + // If value is a function, invoke it and use its return value + var value = isFunction( valueOrFunction ) ? + valueOrFunction() : + valueOrFunction; + + s[ s.length ] = encodeURIComponent( key ) + "=" + + encodeURIComponent( value == null ? "" : value ); + }; + + if ( a == null ) { + return ""; + } + + // If an array was passed in, assume that it is an array of form elements. + if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { + + // Serialize the form elements + jQuery.each( a, function() { + add( this.name, this.value ); + } ); + + } else { + + // If traditional, encode the "old" way (the way 1.3.2 or older + // did it), otherwise encode params recursively. + for ( prefix in a ) { + buildParams( prefix, a[ prefix ], traditional, add ); + } + } + + // Return the resulting serialization + return s.join( "&" ); +}; + +jQuery.fn.extend( { + serialize: function() { + return jQuery.param( this.serializeArray() ); + }, + serializeArray: function() { + return this.map( function() { + + // Can add propHook for "elements" to filter or add form elements + var elements = jQuery.prop( this, "elements" ); + return elements ? jQuery.makeArray( elements ) : this; + } ).filter( function() { + var type = this.type; + + // Use .is( ":disabled" ) so that fieldset[disabled] works + return this.name && !jQuery( this ).is( ":disabled" ) && + rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && + ( this.checked || !rcheckableType.test( type ) ); + } ).map( function( _i, elem ) { + var val = jQuery( this ).val(); + + if ( val == null ) { + return null; + } + + if ( Array.isArray( val ) ) { + return jQuery.map( val, function( val ) { + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ); + } + + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ).get(); + } +} ); + + +var + r20 = /%20/g, + rhash = /#.*$/, + rantiCache = /([?&])_=[^&]*/, + rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, + + // #7653, #8125, #8152: local protocol detection + rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, + rnoContent = /^(?:GET|HEAD)$/, + rprotocol = /^\/\//, + + /* Prefilters + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) + * 2) These are called: + * - BEFORE asking for a transport + * - AFTER param serialization (s.data is a string if s.processData is true) + * 3) key is the dataType + * 4) the catchall symbol "*" can be used + * 5) execution will start with transport dataType and THEN continue down to "*" if needed + */ + prefilters = {}, + + /* Transports bindings + * 1) key is the dataType + * 2) the catchall symbol "*" can be used + * 3) selection will start with transport dataType and THEN go to "*" if needed + */ + transports = {}, + + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression + allTypes = "*/".concat( "*" ), + + // Anchor tag for parsing the document origin + originAnchor = document.createElement( "a" ); + +originAnchor.href = location.href; + +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport +function addToPrefiltersOrTransports( structure ) { + + // dataTypeExpression is optional and defaults to "*" + return function( dataTypeExpression, func ) { + + if ( typeof dataTypeExpression !== "string" ) { + func = dataTypeExpression; + dataTypeExpression = "*"; + } + + var dataType, + i = 0, + dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; + + if ( isFunction( func ) ) { + + // For each dataType in the dataTypeExpression + while ( ( dataType = dataTypes[ i++ ] ) ) { + + // Prepend if requested + if ( dataType[ 0 ] === "+" ) { + dataType = dataType.slice( 1 ) || "*"; + ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); + + // Otherwise append + } else { + ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); + } + } + } + }; +} + +// Base inspection function for prefilters and transports +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { + + var inspected = {}, + seekingTransport = ( structure === transports ); + + function inspect( dataType ) { + var selected; + inspected[ dataType ] = true; + jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { + var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); + if ( typeof dataTypeOrTransport === "string" && + !seekingTransport && !inspected[ dataTypeOrTransport ] ) { + + options.dataTypes.unshift( dataTypeOrTransport ); + inspect( dataTypeOrTransport ); + return false; + } else if ( seekingTransport ) { + return !( selected = dataTypeOrTransport ); + } + } ); + return selected; + } + + return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); +} + +// A special extend for ajax options +// that takes "flat" options (not to be deep extended) +// Fixes #9887 +function ajaxExtend( target, src ) { + var key, deep, + flatOptions = jQuery.ajaxSettings.flatOptions || {}; + + for ( key in src ) { + if ( src[ key ] !== undefined ) { + ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; + } + } + if ( deep ) { + jQuery.extend( true, target, deep ); + } + + return target; +} + +/* Handles responses to an ajax request: + * - finds the right dataType (mediates between content-type and expected dataType) + * - returns the corresponding response + */ +function ajaxHandleResponses( s, jqXHR, responses ) { + + var ct, type, finalDataType, firstDataType, + contents = s.contents, + dataTypes = s.dataTypes; + + // Remove auto dataType and get content-type in the process + while ( dataTypes[ 0 ] === "*" ) { + dataTypes.shift(); + if ( ct === undefined ) { + ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); + } + } + + // Check if we're dealing with a known content-type + if ( ct ) { + for ( type in contents ) { + if ( contents[ type ] && contents[ type ].test( ct ) ) { + dataTypes.unshift( type ); + break; + } + } + } + + // Check to see if we have a response for the expected dataType + if ( dataTypes[ 0 ] in responses ) { + finalDataType = dataTypes[ 0 ]; + } else { + + // Try convertible dataTypes + for ( type in responses ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { + finalDataType = type; + break; + } + if ( !firstDataType ) { + firstDataType = type; + } + } + + // Or just use first one + finalDataType = finalDataType || firstDataType; + } + + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if ( finalDataType ) { + if ( finalDataType !== dataTypes[ 0 ] ) { + dataTypes.unshift( finalDataType ); + } + return responses[ finalDataType ]; + } +} + +/* Chain conversions given the request and the original response + * Also sets the responseXXX fields on the jqXHR instance + */ +function ajaxConvert( s, response, jqXHR, isSuccess ) { + var conv2, current, conv, tmp, prev, + converters = {}, + + // Work with a copy of dataTypes in case we need to modify it for conversion + dataTypes = s.dataTypes.slice(); + + // Create converters map with lowercased keys + if ( dataTypes[ 1 ] ) { + for ( conv in s.converters ) { + converters[ conv.toLowerCase() ] = s.converters[ conv ]; + } + } + + current = dataTypes.shift(); + + // Convert to each sequential dataType + while ( current ) { + + if ( s.responseFields[ current ] ) { + jqXHR[ s.responseFields[ current ] ] = response; + } + + // Apply the dataFilter if provided + if ( !prev && isSuccess && s.dataFilter ) { + response = s.dataFilter( response, s.dataType ); + } + + prev = current; + current = dataTypes.shift(); + + if ( current ) { + + // There's only work to do if current dataType is non-auto + if ( current === "*" ) { + + current = prev; + + // Convert response if prev dataType is non-auto and differs from current + } else if ( prev !== "*" && prev !== current ) { + + // Seek a direct converter + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; + + // If none found, seek a pair + if ( !conv ) { + for ( conv2 in converters ) { + + // If conv2 outputs current + tmp = conv2.split( " " ); + if ( tmp[ 1 ] === current ) { + + // If prev can be converted to accepted input + conv = converters[ prev + " " + tmp[ 0 ] ] || + converters[ "* " + tmp[ 0 ] ]; + if ( conv ) { + + // Condense equivalence converters + if ( conv === true ) { + conv = converters[ conv2 ]; + + // Otherwise, insert the intermediate dataType + } else if ( converters[ conv2 ] !== true ) { + current = tmp[ 0 ]; + dataTypes.unshift( tmp[ 1 ] ); + } + break; + } + } + } + } + + // Apply converter (if not an equivalence) + if ( conv !== true ) { + + // Unless errors are allowed to bubble, catch and return them + if ( conv && s.throws ) { + response = conv( response ); + } else { + try { + response = conv( response ); + } catch ( e ) { + return { + state: "parsererror", + error: conv ? e : "No conversion from " + prev + " to " + current + }; + } + } + } + } + } + } + + return { state: "success", data: response }; +} + +jQuery.extend( { + + // Counter for holding the number of active queries + active: 0, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {}, + + ajaxSettings: { + url: location.href, + type: "GET", + isLocal: rlocalProtocol.test( location.protocol ), + global: true, + processData: true, + async: true, + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + + /* + timeout: 0, + data: null, + dataType: null, + username: null, + password: null, + cache: null, + throws: false, + traditional: false, + headers: {}, + */ + + accepts: { + "*": allTypes, + text: "text/plain", + html: "text/html", + xml: "application/xml, text/xml", + json: "application/json, text/javascript" + }, + + contents: { + xml: /\bxml\b/, + html: /\bhtml/, + json: /\bjson\b/ + }, + + responseFields: { + xml: "responseXML", + text: "responseText", + json: "responseJSON" + }, + + // Data converters + // Keys separate source (or catchall "*") and destination types with a single space + converters: { + + // Convert anything to text + "* text": String, + + // Text to html (true = no transformation) + "text html": true, + + // Evaluate text as a json expression + "text json": JSON.parse, + + // Parse text as xml + "text xml": jQuery.parseXML + }, + + // For options that shouldn't be deep extended: + // you can add your own custom options here if + // and when you create one that shouldn't be + // deep extended (see ajaxExtend) + flatOptions: { + url: true, + context: true + } + }, + + // Creates a full fledged settings object into target + // with both ajaxSettings and settings fields. + // If target is omitted, writes into ajaxSettings. + ajaxSetup: function( target, settings ) { + return settings ? + + // Building a settings object + ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : + + // Extending ajaxSettings + ajaxExtend( jQuery.ajaxSettings, target ); + }, + + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), + ajaxTransport: addToPrefiltersOrTransports( transports ), + + // Main method + ajax: function( url, options ) { + + // If url is an object, simulate pre-1.5 signature + if ( typeof url === "object" ) { + options = url; + url = undefined; + } + + // Force options to be an object + options = options || {}; + + var transport, + + // URL without anti-cache param + cacheURL, + + // Response headers + responseHeadersString, + responseHeaders, + + // timeout handle + timeoutTimer, + + // Url cleanup var + urlAnchor, + + // Request state (becomes false upon send and true upon completion) + completed, + + // To know if global events are to be dispatched + fireGlobals, + + // Loop variable + i, + + // uncached part of the url + uncached, + + // Create the final options object + s = jQuery.ajaxSetup( {}, options ), + + // Callbacks context + callbackContext = s.context || s, + + // Context for global events is callbackContext if it is a DOM node or jQuery collection + globalEventContext = s.context && + ( callbackContext.nodeType || callbackContext.jquery ) ? + jQuery( callbackContext ) : + jQuery.event, + + // Deferreds + deferred = jQuery.Deferred(), + completeDeferred = jQuery.Callbacks( "once memory" ), + + // Status-dependent callbacks + statusCode = s.statusCode || {}, + + // Headers (they are sent all at once) + requestHeaders = {}, + requestHeadersNames = {}, + + // Default abort message + strAbort = "canceled", + + // Fake xhr + jqXHR = { + readyState: 0, + + // Builds headers hashtable if needed + getResponseHeader: function( key ) { + var match; + if ( completed ) { + if ( !responseHeaders ) { + responseHeaders = {}; + while ( ( match = rheaders.exec( responseHeadersString ) ) ) { + responseHeaders[ match[ 1 ].toLowerCase() + " " ] = + ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] ) + .concat( match[ 2 ] ); + } + } + match = responseHeaders[ key.toLowerCase() + " " ]; + } + return match == null ? null : match.join( ", " ); + }, + + // Raw string + getAllResponseHeaders: function() { + return completed ? responseHeadersString : null; + }, + + // Caches the header + setRequestHeader: function( name, value ) { + if ( completed == null ) { + name = requestHeadersNames[ name.toLowerCase() ] = + requestHeadersNames[ name.toLowerCase() ] || name; + requestHeaders[ name ] = value; + } + return this; + }, + + // Overrides response content-type header + overrideMimeType: function( type ) { + if ( completed == null ) { + s.mimeType = type; + } + return this; + }, + + // Status-dependent callbacks + statusCode: function( map ) { + var code; + if ( map ) { + if ( completed ) { + + // Execute the appropriate callbacks + jqXHR.always( map[ jqXHR.status ] ); + } else { + + // Lazy-add the new callbacks in a way that preserves old ones + for ( code in map ) { + statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; + } + } + } + return this; + }, + + // Cancel the request + abort: function( statusText ) { + var finalText = statusText || strAbort; + if ( transport ) { + transport.abort( finalText ); + } + done( 0, finalText ); + return this; + } + }; + + // Attach deferreds + deferred.promise( jqXHR ); + + // Add protocol if not provided (prefilters might expect it) + // Handle falsy url in the settings object (#10093: consistency with old signature) + // We also use the url parameter if available + s.url = ( ( url || s.url || location.href ) + "" ) + .replace( rprotocol, location.protocol + "//" ); + + // Alias method option to type as per ticket #12004 + s.type = options.method || options.type || s.method || s.type; + + // Extract dataTypes list + s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; + + // A cross-domain request is in order when the origin doesn't match the current origin. + if ( s.crossDomain == null ) { + urlAnchor = document.createElement( "a" ); + + // Support: IE <=8 - 11, Edge 12 - 15 + // IE throws exception on accessing the href property if url is malformed, + // e.g. http://example.com:80x/ + try { + urlAnchor.href = s.url; + + // Support: IE <=8 - 11 only + // Anchor's host property isn't correctly set when s.url is relative + urlAnchor.href = urlAnchor.href; + s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== + urlAnchor.protocol + "//" + urlAnchor.host; + } catch ( e ) { + + // If there is an error parsing the URL, assume it is crossDomain, + // it can be rejected by the transport if it is invalid + s.crossDomain = true; + } + } + + // Convert data if not already a string + if ( s.data && s.processData && typeof s.data !== "string" ) { + s.data = jQuery.param( s.data, s.traditional ); + } + + // Apply prefilters + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); + + // If request was aborted inside a prefilter, stop there + if ( completed ) { + return jqXHR; + } + + // We can fire global events as of now if asked to + // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) + fireGlobals = jQuery.event && s.global; + + // Watch for a new set of requests + if ( fireGlobals && jQuery.active++ === 0 ) { + jQuery.event.trigger( "ajaxStart" ); + } + + // Uppercase the type + s.type = s.type.toUpperCase(); + + // Determine if request has content + s.hasContent = !rnoContent.test( s.type ); + + // Save the URL in case we're toying with the If-Modified-Since + // and/or If-None-Match header later on + // Remove hash to simplify url manipulation + cacheURL = s.url.replace( rhash, "" ); + + // More options handling for requests with no content + if ( !s.hasContent ) { + + // Remember the hash so we can put it back + uncached = s.url.slice( cacheURL.length ); + + // If data is available and should be processed, append data to url + if ( s.data && ( s.processData || typeof s.data === "string" ) ) { + cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; + + // #9682: remove data so that it's not used in an eventual retry + delete s.data; + } + + // Add or update anti-cache param if needed + if ( s.cache === false ) { + cacheURL = cacheURL.replace( rantiCache, "$1" ); + uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) + + uncached; + } + + // Put hash and anti-cache on the URL that will be requested (gh-1732) + s.url = cacheURL + uncached; + + // Change '%20' to '+' if this is encoded form body content (gh-2658) + } else if ( s.data && s.processData && + ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { + s.data = s.data.replace( r20, "+" ); + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + if ( jQuery.lastModified[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); + } + if ( jQuery.etag[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); + } + } + + // Set the correct header, if data is being sent + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { + jqXHR.setRequestHeader( "Content-Type", s.contentType ); + } + + // Set the Accepts header for the server, depending on the dataType + jqXHR.setRequestHeader( + "Accept", + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? + s.accepts[ s.dataTypes[ 0 ] ] + + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.accepts[ "*" ] + ); + + // Check for headers option + for ( i in s.headers ) { + jqXHR.setRequestHeader( i, s.headers[ i ] ); + } + + // Allow custom headers/mimetypes and early abort + if ( s.beforeSend && + ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { + + // Abort if not done already and return + return jqXHR.abort(); + } + + // Aborting is no longer a cancellation + strAbort = "abort"; + + // Install callbacks on deferreds + completeDeferred.add( s.complete ); + jqXHR.done( s.success ); + jqXHR.fail( s.error ); + + // Get transport + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); + + // If no transport, we auto-abort + if ( !transport ) { + done( -1, "No Transport" ); + } else { + jqXHR.readyState = 1; + + // Send global event + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); + } + + // If request was aborted inside ajaxSend, stop there + if ( completed ) { + return jqXHR; + } + + // Timeout + if ( s.async && s.timeout > 0 ) { + timeoutTimer = window.setTimeout( function() { + jqXHR.abort( "timeout" ); + }, s.timeout ); + } + + try { + completed = false; + transport.send( requestHeaders, done ); + } catch ( e ) { + + // Rethrow post-completion exceptions + if ( completed ) { + throw e; + } + + // Propagate others as results + done( -1, e ); + } + } + + // Callback for when everything is done + function done( status, nativeStatusText, responses, headers ) { + var isSuccess, success, error, response, modified, + statusText = nativeStatusText; + + // Ignore repeat invocations + if ( completed ) { + return; + } + + completed = true; + + // Clear timeout if it exists + if ( timeoutTimer ) { + window.clearTimeout( timeoutTimer ); + } + + // Dereference transport for early garbage collection + // (no matter how long the jqXHR object will be used) + transport = undefined; + + // Cache response headers + responseHeadersString = headers || ""; + + // Set readyState + jqXHR.readyState = status > 0 ? 4 : 0; + + // Determine if successful + isSuccess = status >= 200 && status < 300 || status === 304; + + // Get response data + if ( responses ) { + response = ajaxHandleResponses( s, jqXHR, responses ); + } + + // Use a noop converter for missing script but not if jsonp + if ( !isSuccess && + jQuery.inArray( "script", s.dataTypes ) > -1 && + jQuery.inArray( "json", s.dataTypes ) < 0 ) { + s.converters[ "text script" ] = function() {}; + } + + // Convert no matter what (that way responseXXX fields are always set) + response = ajaxConvert( s, response, jqXHR, isSuccess ); + + // If successful, handle type chaining + if ( isSuccess ) { + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + modified = jqXHR.getResponseHeader( "Last-Modified" ); + if ( modified ) { + jQuery.lastModified[ cacheURL ] = modified; + } + modified = jqXHR.getResponseHeader( "etag" ); + if ( modified ) { + jQuery.etag[ cacheURL ] = modified; + } + } + + // if no content + if ( status === 204 || s.type === "HEAD" ) { + statusText = "nocontent"; + + // if not modified + } else if ( status === 304 ) { + statusText = "notmodified"; + + // If we have data, let's convert it + } else { + statusText = response.state; + success = response.data; + error = response.error; + isSuccess = !error; + } + } else { + + // Extract error from statusText and normalize for non-aborts + error = statusText; + if ( status || !statusText ) { + statusText = "error"; + if ( status < 0 ) { + status = 0; + } + } + } + + // Set data for the fake xhr object + jqXHR.status = status; + jqXHR.statusText = ( nativeStatusText || statusText ) + ""; + + // Success/Error + if ( isSuccess ) { + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); + } else { + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); + } + + // Status-dependent callbacks + jqXHR.statusCode( statusCode ); + statusCode = undefined; + + if ( fireGlobals ) { + globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", + [ jqXHR, s, isSuccess ? success : error ] ); + } + + // Complete + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); + + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + + // Handle the global AJAX counter + if ( !( --jQuery.active ) ) { + jQuery.event.trigger( "ajaxStop" ); + } + } + } + + return jqXHR; + }, + + getJSON: function( url, data, callback ) { + return jQuery.get( url, data, callback, "json" ); + }, + + getScript: function( url, callback ) { + return jQuery.get( url, undefined, callback, "script" ); + } +} ); + +jQuery.each( [ "get", "post" ], function( _i, method ) { + jQuery[ method ] = function( url, data, callback, type ) { + + // Shift arguments if data argument was omitted + if ( isFunction( data ) ) { + type = type || callback; + callback = data; + data = undefined; + } + + // The url can be an options object (which then must have .url) + return jQuery.ajax( jQuery.extend( { + url: url, + type: method, + dataType: type, + data: data, + success: callback + }, jQuery.isPlainObject( url ) && url ) ); + }; +} ); + +jQuery.ajaxPrefilter( function( s ) { + var i; + for ( i in s.headers ) { + if ( i.toLowerCase() === "content-type" ) { + s.contentType = s.headers[ i ] || ""; + } + } +} ); + + +jQuery._evalUrl = function( url, options, doc ) { + return jQuery.ajax( { + url: url, + + // Make this explicit, since user can override this through ajaxSetup (#11264) + type: "GET", + dataType: "script", + cache: true, + async: false, + global: false, + + // Only evaluate the response if it is successful (gh-4126) + // dataFilter is not invoked for failure responses, so using it instead + // of the default converter is kludgy but it works. + converters: { + "text script": function() {} + }, + dataFilter: function( response ) { + jQuery.globalEval( response, options, doc ); + } + } ); +}; + + +jQuery.fn.extend( { + wrapAll: function( html ) { + var wrap; + + if ( this[ 0 ] ) { + if ( isFunction( html ) ) { + html = html.call( this[ 0 ] ); + } + + // The elements to wrap the target around + wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); + + if ( this[ 0 ].parentNode ) { + wrap.insertBefore( this[ 0 ] ); + } + + wrap.map( function() { + var elem = this; + + while ( elem.firstElementChild ) { + elem = elem.firstElementChild; + } + + return elem; + } ).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( isFunction( html ) ) { + return this.each( function( i ) { + jQuery( this ).wrapInner( html.call( this, i ) ); + } ); + } + + return this.each( function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + } ); + }, + + wrap: function( html ) { + var htmlIsFunction = isFunction( html ); + + return this.each( function( i ) { + jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); + } ); + }, + + unwrap: function( selector ) { + this.parent( selector ).not( "body" ).each( function() { + jQuery( this ).replaceWith( this.childNodes ); + } ); + return this; + } +} ); + + +jQuery.expr.pseudos.hidden = function( elem ) { + return !jQuery.expr.pseudos.visible( elem ); +}; +jQuery.expr.pseudos.visible = function( elem ) { + return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); +}; + + + + +jQuery.ajaxSettings.xhr = function() { + try { + return new window.XMLHttpRequest(); + } catch ( e ) {} +}; + +var xhrSuccessStatus = { + + // File protocol always yields status code 0, assume 200 + 0: 200, + + // Support: IE <=9 only + // #1450: sometimes IE returns 1223 when it should be 204 + 1223: 204 + }, + xhrSupported = jQuery.ajaxSettings.xhr(); + +support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); +support.ajax = xhrSupported = !!xhrSupported; + +jQuery.ajaxTransport( function( options ) { + var callback, errorCallback; + + // Cross domain only allowed if supported through XMLHttpRequest + if ( support.cors || xhrSupported && !options.crossDomain ) { + return { + send: function( headers, complete ) { + var i, + xhr = options.xhr(); + + xhr.open( + options.type, + options.url, + options.async, + options.username, + options.password + ); + + // Apply custom fields if provided + if ( options.xhrFields ) { + for ( i in options.xhrFields ) { + xhr[ i ] = options.xhrFields[ i ]; + } + } + + // Override mime type if needed + if ( options.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( options.mimeType ); + } + + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { + headers[ "X-Requested-With" ] = "XMLHttpRequest"; + } + + // Set headers + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } + + // Callback + callback = function( type ) { + return function() { + if ( callback ) { + callback = errorCallback = xhr.onload = + xhr.onerror = xhr.onabort = xhr.ontimeout = + xhr.onreadystatechange = null; + + if ( type === "abort" ) { + xhr.abort(); + } else if ( type === "error" ) { + + // Support: IE <=9 only + // On a manual native abort, IE9 throws + // errors on any property access that is not readyState + if ( typeof xhr.status !== "number" ) { + complete( 0, "error" ); + } else { + complete( + + // File: protocol always yields status 0; see #8605, #14207 + xhr.status, + xhr.statusText + ); + } + } else { + complete( + xhrSuccessStatus[ xhr.status ] || xhr.status, + xhr.statusText, + + // Support: IE <=9 only + // IE9 has no XHR2 but throws on binary (trac-11426) + // For XHR2 non-text, let the caller handle it (gh-2498) + ( xhr.responseType || "text" ) !== "text" || + typeof xhr.responseText !== "string" ? + { binary: xhr.response } : + { text: xhr.responseText }, + xhr.getAllResponseHeaders() + ); + } + } + }; + }; + + // Listen to events + xhr.onload = callback(); + errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); + + // Support: IE 9 only + // Use onreadystatechange to replace onabort + // to handle uncaught aborts + if ( xhr.onabort !== undefined ) { + xhr.onabort = errorCallback; + } else { + xhr.onreadystatechange = function() { + + // Check readyState before timeout as it changes + if ( xhr.readyState === 4 ) { + + // Allow onerror to be called first, + // but that will not handle a native abort + // Also, save errorCallback to a variable + // as xhr.onerror cannot be accessed + window.setTimeout( function() { + if ( callback ) { + errorCallback(); + } + } ); + } + }; + } + + // Create the abort callback + callback = callback( "abort" ); + + try { + + // Do send the request (this may raise an exception) + xhr.send( options.hasContent && options.data || null ); + } catch ( e ) { + + // #14683: Only rethrow if this hasn't been notified as an error yet + if ( callback ) { + throw e; + } + } + }, + + abort: function() { + if ( callback ) { + callback(); + } + } + }; + } +} ); + + + + +// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) +jQuery.ajaxPrefilter( function( s ) { + if ( s.crossDomain ) { + s.contents.script = false; + } +} ); + +// Install script dataType +jQuery.ajaxSetup( { + accepts: { + script: "text/javascript, application/javascript, " + + "application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /\b(?:java|ecma)script\b/ + }, + converters: { + "text script": function( text ) { + jQuery.globalEval( text ); + return text; + } + } +} ); + +// Handle cache's special case and crossDomain +jQuery.ajaxPrefilter( "script", function( s ) { + if ( s.cache === undefined ) { + s.cache = false; + } + if ( s.crossDomain ) { + s.type = "GET"; + } +} ); + +// Bind script tag hack transport +jQuery.ajaxTransport( "script", function( s ) { + + // This transport only deals with cross domain or forced-by-attrs requests + if ( s.crossDomain || s.scriptAttrs ) { + var script, callback; + return { + send: function( _, complete ) { + script = jQuery( " + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • »
  • +
  • Index
  • +
  • +
  • +
+
+
+
+
+ + +

Index

+ +
+ A + | C + | D + | F + | G + | I + | K + | L + | M + | N + | P + | S + | T + | U + | X + | Y + +
+

A

+ + + +
+ +

C

+ + + +
+ +

D

+ + + +
+ +

F

+ + +
+ +

G

+ + + +
+ +

I

+ + + +
+ +

K

+ + + +
+ +

L

+ + +
+ +

M

+ + +
+ +

N

+ + +
+ +

P

+ + + +
+ +

S

+ + + +
+ +

T

+ + + +
+ +

U

+ + +
+ +

X

+ + + +
+ +

Y

+ + +
+ + + +
+
+
+ +
+ +
+

© Copyright 2021, Aditya M. Deshpande.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/includeme/apidocuments.html b/docs/includeme/apidocuments.html new file mode 100644 index 0000000..5e7435f --- /dev/null +++ b/docs/includeme/apidocuments.html @@ -0,0 +1,1455 @@ + + + + + + + Tracker — Multi-object trackers in Python 1.0.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Tracker

+
+
+class motrackers.tracker.Tracker(max_lost=5, tracker_output_format='mot_challenge')[source]
+

Greedy Tracker with tracking based on centroid location of the bounding box of the object. +This tracker is also referred as CentroidTracker in this repository.

+
+
Parameters
+
    +
  • max_lost (int) – Maximum number of consecutive frames object was not detected.

  • +
  • tracker_output_format (str) – Output format of the tracker.

  • +
+
+
+
+
+static preprocess_input(bboxes, class_ids, detection_scores)[source]
+

Preprocess the input data.

+
+
Parameters
+
    +
  • bboxes (list or numpy.ndarray) – Array of bounding boxes with each bbox as a tuple containing (xmin, ymin, width, height).

  • +
  • class_ids (list or numpy.ndarray) – Array of Class ID or label ID.

  • +
  • detection_scores (list or numpy.ndarray) – Array of detection scores (a.k.a. detection probabilities).

  • +
+
+
Returns
+

Data for detections as list of tuples containing (bbox, class_id, detection_score).

+
+
Return type
+

detections (list[Tuple])

+
+
+
+ +
+
+update(bboxes, detection_scores, class_ids)[source]
+

Update the tracker based on the new bounding boxes.

+
+
Parameters
+
    +
  • bboxes (numpy.ndarray or list) – List of bounding boxes detected in the current frame. Each element of the list represent +coordinates of bounding box as tuple (top-left-x, top-left-y, width, height).

  • +
  • detection_scores (numpy.ndarray or list) – List of detection scores (probability) of each detected object.

  • +
  • class_ids (numpy.ndarray or list) – List of class_ids (int) corresponding to labels of the detected object. Default is None.

  • +
+
+
Returns
+

List of tracks being currently tracked by the tracker. Each track is represented by the tuple with elements (frame_id, track_id, bb_left, bb_top, bb_width, bb_height, conf, x, y, z).

+
+
Return type
+

list

+
+
+
+ +
+ +
+
+

SORT

+
+
+motrackers.sort_tracker.assign_tracks2detection_iou(bbox_tracks, bbox_detections, iou_threshold=0.3)[source]
+

Assigns detected bounding boxes to tracked bounding boxes using IoU as a distance metric.

+
+
Parameters
+
    +
  • bbox_tracks (numpy.ndarray) – Bounding boxes of shape (N, 4) where N is number of objects already being tracked.

  • +
  • bbox_detections (numpy.ndarray) – Bounding boxes of shape (M, 4) where M is number of objects that are newly detected.

  • +
  • iou_threshold (float) – IOU threashold.

  • +
+
+
Returns
+

+
Tuple contains the following elements in the given order:
    +
  • matches (numpy.ndarray): Array of shape (n, 2) where n is number of pairs formed after matching tracks to detections. This is an array of tuples with each element as matched pair of indices`(track_index, detection_index)`.

  • +
  • unmatched_detections (numpy.ndarray): Array of shape (m,) where m is number of unmatched detections.

  • +
  • unmatched_tracks (numpy.ndarray): Array of shape (k,) where k is the number of unmatched tracks.

  • +
+
+
+

+
+
Return type
+

tuple

+
+
+
+ +
+
+class motrackers.sort_tracker.SORT(max_lost=0, tracker_output_format='mot_challenge', iou_threshold=0.3, process_noise_scale=1.0, measurement_noise_scale=1.0, time_step=1)[source]
+

SORT - Multi object tracker.

+
+
Parameters
+
    +
  • max_lost (int) – Max. number of times a object is lost while tracking.

  • +
  • tracker_output_format (str) – Output format of the tracker.

  • +
  • iou_threshold (float) – Intersection over union minimum value.

  • +
  • process_noise_scale (float or numpy.ndarray) – Process noise covariance matrix of shape (3, 3) +or covariance magnitude as scalar value.

  • +
  • measurement_noise_scale (float or numpy.ndarray) – Measurement noise covariance matrix of shape (1,) +or covariance magnitude as scalar value.

  • +
  • time_step (int or float) – Time step for Kalman Filter.

  • +
+
+
+
+
+update(bboxes, detection_scores, class_ids)[source]
+

Update the tracker based on the new bounding boxes.

+
+
Parameters
+
    +
  • bboxes (numpy.ndarray or list) – List of bounding boxes detected in the current frame. Each element of the list represent +coordinates of bounding box as tuple (top-left-x, top-left-y, width, height).

  • +
  • detection_scores (numpy.ndarray or list) – List of detection scores (probability) of each detected object.

  • +
  • class_ids (numpy.ndarray or list) – List of class_ids (int) corresponding to labels of the detected object. Default is None.

  • +
+
+
Returns
+

List of tracks being currently tracked by the tracker. Each track is represented by the tuple with elements (frame_id, track_id, bb_left, bb_top, bb_width, bb_height, conf, x, y, z).

+
+
Return type
+

list

+
+
+
+ +
+ +
+
+

IOU Tracker

+
+
+class motrackers.iou_tracker.IOUTracker(max_lost=2, iou_threshold=0.5, min_detection_confidence=0.4, max_detection_confidence=0.7, tracker_output_format='mot_challenge')[source]
+

Intersection over Union Tracker.

+

References

+ +
+
Parameters
+
    +
  • max_lost (int) – Maximum number of consecutive frames object was not detected.

  • +
  • tracker_output_format (str) – Output format of the tracker.

  • +
  • min_detection_confidence (float) – Threshold for minimum detection confidence.

  • +
  • max_detection_confidence (float) – Threshold for max. detection confidence.

  • +
  • iou_threshold (float) – Intersection over union minimum value.

  • +
+
+
+
+
+update(bboxes, detection_scores, class_ids)[source]
+

Update the tracker based on the new bounding boxes.

+
+
Parameters
+
    +
  • bboxes (numpy.ndarray or list) – List of bounding boxes detected in the current frame. Each element of the list represent +coordinates of bounding box as tuple (top-left-x, top-left-y, width, height).

  • +
  • detection_scores (numpy.ndarray or list) – List of detection scores (probability) of each detected object.

  • +
  • class_ids (numpy.ndarray or list) – List of class_ids (int) corresponding to labels of the detected object. Default is None.

  • +
+
+
Returns
+

List of tracks being currently tracked by the tracker. Each track is represented by the tuple with elements (frame_id, track_id, bb_left, bb_top, bb_width, bb_height, conf, x, y, z).

+
+
Return type
+

list

+
+
+
+ +
+ +
+
+

Kalman Filter based Centroid Tracker

+
+
+motrackers.centroid_kf_tracker.assign_tracks2detection_centroid_distances(bbox_tracks, bbox_detections, distance_threshold=10.0)[source]
+

Assigns detected bounding boxes to tracked bounding boxes using IoU as a distance metric.

+
+
Parameters
+
    +
  • bbox_tracks (numpy.ndarray) – Tracked bounding boxes with shape (n, 4) +and each row as (xmin, ymin, width, height).

  • +
  • bbox_detections (numpy.ndarray) – detection bounding boxes with shape (m, 4) and +each row as (xmin, ymin, width, height).

  • +
  • distance_threshold (float) – Minimum distance between the tracked object +and new detection to consider for assignment.

  • +
+
+
Returns
+

+
Tuple containing the following elements:
    +
  • matches (numpy.ndarray): Array of shape (n, 2) where n is number of pairs formed after matching tracks to detections. This is an array of tuples with each element as matched pair of indices`(track_index, detection_index)`.

  • +
  • unmatched_detections (numpy.ndarray): Array of shape (m,) where m is number of unmatched detections.

  • +
  • unmatched_tracks (numpy.ndarray): Array of shape (k,) where k is the number of unmatched tracks.

  • +
+
+
+

+
+
Return type
+

tuple

+
+
+
+ +
+
+class motrackers.centroid_kf_tracker.CentroidKF_Tracker(max_lost=1, centroid_distance_threshold=30.0, tracker_output_format='mot_challenge', process_noise_scale=1.0, measurement_noise_scale=1.0, time_step=1)[source]
+

Kalman filter based tracking of multiple detected objects.

+
+
Parameters
+
    +
  • max_lost (int) – Maximum number of consecutive frames object was not detected.

  • +
  • tracker_output_format (str) – Output format of the tracker.

  • +
  • process_noise_scale (float or numpy.ndarray) – Process noise covariance matrix of shape (3, 3) or +covariance magnitude as scalar value.

  • +
  • measurement_noise_scale (float or numpy.ndarray) – Measurement noise covariance matrix of shape (1,) +or covariance magnitude as scalar value.

  • +
  • time_step (int or float) – Time step for Kalman Filter.

  • +
+
+
+
+
+update(bboxes, detection_scores, class_ids)[source]
+

Update the tracker based on the new bounding boxes.

+
+
Parameters
+
    +
  • bboxes (numpy.ndarray or list) – List of bounding boxes detected in the current frame. Each element of the list represent +coordinates of bounding box as tuple (top-left-x, top-left-y, width, height).

  • +
  • detection_scores (numpy.ndarray or list) – List of detection scores (probability) of each detected object.

  • +
  • class_ids (numpy.ndarray or list) – List of class_ids (int) corresponding to labels of the detected object. Default is None.

  • +
+
+
Returns
+

List of tracks being currently tracked by the tracker. Each track is represented by the tuple with elements (frame_id, track_id, bb_left, bb_top, bb_width, bb_height, conf, x, y, z).

+
+
Return type
+

list

+
+
+
+ +
+ +
+
+

Tracks

+
+
+class motrackers.track.Track(track_id, frame_id, bbox, detection_confidence, class_id=None, lost=0, iou_score=0.0, data_output_format='mot_challenge', **kwargs)[source]
+

Track containing attributes to track various objects.

+
+
Parameters
+
    +
  • frame_id (int) – Camera frame id.

  • +
  • track_id (int) – Track Id

  • +
  • bbox (numpy.ndarray) – Bounding box pixel coordinates as (xmin, ymin, width, height) of the track.

  • +
  • detection_confidence (float) – Detection confidence of the object (probability).

  • +
  • class_id (str or int) – Class label id.

  • +
  • lost (int) – Number of times the object or track was not tracked by tracker in consecutive frames.

  • +
  • iou_score (float) – Intersection over union score.

  • +
  • data_output_format (str) – Output format for data in tracker. +Options include ['mot_challenge', 'visdrone_challenge']. Default is mot_challenge.

  • +
  • kwargs (dict) – Additional key word arguments.

  • +
+
+
+
+
+property centroid
+

Return the centroid of the bounding box.

+
+
Returns
+

Centroid (x, y) of bounding box.

+
+
Return type
+

numpy.ndarray

+
+
+
+ +
+
+get_mot_challenge_format()[source]
+

Get the tracker data in MOT challenge format as a tuple of elements containing +(frame, id, bb_left, bb_top, bb_width, bb_height, conf, x, y, z)

+

References

+ +
+
Returns
+

Tuple of 10 elements representing (frame, id, bb_left, bb_top, bb_width, bb_height, conf, x, y, z).

+
+
Return type
+

tuple

+
+
+
+ +
+
+get_vis_drone_format()[source]
+

Track data output in VISDRONE Challenge format with tuple as +(frame_index, target_id, bbox_left, bbox_top, bbox_width, bbox_height, score, object_category, +truncation, occlusion).

+

References

+ +
+
Returns
+

Tuple containing the elements as (frame_index, target_id, bbox_left, bbox_top, bbox_width, bbox_height, +score, object_category, truncation, occlusion).

+
+
Return type
+

tuple

+
+
+
+ +
+
+predict()[source]
+

Implement to prediction the next estimate of track.

+
+ +
+
+update(frame_id, bbox, detection_confidence, class_id=None, lost=0, iou_score=0.0, **kwargs)[source]
+

Update the track.

+
+
Parameters
+
    +
  • frame_id (int) – Camera frame id.

  • +
  • bbox (numpy.ndarray) – Bounding box pixel coordinates as (xmin, ymin, width, height) of the track.

  • +
  • detection_confidence (float) – Detection confidence of the object (probability).

  • +
  • class_id (int or str) – Class label id.

  • +
  • lost (int) – Number of times the object or track was not tracked by tracker in consecutive frames.

  • +
  • iou_score (float) – Intersection over union score.

  • +
  • kwargs (dict) – Additional key word arguments.

  • +
+
+
+
+ +
+ +
+
+class motrackers.track.KFTrackSORT(track_id, frame_id, bbox, detection_confidence, class_id=None, lost=0, iou_score=0.0, data_output_format='mot_challenge', process_noise_scale=1.0, measurement_noise_scale=1.0, **kwargs)[source]
+

Track based on Kalman filter tracker used for SORT MOT-Algorithm.

+
+
Parameters
+
    +
  • track_id (int) – Track Id

  • +
  • frame_id (int) – Camera frame id.

  • +
  • bbox (numpy.ndarray) – Bounding box pixel coordinates as (xmin, ymin, width, height) of the track.

  • +
  • detection_confidence (float) – Detection confidence of the object (probability).

  • +
  • class_id (str or int) – Class label id.

  • +
  • lost (int) – Number of times the object or track was not tracked by tracker in consecutive frames.

  • +
  • iou_score (float) – Intersection over union score.

  • +
  • data_output_format (str) – Output format for data in tracker. +Options ['mot_challenge', 'visdrone_challenge']. Default is mot_challenge.

  • +
  • process_noise_scale (float) – Process noise covariance scale or covariance magnitude as scalar value.

  • +
  • measurement_noise_scale (float) – Measurement noise covariance scale or covariance magnitude as scalar value.

  • +
  • kwargs (dict) – Additional key word arguments.

  • +
+
+
+
+
+predict()[source]
+

Predicts the next estimate of the bounding box of the track.

+
+
Returns
+

Bounding box pixel coordinates as (xmin, ymin, width, height) of the track.

+
+
Return type
+

numpy.ndarray

+
+
+
+ +
+
+update(frame_id, bbox, detection_confidence, class_id=None, lost=0, iou_score=0.0, **kwargs)[source]
+

Update the track.

+
+
Parameters
+
    +
  • frame_id (int) – Camera frame id.

  • +
  • bbox (numpy.ndarray) – Bounding box pixel coordinates as (xmin, ymin, width, height) of the track.

  • +
  • detection_confidence (float) – Detection confidence of the object (probability).

  • +
  • class_id (int or str) – Class label id.

  • +
  • lost (int) – Number of times the object or track was not tracked by tracker in consecutive frames.

  • +
  • iou_score (float) – Intersection over union score.

  • +
  • kwargs (dict) – Additional key word arguments.

  • +
+
+
+
+ +
+ +
+
+class motrackers.track.KFTrack4DSORT(track_id, frame_id, bbox, detection_confidence, class_id=None, lost=0, iou_score=0.0, data_output_format='mot_challenge', process_noise_scale=1.0, measurement_noise_scale=1.0, kf_time_step=1, **kwargs)[source]
+

Track based on Kalman filter tracker used for SORT MOT-Algorithm.

+
+
Parameters
+
    +
  • track_id (int) – Track Id

  • +
  • frame_id (int) – Camera frame id.

  • +
  • bbox (numpy.ndarray) – Bounding box pixel coordinates as (xmin, ymin, width, height) of the track.

  • +
  • detection_confidence (float) – Detection confidence of the object (probability).

  • +
  • class_id (str or int) – Class label id.

  • +
  • lost (int) – Number of times the object or track was not tracked by tracker in consecutive frames.

  • +
  • iou_score (float) – Intersection over union score.

  • +
  • data_output_format (str) – Output format for data in tracker. +Options ['mot_challenge', 'visdrone_challenge']. Default is mot_challenge.

  • +
  • process_noise_scale (float) – Process noise covariance scale or covariance magnitude as scalar value.

  • +
  • measurement_noise_scale (float) – Measurement noise covariance scale or covariance magnitude as scalar value.

  • +
  • kwargs (dict) – Additional key word arguments.

  • +
+
+
+
+
+predict()[source]
+

Implement to prediction the next estimate of track.

+
+ +
+
+update(frame_id, bbox, detection_confidence, class_id=None, lost=0, iou_score=0.0, **kwargs)[source]
+

Update the track.

+
+
Parameters
+
    +
  • frame_id (int) – Camera frame id.

  • +
  • bbox (numpy.ndarray) – Bounding box pixel coordinates as (xmin, ymin, width, height) of the track.

  • +
  • detection_confidence (float) – Detection confidence of the object (probability).

  • +
  • class_id (int or str) – Class label id.

  • +
  • lost (int) – Number of times the object or track was not tracked by tracker in consecutive frames.

  • +
  • iou_score (float) – Intersection over union score.

  • +
  • kwargs (dict) – Additional key word arguments.

  • +
+
+
+
+ +
+ +
+
+class motrackers.track.KFTrackCentroid(track_id, frame_id, bbox, detection_confidence, class_id=None, lost=0, iou_score=0.0, data_output_format='mot_challenge', process_noise_scale=1.0, measurement_noise_scale=1.0, **kwargs)[source]
+

Track based on Kalman filter used for Centroid Tracking of bounding box in MOT.

+
+
Parameters
+
    +
  • track_id (int) – Track Id

  • +
  • frame_id (int) – Camera frame id.

  • +
  • bbox (numpy.ndarray) – Bounding box pixel coordinates as (xmin, ymin, width, height) of the track.

  • +
  • detection_confidence (float) – Detection confidence of the object (probability).

  • +
  • class_id (str or int) – Class label id.

  • +
  • lost (int) – Number of times the object or track was not tracked by tracker in consecutive frames.

  • +
  • iou_score (float) – Intersection over union score.

  • +
  • data_output_format (str) – Output format for data in tracker. +Options ['mot_challenge', 'visdrone_challenge']. Default is mot_challenge.

  • +
  • process_noise_scale (float) – Process noise covariance scale or covariance magnitude as scalar value.

  • +
  • measurement_noise_scale (float) – Measurement noise covariance scale or covariance magnitude as scalar value.

  • +
  • kwargs (dict) – Additional key word arguments.

  • +
+
+
+
+
+predict()[source]
+

Predicts the next estimate of the bounding box of the track.

+
+
Returns
+

Bounding box pixel coordinates as (xmin, ymin, width, height) of the track.

+
+
Return type
+

numpy.ndarray

+
+
+
+ +
+
+update(frame_id, bbox, detection_confidence, class_id=None, lost=0, iou_score=0.0, **kwargs)[source]
+

Update the track.

+
+
Parameters
+
    +
  • frame_id (int) – Camera frame id.

  • +
  • bbox (numpy.ndarray) – Bounding box pixel coordinates as (xmin, ymin, width, height) of the track.

  • +
  • detection_confidence (float) – Detection confidence of the object (probability).

  • +
  • class_id (int or str) – Class label id.

  • +
  • lost (int) – Number of times the object or track was not tracked by tracker in consecutive frames.

  • +
  • iou_score (float) – Intersection over union score.

  • +
  • kwargs (dict) – Additional key word arguments.

  • +
+
+
+
+ +
+ +
+
+

Kalman Filters

+
+
+class motrackers.kalman_tracker.KalmanFilter(transition_matrix, measurement_matrix, control_matrix=None, process_noise_covariance=None, measurement_noise_covariance=None, prediction_covariance=None, initial_state=None)[source]
+

Kalman Filter Implementation.

+
+
Parameters
+
    +
  • transition_matrix (numpy.ndarray) – Transition matrix of shape (n, n).

  • +
  • measurement_matrix (numpy.ndarray) – Measurement matrix of shape (m, n).

  • +
  • control_matrix (numpy.ndarray) – Control matrix of shape (m, n).

  • +
  • process_noise_covariance (numpy.ndarray) – Covariance matrix of shape (n, n).

  • +
  • measurement_noise_covariance (numpy.ndarray) – Covariance matrix of shape (m, m).

  • +
  • prediction_covariance (numpy.ndarray) – Predicted (a priori) estimate covariance of shape (n, n).

  • +
  • initial_state (numpy.ndarray) – Initial state of shape (n,).

  • +
+
+
+
+
+predict(u=0)[source]
+

Prediction step of Kalman Filter.

+
+
Parameters
+

u (float or int or numpy.ndarray) – Control input. Default is 0.

+
+
Returns
+

State vector of shape (n,).

+
+
Return type
+

numpy.ndarray

+
+
+
+ +
+
+update(z)[source]
+

Measurement update of Kalman Filter.

+
+
Parameters
+

z (numpy.ndarray) – Measurement vector of the system with shape (m,).

+
+
+
+ +
+ +
+
+class motrackers.kalman_tracker.KFTrackerConstantAcceleration(initial_measurement, time_step=1, process_noise_scale=1.0, measurement_noise_scale=1.0)[source]
+

Kalman Filter with constant acceleration kinematic model.

+
+
Parameters
+
    +
  • initial_measurement (numpy.ndarray) – Initial state of the tracker.

  • +
  • time_step (float) – Time step.

  • +
  • process_noise_scale (float) – Process noise covariance scale. +or covariance magnitude as scalar value.

  • +
  • measurement_noise_scale (float) – Measurement noise covariance scale. +or covariance magnitude as scalar value.

  • +
+
+
+
+ +
+
+class motrackers.kalman_tracker.KFTracker1D(initial_measurement=array([0.0]), time_step=1, process_noise_scale=1.0, measurement_noise_scale=1.0)[source]
+
+ +
+
+class motrackers.kalman_tracker.KFTracker2D(initial_measurement=array([0.0, 0.0]), time_step=1, process_noise_scale=1.0, measurement_noise_scale=1.0)[source]
+
+ +
+
+class motrackers.kalman_tracker.KFTracker4D(initial_measurement=array([0.0, 0.0, 0.0, 0.0]), time_step=1, process_noise_scale=1.0, measurement_noise_scale=1.0)[source]
+
+ +
+
+class motrackers.kalman_tracker.KFTrackerSORT(bbox, process_noise_scale=1.0, measurement_noise_scale=1.0, time_step=1)[source]
+

Kalman filter for SORT.

+
+
Parameters
+
    +
  • bbox (numpy.ndarray) – Bounding box coordinates as (xmid, ymid, area, aspect_ratio).

  • +
  • time_step (float or int) – Time step.

  • +
  • process_noise_scale (float) – Scale (a.k.a covariance) of the process noise.

  • +
  • measurement_noise_scale (float) – Scale (a.k.a. covariance) of the measurement noise.

  • +
+
+
+
+ +
+
+

Object Detection

+
+
+class motrackers.detectors.detector.Detector(object_names, confidence_threshold, nms_threshold, draw_bboxes=True)[source]
+

Abstract class for detector.

+
+
Parameters
+
    +
  • object_names (dict) – Dictionary containing (key, value) as (class_id, class_name) for object detector.

  • +
  • confidence_threshold (float) – Confidence threshold for object detection.

  • +
  • nms_threshold (float) – Threshold for non-maximal suppression.

  • +
  • draw_bboxes (bool) – If true, draw bounding boxes on the image is possible.

  • +
+
+
+
+
+detect(image)[source]
+

Detect objects in the input image.

+
+
Parameters
+

image (numpy.ndarray) – Input image.

+
+
Returns
+

+
Tuple containing the following elements:
    +
  • bboxes (numpy.ndarray): Bounding boxes with shape (n, 4) containing detected objects with each row as (xmin, ymin, width, height).

  • +
  • confidences (numpy.ndarray): Confidence or detection probabilities if the detected objects with shape (n,).

  • +
  • class_ids (numpy.ndarray): Class_ids or label_ids of detected objects with shape (n, 4)

  • +
+
+
+

+
+
Return type
+

tuple

+
+
+
+ +
+
+draw_bboxes(image, bboxes, confidences, class_ids)[source]
+

Draw the bounding boxes about detected objects in the image.

+
+
Parameters
+
    +
  • image (numpy.ndarray) – Image or video frame.

  • +
  • bboxes (numpy.ndarray) – Bounding boxes pixel coordinates as (xmin, ymin, width, height)

  • +
  • confidences (numpy.ndarray) – Detection confidence or detection probability.

  • +
  • class_ids (numpy.ndarray) – Array containing class ids (aka label ids) of each detected object.

  • +
+
+
Returns
+

image with the bounding boxes drawn on it.

+
+
Return type
+

numpy.ndarray

+
+
+
+ +
+
+forward(image)[source]
+

Forward pass for the detector with input image.

+
+
Parameters
+

image (numpy.ndarray) – Input image.

+
+
Returns
+

detections

+
+
Return type
+

numpy.ndarray

+
+
+
+ +
+ +
+
+class motrackers.detectors.caffe.Caffe_SSDMobileNet(weights_path, configfile_path, labels_path, confidence_threshold=0.5, nms_threshold=0.2, draw_bboxes=True, use_gpu=False)[source]
+

Caffe SSD MobileNet model for Object Detection.

+
+
Parameters
+
    +
  • weights_path (str) – path to network weights file.

  • +
  • configfile_path (str) – path to network configuration file.

  • +
  • labels_path (str) – path to data labels json file.

  • +
  • confidence_threshold (float) – confidence threshold to select the detected object.

  • +
  • nms_threshold (float) – Non-maximum suppression threshold.

  • +
  • draw_bboxes (bool) – If True, assign colors for drawing bounding boxes on the image.

  • +
  • use_gpu (bool) – If True, try to load the model on GPU.

  • +
+
+
+
+
+forward(image)[source]
+

Forward pass for the detector with input image.

+
+
Parameters
+

image (numpy.ndarray) – Input image.

+
+
Returns
+

detections

+
+
Return type
+

numpy.ndarray

+
+
+
+ +
+ +
+
+class motrackers.detectors.tf.TF_SSDMobileNetV2(weights_path, configfile_path, labels_path, confidence_threshold=0.5, nms_threshold=0.4, draw_bboxes=True, use_gpu=False)[source]
+

Tensorflow SSD MobileNetv2 model for Object Detection.

+
+
Parameters
+
    +
  • weights_path (str) – path to network weights file.

  • +
  • configfile_path (str) – path to network configuration file.

  • +
  • labels_path (str) – path to data labels json file.

  • +
  • confidence_threshold (float) – confidence threshold to select the detected object.

  • +
  • nms_threshold (float) – Non-maximum suppression threshold.

  • +
  • draw_bboxes (bool) – If True, assign colors for drawing bounding boxes on the image.

  • +
  • use_gpu (bool) – If True, try to load the model on GPU.

  • +
+
+
+
+
+forward(image)[source]
+

Forward pass for the detector with input image.

+
+
Parameters
+

image (numpy.ndarray) – Input image.

+
+
Returns
+

detections

+
+
Return type
+

numpy.ndarray

+
+
+
+ +
+ +
+
+class motrackers.detectors.yolo.YOLOv3(weights_path, configfile_path, labels_path, confidence_threshold=0.5, nms_threshold=0.2, draw_bboxes=True, use_gpu=False)[source]
+

YOLOv3 Object Detector Module.

+
+
Parameters
+
    +
  • weights_path (str) – path to network weights file.

  • +
  • configfile_path (str) – path to network configuration file.

  • +
  • labels_path (str) – path to data labels json file.

  • +
  • confidence_threshold (float) – confidence threshold to select the detected object.

  • +
  • nms_threshold (float) – Non-maximum suppression threshold.

  • +
  • draw_bboxes (bool) – If True, assign colors for drawing bounding boxes on the image.

  • +
  • use_gpu (bool) – If True, try to load the model on GPU.

  • +
+
+
+
+
+detect(image)[source]
+

Detect objects in the input image.

+
+
Parameters
+

image (numpy.ndarray) – Input image.

+
+
Returns
+

+
Tuple containing the following elements:
    +
  • bboxes (numpy.ndarray): Bounding boxes with shape (n, 4) containing detected objects with each row as (xmin, ymin, width, height).

  • +
  • confidences (numpy.ndarray): Confidence or detection probabilities if the detected objects with shape (n,).

  • +
  • class_ids (numpy.ndarray): Class_ids or label_ids of detected objects with shape (n, 4)

  • +
+
+
+

+
+
Return type
+

tuple

+
+
+
+ +
+
+forward(image)[source]
+

Forward pass for the detector with input image.

+
+
Parameters
+

image (numpy.ndarray) – Input image.

+
+
Returns
+

detections

+
+
Return type
+

numpy.ndarray

+
+
+
+ +
+ +
+
+

Utilities

+
+
+motrackers.utils.misc.get_centroid(bboxes)[source]
+

Calculate centroids for multiple bounding boxes.

+
+
Parameters
+

bboxes (numpy.ndarray) – Array of shape (n, 4) or of shape (4,) where +each row contains (xmin, ymin, width, height).

+
+
Returns
+

Centroid (x, y) coordinates of shape (n, 2) or (2,).

+
+
Return type
+

numpy.ndarray

+
+
+
+ +
+
+motrackers.utils.misc.iou(bbox1, bbox2)[source]
+

Calculates the intersection-over-union of two bounding boxes. +Source: https://github.com/bochinski/iou-tracker/blob/master/util.py

+
+
Parameters
+
    +
  • bbox1 (numpy.array or list[floats]) – Bounding box of length 4 containing +(x-top-left, y-top-left, x-bottom-right, y-bottom-right).

  • +
  • bbox2 (numpy.array or list[floats]) – Bounding box of length 4 containing +(x-top-left, y-top-left, x-bottom-right, y-bottom-right).

  • +
+
+
Returns
+

intersection-over-onion of bbox1, bbox2.

+
+
Return type
+

float

+
+
+
+ +
+
+motrackers.utils.misc.iou_xywh(bbox1, bbox2)[source]
+

Calculates the intersection-over-union of two bounding boxes. +Source: https://github.com/bochinski/iou-tracker/blob/master/util.py

+
+
Parameters
+
    +
  • bbox1 (numpy.array or list[floats]) – bounding box of length 4 containing (x-top-left, y-top-left, width, height).

  • +
  • bbox2 (numpy.array or list[floats]) – bounding box of length 4 containing (x-top-left, y-top-left, width, height).

  • +
+
+
Returns
+

intersection-over-onion of bbox1, bbox2.

+
+
Return type
+

float

+
+
+
+ +
+
+motrackers.utils.misc.xyxy2xywh(xyxy)[source]
+

Convert bounding box coordinates from (xmin, ymin, xmax, ymax) format to (xmin, ymin, width, height).

+
+
Parameters
+

xyxy (numpy.ndarray) –

+
+
Returns
+

Bounding box coordinates (xmin, ymin, width, height).

+
+
Return type
+

numpy.ndarray

+
+
+
+ +
+
+motrackers.utils.misc.xywh2xyxy(xywh)[source]
+

Convert bounding box coordinates from (xmin, ymin, width, height) to (xmin, ymin, xmax, ymax) format.

+
+
Parameters
+

xywh (numpy.ndarray) – Bounding box coordinates as (xmin, ymin, width, height).

+
+
Returns
+

Bounding box coordinates as (xmin, ymin, xmax, ymax).

+
+
Return type
+

numpy.ndarray

+
+
+
+ +
+
+motrackers.utils.misc.midwh2xywh(midwh)[source]
+

Convert bounding box coordinates from (xmid, ymid, width, height) to (xmin, ymin, width, height) format.

+
+
Parameters
+

midwh (numpy.ndarray) – Bounding box coordinates (xmid, ymid, width, height).

+
+
Returns
+

Bounding box coordinates (xmin, ymin, width, height).

+
+
Return type
+

numpy.ndarray

+
+
+
+ +
+
+motrackers.utils.misc.intersection_complement_indices(big_set_indices, small_set_indices)[source]
+

Get the complement of intersection of two sets of indices.

+
+
Parameters
+
    +
  • big_set_indices (numpy.ndarray) – Indices of big set.

  • +
  • small_set_indices (numpy.ndarray) – Indices of small set.

  • +
+
+
Returns
+

Indices of set which is complementary to intersection of two input sets.

+
+
Return type
+

numpy.ndarray

+
+
+
+ +
+
+motrackers.utils.misc.nms(boxes, scores, overlapThresh, classes=None)[source]
+

Non-maximum suppression. based on Malisiewicz et al.

+
+
Parameters
+
    +
  • boxes (numpy.ndarray) – Boxes to process (xmin, ymin, xmax, ymax)

  • +
  • scores (numpy.ndarray) – Corresponding scores for each box

  • +
  • overlapThresh (float) – Overlap threshold for boxes to merge

  • +
  • classes (numpy.ndarray, optional) – Class ids for each box.

  • +
+
+
Returns
+

+
a tuple containing:
    +
  • boxes (list): nms boxes

  • +
  • scores (list): nms scores

  • +
  • classes (list, optional): nms classes if specified

  • +
+
+
+

+
+
Return type
+

tuple

+
+
+
+ +
+
+motrackers.utils.misc.draw_tracks(image, tracks)[source]
+

Draw on input image.

+
+
Parameters
+
    +
  • image (numpy.ndarray) – image

  • +
  • tracks (list) – list of tracks to be drawn on the image.

  • +
+
+
Returns
+

image with the track-ids drawn on it.

+
+
Return type
+

numpy.ndarray

+
+
+
+ +
+
+motrackers.utils.misc.load_labelsjson(json_file)[source]
+
+ +
+
+motrackers.utils.misc.dict2jsonfile(dict_data, json_file_path)[source]
+
+ +
+
+motrackers.utils.filechooser_utils.create_filechooser(default_path='~/', html_title='Select File', use_dir_icons=True)[source]
+
+ +
+
+motrackers.utils.filechooser_utils.select_caffemodel_prototxt(default_path='~/', use_dir_icons=True)[source]
+
+ +
+
+motrackers.utils.filechooser_utils.select_caffemodel_weights(default_path='~/', use_dir_icons=True)[source]
+
+ +
+
+motrackers.utils.filechooser_utils.select_caffemodel(default_path='~/', use_dir_icons=True)[source]
+
+ +
+
+motrackers.utils.filechooser_utils.select_videofile(default_path='~/', use_dir_icons=True)[source]
+
+ +
+
+motrackers.utils.filechooser_utils.select_yolo_weights(default_path='~/', use_dir_icons=True)[source]
+
+ +
+
+motrackers.utils.filechooser_utils.select_coco_labels(default_path='~/', use_dir_icons=True)[source]
+
+ +
+
+motrackers.utils.filechooser_utils.select_yolo_config(default_path='~/', use_dir_icons=True)[source]
+
+ +
+
+motrackers.utils.filechooser_utils.select_yolo_model(default_path='~/', use_dir_icons=True)[source]
+
+ +
+
+motrackers.utils.filechooser_utils.select_pbtxt(default_path='~/', use_dir_icons=True)[source]
+
+ +
+
+motrackers.utils.filechooser_utils.select_tfmobilenet_weights(default_path='~/', use_dir_icons=True)[source]
+
+ +
+
+motrackers.utils.filechooser_utils.select_tfmobilenet(default_path='~/', use_dir_icons=True)[source]
+
+ +
+

Download pretrained neural-network weights.

+

[Webpage] +[GitHub]

+
+

YOLOv3

+
cd multi-object-tracker
+cd ./examples/pretrained_models/yolo_weights
+sudo chmod +x ./get_yolo.sh
+./get_yolo.sh
+
+
+
+
+

TensorFlow - MobileNetSSDv2

+
cd multi-object-tracker
+cd ./pretrained_models/tensorflow_weights
+sudo chmod +x ./get_ssd_model.sh
+./get_ssd_model.sh
+
+
+
+
+

Caffemodel - MobileNetSSD

+
cd multi-object-tracker
+cd ./pretrained_models/caffemodel_weights
+sudo chmod +x ./get_caffemodel.sh
+./get_caffemodel.sh
+
+
+
+
+
+
+

References and Credits

+

[Webpage] +[GitHub]

+

This work is based on the following literature:

+
    +
  1. Bochinski, E., Eiselein, V., & Sikora, T. (2017, August). High-speed tracking-by-detection without using image information. In 2017 14th IEEE International Conference on Advanced Video and Signal Based Surveillance (AVSS) (pp. 1-6). IEEE. [pdf]

  2. +
  3. Bewley, A., Ge, Z., Ott, L., Ramos, F., & Upcroft, B. (2016, September). Simple online and realtime tracking. In 2016 IEEE International Conference on Image Processing (ICIP) (pp. 3464-3468). IEEE. [arxiv]

  4. +
  5. YOLOv3. [pdf][website]

  6. +
  7. Kalman Filter. [wiki]

  8. +
  9. TensorFlow Object Detection API [GitHub]

  10. +
  11. Caffe [website][GitHub]

  12. +
  13. OpenCV. [GitHub] [Website]

  14. +
+
+
+

Contributor Covenant Code of Conduct

+
+

Our Pledge

+

In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation.

+
+
+

Our Standards

+

Examples of behavior that contributes to creating a positive environment +include:

+
    +
  • Using welcoming and inclusive language

  • +
  • Being respectful of differing viewpoints and experiences

  • +
  • Gracefully accepting constructive criticism

  • +
  • Focusing on what is best for the community

  • +
  • Showing empathy towards other community members

  • +
+

Examples of unacceptable behavior by participants include:

+
    +
  • The use of sexualized language or imagery and unwelcome sexual attention or +advances

  • +
  • Trolling, insulting/derogatory comments, and personal or political attacks

  • +
  • Public or private harassment

  • +
  • Publishing others’ private information, such as a physical or electronic +address, without explicit permission

  • +
  • Other conduct which could reasonably be considered inappropriate in a +professional setting

  • +
+
+
+

Our Responsibilities

+

Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior.

+

Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful.

+
+
+

Scope

+

This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers.

+
+
+

Enforcement

+

Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at adityadeshpande2010@gmail.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately.

+

Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project’s leadership.

+
+
+

Attribution

+

This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

+

For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/includeme/readmefile.html b/docs/includeme/readmefile.html new file mode 100644 index 0000000..e58c3cd --- /dev/null +++ b/docs/includeme/readmefile.html @@ -0,0 +1,236 @@ + + + + + + + Multi-object trackers in Python — Multi-object trackers in Python 1.0.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Multi-object trackers in Python

+

Easy to use implementation of various multi-object tracking algorithms.

+DOI +


+Upload motrackers to PyPI +
+

Available Multi Object Trackers

+
    +
  • CentroidTracker

  • +
  • IOUTracker

  • +
  • CentroidKF_Tracker

  • +
  • SORT

  • +
+
+
+

Available OpenCV-based object detectors:

+
    +
  • detector.TF_SSDMobileNetV2

  • +
  • detector.Caffe_SSDMobileNet

  • +
  • detector.YOLOv3

  • +
+
+
+

Installation

+

Pip install for OpenCV (version 3.4.3 or later) is available here and can be done with the following command:

+
pip install motrackers
+
+
+

Additionally, you can install the package through GitHub instead:

+
git clone https://github.com/adipandas/multi-object-tracker
+cd multi-object-tracker
+pip install [-e] .
+
+
+

Note - for using neural network models with GPU
+For using the opencv dnn-based object detection modules provided in this repository with GPU, you may have to compile a CUDA enabled version of OpenCV from source.

+
    +
  • To build opencv from source, refer the following links: +[link-1], +[link-2]

  • +
+
+
+

How to use?: Examples

+

The interface for each tracker is simple and similar. Please refer the example template below.

+
from motrackers import CentroidTracker # or IOUTracker, CentroidKF_Tracker, SORT
+input_data = ...
+detector = ...
+tracker = CentroidTracker(...) # or IOUTracker(...), CentroidKF_Tracker(...), SORT(...)
+while True:
+    done, image = <read(input_data)>
+    if done:
+        break
+    detection_bboxes, detection_confidences, detection_class_ids = detector.detect(image)
+    # NOTE:
+    # * `detection_bboxes` are numpy.ndarray of shape (n, 4) with each row containing (bb_left, bb_top, bb_width, bb_height)
+    # * `detection_confidences` are numpy.ndarray of shape (n,);
+    # * `detection_class_ids` are numpy.ndarray of shape (n,).
+    output_tracks = tracker.update(detection_bboxes, detection_confidences, detection_class_ids)
+    # `output_tracks` is a list with each element containing tuple of
+    # (<frame>, <id>, <bb_left>, <bb_top>, <bb_width>, <bb_height>, <conf>, <x>, <y>, <z>)
+    for track in output_tracks:
+        frame, id, bb_left, bb_top, bb_width, bb_height, confidence, x, y, z = track
+        assert len(track) == 10
+        print(track)
+
+
+

Please refer examples folder of this repository for more details. You can clone and run the examples.

+
+
+

Pretrained object detection models

+

You will have to download the pretrained weights for the neural-network models. +The shell scripts for downloading these are provided here below respective folders. +Please refer DOWNLOAD_WEIGHTS.md for more details.

+
+

Notes

+
    +
  • There are some variations in implementations as compared to what appeared in papers of SORT and IoU Tracker.

  • +
  • In case you find any bugs in the algorithm, I will be happy to accept your pull request or you can create an issue to point it out.

  • +
+
+
+
+

References, Credits and Contributions

+

Please see REFERENCES.md and CONTRIBUTING.md.

+
+
+

Citation

+

If you use this repository in your work, please consider citing it with:

+
@misc{multiobjtracker_amd2018,
+  author = {Deshpande, Aditya M.},
+  title = {Multi-object trackers in Python},
+  year = {2020},
+  publisher = {GitHub},
+  journal = {GitHub repository},
+  howpublished = {\url{https://github.com/adipandas/multi-object-tracker}},
+}
+
+
+
+
+
+

Example: TF-MobileNetSSD + CentroidTracker

+Cows with tf-SSD +
+
+

Example: YOLOv3 + CentroidTracker

+Cars with YOLO +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..5d9d42f --- /dev/null +++ b/docs/index.html @@ -0,0 +1,215 @@ + + + + + + + Welcome to Multi-object trackers in Python’s documentation! — Multi-object trackers in Python 1.0.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • »
  • +
  • Welcome to Multi-object trackers in Python’s documentation!
  • +
  • + View page source +
  • +
+
+
+
+
+ +
+

Welcome to Multi-object trackers in Python’s documentation!

+ +
+
+

Indices and tables

+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000..6247f7e --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/docs/objects.inv b/docs/objects.inv new file mode 100644 index 0000000..fb1e2e6 Binary files /dev/null and b/docs/objects.inv differ diff --git a/CODE_OF_CONDUCT.md b/docs/readme/CODE_OF_CONDUCT.md similarity index 100% rename from CODE_OF_CONDUCT.md rename to docs/readme/CODE_OF_CONDUCT.md diff --git a/docs/readme/CONTRIBUTING.md b/docs/readme/CONTRIBUTING.md new file mode 100644 index 0000000..8afaa2c --- /dev/null +++ b/docs/readme/CONTRIBUTING.md @@ -0,0 +1,5 @@ +* @adipandas + +* @cnavarrete : Bug fix [issue #22](https://github.com/adipandas/multi-object-tracker/issues/22) + +* @cansik : Pull request [#31](https://github.com/adipandas/multi-object-tracker/pull/31) [#32](https://github.com/adipandas/multi-object-tracker/pull/32) diff --git a/docs/readme/REFERENCES.md b/docs/readme/REFERENCES.md new file mode 100644 index 0000000..844e273 --- /dev/null +++ b/docs/readme/REFERENCES.md @@ -0,0 +1,14 @@ +# References and Credits + +[[Webpage](https://adipandas.github.io/multi-object-tracker/)] +[[GitHub](https://github.com/adipandas/multi-object-tracker)] + +This work is based on the following literature: + +1. Bochinski, E., Eiselein, V., & Sikora, T. (2017, August). High-speed tracking-by-detection without using image information. In 2017 14th IEEE International Conference on Advanced Video and Signal Based Surveillance (AVSS) (pp. 1-6). IEEE. [[pdf](http://elvera.nue.tu-berlin.de/files/1517Bochinski2017.pdf)] +2. Bewley, A., Ge, Z., Ott, L., Ramos, F., & Upcroft, B. (2016, September). Simple online and realtime tracking. In 2016 IEEE International Conference on Image Processing (ICIP) (pp. 3464-3468). IEEE. [[arxiv](https://arxiv.org/abs/1602.00763)] +3. YOLOv3. [[pdf](https://pjreddie.com/media/files/papers/YOLOv3.pdf)][[website](https://pjreddie.com/darknet/yolo/)] +4. Kalman Filter. [[wiki](https://en.wikipedia.org/wiki/Kalman_filter)] +5. TensorFlow Object Detection API [[GitHub](https://github.com/tensorflow/models/tree/master/research/object_detection)] +6. Caffe [[website](https://caffe.berkeleyvision.org/)][[GitHub](https://github.com/BVLC/caffe)] +7. OpenCV. [[GitHub](https://github.com/opencv/opencv)] [[Website](https://opencv.org/)] \ No newline at end of file diff --git a/docs/search.html b/docs/search.html new file mode 100644 index 0000000..165fbf6 --- /dev/null +++ b/docs/search.html @@ -0,0 +1,128 @@ + + + + + + Search — Multi-object trackers in Python 1.0.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • »
  • +
  • Search
  • +
  • +
  • +
+
+
+
+
+ + + + +
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2021, Aditya M. Deshpande.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/docs/searchindex.js b/docs/searchindex.js new file mode 100644 index 0000000..4e244bb --- /dev/null +++ b/docs/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({"docnames": ["includeme/apidocuments", "includeme/readmefile", "index"], "filenames": ["includeme/apidocuments.rst", "includeme/readmefile.rst", "index.rst"], "titles": ["Tracker", "Multi-object trackers in Python", "Welcome to Multi-object trackers in Python\u2019s documentation!"], "terms": {"class": 0, "motrack": [0, 1], "max_lost": 0, "5": 0, "tracker_output_format": 0, "mot_challeng": 0, "sourc": [0, 1], "greedi": 0, "locat": 0, "bound": 0, "box": 0, "thi": [0, 1], "i": [0, 1], "also": 0, "centroidtrack": [0, 2], "repositori": [0, 1], "paramet": 0, "int": 0, "maximum": 0, "number": 0, "consecut": 0, "frame": [0, 1], "wa": 0, "str": 0, "output": 0, "format": 0, "static": 0, "preprocess_input": 0, "bbox": 0, "class_id": 0, "detection_scor": 0, "preprocess": 0, "input": 0, "data": 0, "list": [0, 1], "numpi": [0, 1], "ndarrai": [0, 1], "arrai": 0, "each": [0, 1], "tupl": [0, 1], "contain": [0, 1], "xmin": 0, "ymin": 0, "width": 0, "height": 0, "id": [0, 1], "label": 0, "score": 0, "k": 0, "probabl": 0, "return": 0, "type": 0, "updat": [0, 1], "new": 0, "current": 0, "element": [0, 1], "repres": 0, "coordin": 0, "top": 0, "left": 0, "x": [0, 1], "y": [0, 1], "correspond": 0, "default": 0, "none": 0, "being": 0, "frame_id": 0, "track_id": 0, "bb_left": [0, 1], "bb_top": [0, 1], "bb_width": [0, 1], "bb_height": [0, 1], "conf": [0, 1], "z": [0, 1], "sort_track": 0, "assign_tracks2detection_i": [0, 2], "bbox_track": 0, "bbox_detect": 0, "iou_threshold": 0, "0": 0, "3": [0, 1], "assign": 0, "us": [0, 2], "distanc": 0, "metric": 0, "shape": [0, 1], "n": [0, 1], "4": [0, 1], "where": 0, "alreadi": 0, "m": [0, 1], "ar": [0, 1], "newli": 0, "float": 0, "threashold": 0, "follow": [0, 1], "given": 0, "order": 0, "match": 0, "2": [0, 1], "pair": 0, "form": 0, "after": 0, "an": [0, 1], "indic": 0, "track_index": 0, "detection_index": 0, "unmatched_detect": 0, "unmatch": 0, "unmatched_track": 0, "process_noise_scal": 0, "1": [0, 1], "measurement_noise_scal": 0, "time_step": 0, "multi": 0, "max": 0, "time": 0, "lost": 0, "while": [0, 1], "intersect": 0, "over": 0, "union": 0, "minimum": 0, "valu": 0, "process": 0, "nois": 0, "covari": 0, "matrix": 0, "magnitud": 0, "scalar": 0, "measur": 0, "step": 0, "iou_track": 0, "ioutrack": [0, 1, 2], "min_detection_confid": 0, "max_detection_confid": 0, "7": 0, "implement": [0, 1], "algorithm": [0, 1], "heavili": 0, "http": [0, 1], "github": [0, 1], "com": [0, 1], "bochinski": 0, "threshold": 0, "confid": [0, 1], "centroid_kf_track": 0, "assign_tracks2detection_centroid_dist": [0, 2], "distance_threshold": 0, "10": [0, 1], "row": [0, 1], "between": 0, "consid": [0, 1], "centroidkf_track": [0, 1, 2], "centroid_distance_threshold": 0, "30": 0, "multipl": 0, "detection_confid": [0, 1], "iou_scor": 0, "data_output_format": 0, "kwarg": 0, "variou": [0, 1], "camera": 0, "pixel": 0, "option": 0, "includ": 0, "visdrone_challeng": 0, "dict": 0, "addit": 0, "kei": 0, "word": 0, "argument": 0, "properti": 0, "get_mot_challenge_format": 0, "get": 0, "mot": 0, "challeng": 0, "websit": 0, "motchalleng": 0, "net": 0, "get_vis_drone_format": 0, "visdron": 0, "frame_index": 0, "target_id": 0, "bbox_left": 0, "bbox_top": 0, "bbox_width": 0, "bbox_height": 0, "object_categori": 0, "truncat": 0, "occlus": 0, "aiskyey": 0, "paper": [0, 1], "arxiv": 0, "org": 0, "ab": 0, "2001": 0, "06303": 0, "visdrone2018": 0, "toolkit": 0, "predict": 0, "next": 0, "estim": 0, "kftracksort": [0, 2], "scale": 0, "kftrack4dsort": [0, 2], "kf_time_step": 0, "kftrackcentroid": [0, 2], "kalman_track": 0, "kalmanfilt": [0, 2], "transition_matrix": 0, "measurement_matrix": 0, "control_matrix": 0, "process_noise_covari": 0, "measurement_noise_covari": 0, "prediction_covari": 0, "initial_st": 0, "transit": 0, "control": 0, "priori": 0, "initi": 0, "state": 0, "u": 0, "vector": 0, "system": 0, "kftrackerconstantacceler": [0, 2], "initial_measur": 0, "constant": 0, "acceler": 0, "kinemat": 0, "model": [0, 2], "kftracker1d": [0, 2], "kftracker2d": [0, 2], "kftracker4d": [0, 2], "kftrackersort": [0, 2], "xmid": 0, "ymid": 0, "area": 0, "aspect_ratio": 0, "detector": [0, 2], "object_nam": 0, "confidence_threshold": 0, "nms_threshold": 0, "draw_bbox": 0, "true": [0, 1], "abstract": 0, "dictionari": 0, "class_nam": 0, "non": 0, "maxim": 0, "suppress": 0, "bool": 0, "If": [0, 1], "draw": 0, "imag": [0, 1], "possibl": 0, "label_id": 0, "about": 0, "video": 0, "aka": 0, "drawn": 0, "forward": 0, "pass": 0, "caff": 0, "caffe_ssdmobilenet": [0, 1, 2], "weights_path": 0, "configfile_path": 0, "labels_path": 0, "use_gpu": 0, "fals": 0, "ssd": 0, "mobilenet": 0, "path": 0, "file": 0, "configur": 0, "json": 0, "select": 0, "color": 0, "try": 0, "load": 0, "gpu": [0, 1], "tf": [0, 2], "tf_ssdmobilenetv2": [0, 1, 2], "mobilenetv2": 0, "yolo": 0, "modul": [0, 1], "misc": [0, 1], "get_centroid": [0, 2], "calcul": 0, "bbox1": 0, "bbox2": 0, "two": 0, "blob": 0, "master": 0, "py": 0, "length": 0, "bottom": 0, "right": 0, "onion": 0, "iou_xywh": [0, 2], "xyxy2xywh": [0, 2], "xyxi": 0, "convert": 0, "from": [0, 1], "xmax": 0, "ymax": 0, "xywh2xyxi": [0, 2], "xywh": 0, "midwh2xywh": [0, 2], "midwh": 0, "intersection_complement_indic": [0, 2], "big_set_indic": 0, "small_set_indic": 0, "complement": 0, "set": 0, "big": 0, "small": 0, "which": 0, "complementari": 0, "nm": [0, 2], "overlapthresh": 0, "malisiewicz": 0, "et": 0, "al": 0, "overlap": 0, "merg": 0, "specifi": 0, "draw_track": [0, 2], "load_labelsjson": [0, 2], "json_fil": 0, "dict2jsonfil": [0, 2], "dict_data": 0, "json_file_path": 0, "filechooser_util": 0, "create_filechoos": [0, 2], "default_path": 0, "html_titl": 0, "use_dir_icon": 0, "select_caffemodel_prototxt": [0, 2], "select_caffemodel_weight": [0, 2], "select_caffemodel": [0, 2], "select_videofil": [0, 2], "select_yolo_weight": [0, 2], "select_coco_label": [0, 2], "select_yolo_config": [0, 2], "select_yolo_model": [0, 2], "select_pbtxt": [0, 2], "select_tfmobilenet_weight": [0, 2], "select_tfmobilenet": [0, 2], "webpag": 0, "cd": [0, 1], "exampl": [0, 2], "pretrained_model": 0, "yolo_weight": 0, "sudo": 0, "chmod": 0, "get_yolo": 0, "sh": 0, "tensorflow_weight": 0, "get_ssd_model": 0, "caffemodel_weight": 0, "get_caffemodel": 0, "work": [0, 1], "literatur": 0, "e": [0, 1], "eiselein": 0, "v": 0, "sikora": 0, "t": 0, "2017": 0, "august": 0, "high": 0, "speed": 0, "without": 0, "inform": 0, "In": [0, 1], "14th": 0, "ieee": 0, "intern": 0, "confer": 0, "advanc": 0, "signal": 0, "surveil": 0, "avss": 0, "pp": 0, "6": 0, "pdf": 0, "bewlei": 0, "A": 0, "ge": 0, "ott": 0, "l": 0, "ramo": 0, "f": 0, "upcroft": 0, "b": 0, "2016": 0, "septemb": 0, "simpl": [0, 1], "onlin": 0, "realtim": 0, "icip": 0, "3464": 0, "3468": 0, "wiki": 0, "api": 0, "opencv": [0, 2], "interest": 0, "foster": 0, "open": 0, "welcom": 0, "environ": 0, "we": 0, "maintain": 0, "make": 0, "particip": 0, "project": 0, "commun": 0, "harass": 0, "free": 0, "experi": 0, "everyon": 0, "regardless": 0, "ag": 0, "bodi": 0, "size": 0, "disabl": 0, "ethnic": 0, "sex": 0, "characterist": 0, "gender": 0, "ident": 0, "express": 0, "level": 0, "educ": 0, "socio": 0, "econom": 0, "statu": 0, "nation": 0, "person": 0, "appear": [0, 1], "race": 0, "religion": 0, "sexual": 0, "orient": 0, "behavior": 0, "contribut": [0, 2], "creat": [0, 1], "posit": 0, "inclus": 0, "languag": 0, "Being": 0, "respect": [0, 1], "differ": 0, "viewpoint": 0, "gracefulli": 0, "accept": [0, 1], "construct": 0, "critic": 0, "focus": 0, "what": [0, 1], "best": 0, "show": 0, "empathi": 0, "toward": 0, "other": 0, "member": 0, "unaccept": 0, "The": [0, 1], "imageri": 0, "unwelcom": 0, "attent": 0, "troll": 0, "insult": 0, "derogatori": 0, "comment": 0, "polit": 0, "attack": 0, "public": 0, "privat": 0, "publish": [0, 1], "physic": 0, "electron": 0, "address": 0, "explicit": 0, "permiss": 0, "could": 0, "reason": 0, "inappropri": 0, "profession": 0, "clarifi": 0, "expect": 0, "take": 0, "appropri": 0, "fair": 0, "correct": 0, "action": 0, "ani": [0, 1], "instanc": 0, "have": [0, 1], "remov": 0, "edit": 0, "reject": 0, "commit": 0, "issu": [0, 1], "align": 0, "ban": 0, "temporarili": 0, "perman": 0, "thei": 0, "deem": 0, "threaten": 0, "offens": 0, "harm": 0, "appli": 0, "both": 0, "within": 0, "space": 0, "when": 0, "individu": 0, "its": 0, "offici": 0, "mail": 0, "post": 0, "via": 0, "social": 0, "media": 0, "account": 0, "act": 0, "appoint": 0, "offlin": 0, "event": 0, "represent": 0, "mai": [0, 1], "further": 0, "defin": 0, "abus": 0, "otherwis": 0, "report": 0, "contact": 0, "team": 0, "adityadeshpande2010": 0, "gmail": 0, "all": 0, "complaint": 0, "review": 0, "investig": 0, "result": 0, "necessari": 0, "circumst": 0, "oblig": 0, "confidenti": 0, "regard": 0, "incid": 0, "detail": [0, 1], "specif": 0, "polici": 0, "separ": 0, "who": 0, "do": 0, "good": 0, "faith": 0, "face": 0, "temporari": 0, "repercuss": 0, "determin": 0, "": 0, "leadership": 0, "adapt": 0, "version": [0, 1], "avail": [0, 2], "www": 0, "html": 0, "For": [0, 1], "answer": 0, "common": 0, "question": 0, "see": [0, 1], "faq": 0, "easi": 1, "track": [1, 2], "sort": [1, 2], "pip": 1, "later": 1, "here": 1, "can": 1, "done": 1, "command": 1, "addition": 1, "you": 1, "packag": 1, "through": 1, "instead": 1, "git": 1, "clone": 1, "adipanda": 1, "neural": [1, 2], "network": [1, 2], "dnn": 1, "provid": 1, "compil": 1, "cuda": 1, "enabl": 1, "To": 1, "build": 1, "link": 1, "interfac": 1, "similar": 1, "pleas": 1, "templat": 1, "below": 1, "import": 1, "input_data": 1, "read": 1, "break": 1, "detection_bbox": 1, "detection_class_id": 1, "output_track": 1, "assert": 1, "len": 1, "print": 1, "folder": 1, "more": 1, "run": 1, "download": [1, 2], "weight": [1, 2], "shell": 1, "script": 1, "download_weight": 1, "md": 1, "There": 1, "some": 1, "variat": 1, "compar": 1, "iou": [1, 2], "case": 1, "find": 1, "bug": 1, "happi": 1, "your": 1, "pull": 1, "request": 1, "point": 1, "out": 1, "cite": 1, "multiobjtracker_amd2018": 1, "author": 1, "deshpand": 1, "aditya": 1, "titl": 1, "year": 1, "2020": 1, "journal": 1, "howpublish": 1, "url": 1, "base": 2, "instal": 2, "how": 2, "pretrain": 2, "detect": 2, "refer": 2, "credit": 2, "citat": 2, "mobilenetssd": 2, "yolov3": 2, "kalman": 2, "filter": 2, "centroid": 2, "util": 2, "contributor": 2, "coven": 2, "code": 2, "conduct": 2, "our": 2, "pledg": 2, "standard": 2, "respons": 2, "scope": 2, "enforc": 2, "attribut": 2, "index": 2}, "objects": {"motrackers.centroid_kf_tracker": [[0, 0, 1, "", "CentroidKF_Tracker"], [0, 2, 1, "", "assign_tracks2detection_centroid_distances"]], "motrackers.centroid_kf_tracker.CentroidKF_Tracker": [[0, 1, 1, "", "update"]], "motrackers.detectors.caffe": [[0, 0, 1, "", "Caffe_SSDMobileNet"]], "motrackers.detectors.caffe.Caffe_SSDMobileNet": [[0, 1, 1, "", "forward"]], "motrackers.detectors.detector": [[0, 0, 1, "", "Detector"]], "motrackers.detectors.detector.Detector": [[0, 1, 1, "", "detect"], [0, 1, 1, "", "draw_bboxes"], [0, 1, 1, "", "forward"]], "motrackers.detectors.tf": [[0, 0, 1, "", "TF_SSDMobileNetV2"]], "motrackers.detectors.tf.TF_SSDMobileNetV2": [[0, 1, 1, "", "forward"]], "motrackers.detectors.yolo": [[0, 0, 1, "", "YOLOv3"]], "motrackers.detectors.yolo.YOLOv3": [[0, 1, 1, "", "detect"], [0, 1, 1, "", "forward"]], "motrackers.iou_tracker": [[0, 0, 1, "", "IOUTracker"]], "motrackers.iou_tracker.IOUTracker": [[0, 1, 1, "", "update"]], "motrackers.kalman_tracker": [[0, 0, 1, "", "KFTracker1D"], [0, 0, 1, "", "KFTracker2D"], [0, 0, 1, "", "KFTracker4D"], [0, 0, 1, "", "KFTrackerConstantAcceleration"], [0, 0, 1, "", "KFTrackerSORT"], [0, 0, 1, "", "KalmanFilter"]], "motrackers.kalman_tracker.KalmanFilter": [[0, 1, 1, "", "predict"], [0, 1, 1, "", "update"]], "motrackers.sort_tracker": [[0, 0, 1, "", "SORT"], [0, 2, 1, "", "assign_tracks2detection_iou"]], "motrackers.sort_tracker.SORT": [[0, 1, 1, "", "update"]], "motrackers.track": [[0, 0, 1, "", "KFTrack4DSORT"], [0, 0, 1, "", "KFTrackCentroid"], [0, 0, 1, "", "KFTrackSORT"], [0, 0, 1, "", "Track"]], "motrackers.track.KFTrack4DSORT": [[0, 1, 1, "", "predict"], [0, 1, 1, "", "update"]], "motrackers.track.KFTrackCentroid": [[0, 1, 1, "", "predict"], [0, 1, 1, "", "update"]], "motrackers.track.KFTrackSORT": [[0, 1, 1, "", "predict"], [0, 1, 1, "", "update"]], "motrackers.track.Track": [[0, 3, 1, "", "centroid"], [0, 1, 1, "", "get_mot_challenge_format"], [0, 1, 1, "", "get_vis_drone_format"], [0, 1, 1, "", "predict"], [0, 1, 1, "", "update"]], "motrackers.tracker": [[0, 0, 1, "", "Tracker"]], "motrackers.tracker.Tracker": [[0, 1, 1, "", "preprocess_input"], [0, 1, 1, "", "update"]], "motrackers.utils.filechooser_utils": [[0, 2, 1, "", "create_filechooser"], [0, 2, 1, "", "select_caffemodel"], [0, 2, 1, "", "select_caffemodel_prototxt"], [0, 2, 1, "", "select_caffemodel_weights"], [0, 2, 1, "", "select_coco_labels"], [0, 2, 1, "", "select_pbtxt"], [0, 2, 1, "", "select_tfmobilenet"], [0, 2, 1, "", "select_tfmobilenet_weights"], [0, 2, 1, "", "select_videofile"], [0, 2, 1, "", "select_yolo_config"], [0, 2, 1, "", "select_yolo_model"], [0, 2, 1, "", "select_yolo_weights"]], "motrackers.utils.misc": [[0, 2, 1, "", "dict2jsonfile"], [0, 2, 1, "", "draw_tracks"], [0, 2, 1, "", "get_centroid"], [0, 2, 1, "", "intersection_complement_indices"], [0, 2, 1, "", "iou"], [0, 2, 1, "", "iou_xywh"], [0, 2, 1, "", "load_labelsjson"], [0, 2, 1, "", "midwh2xywh"], [0, 2, 1, "", "nms"], [0, 2, 1, "", "xywh2xyxy"], [0, 2, 1, "", "xyxy2xywh"]]}, "objtypes": {"0": "py:class", "1": "py:method", "2": "py:function", "3": "py:property"}, "objnames": {"0": ["py", "class", "Python class"], "1": ["py", "method", "Python method"], "2": ["py", "function", "Python function"], "3": ["py", "property", "Python property"]}, "titleterms": {"tracker": [0, 1, 2], "sort": 0, "iou": 0, "kalman": 0, "filter": 0, "base": [0, 1], "centroid": 0, "track": 0, "object": [0, 1, 2], "detect": [0, 1], "util": 0, "download": 0, "pretrain": [0, 1], "neural": 0, "network": 0, "weight": 0, "yolov3": [0, 1], "tensorflow": 0, "mobilenetssdv2": 0, "caffemodel": 0, "mobilenetssd": [0, 1], "refer": [0, 1], "credit": [0, 1], "contributor": 0, "coven": 0, "code": 0, "conduct": 0, "our": 0, "pledg": 0, "standard": 0, "respons": 0, "scope": 0, "enforc": 0, "attribut": 0, "multi": [1, 2], "python": [1, 2], "avail": 1, "opencv": 1, "detector": 1, "instal": 1, "how": 1, "us": 1, "exampl": 1, "model": 1, "note": 1, "contribut": 1, "citat": 1, "tf": 1, "centroidtrack": 1, "welcom": 2, "": 2, "document": 2, "indic": 2, "tabl": 2}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1, "sphinx": 57}, "alltitles": {"Tracker": [[0, "tracker"]], "SORT": [[0, "sort"]], "IOU Tracker": [[0, "iou-tracker"]], "Kalman Filter based Centroid Tracker": [[0, "kalman-filter-based-centroid-tracker"]], "Tracks": [[0, "tracks"]], "Kalman Filters": [[0, "kalman-filters"]], "Object Detection": [[0, "object-detection"]], "Utilities": [[0, "utilities"]], "Download pretrained neural-network weights.": [[0, "download-pretrained-neural-network-weights"]], "YOLOv3": [[0, "yolov3"]], "TensorFlow - MobileNetSSDv2": [[0, "tensorflow-mobilenetssdv2"]], "Caffemodel - MobileNetSSD": [[0, "caffemodel-mobilenetssd"]], "References and Credits": [[0, "references-and-credits"]], "Contributor Covenant Code of Conduct": [[0, "contributor-covenant-code-of-conduct"]], "Our Pledge": [[0, "our-pledge"]], "Our Standards": [[0, "our-standards"]], "Our Responsibilities": [[0, "our-responsibilities"]], "Scope": [[0, "scope"]], "Enforcement": [[0, "enforcement"]], "Attribution": [[0, "attribution"]], "Multi-object trackers in Python": [[1, "multi-object-trackers-in-python"]], "Available Multi Object Trackers": [[1, "available-multi-object-trackers"]], "Available OpenCV-based object detectors:": [[1, "available-opencv-based-object-detectors"]], "Installation": [[1, "installation"]], "How to use?: Examples": [[1, "how-to-use-examples"]], "Pretrained object detection models": [[1, "pretrained-object-detection-models"]], "Notes": [[1, "notes"]], "References, Credits and Contributions": [[1, "references-credits-and-contributions"]], "Citation": [[1, "citation"]], "Example: TF-MobileNetSSD + CentroidTracker": [[1, "example-tf-mobilenetssd-centroidtracker"]], "Example: YOLOv3 + CentroidTracker": [[1, "example-yolov3-centroidtracker"]], "Welcome to Multi-object trackers in Python\u2019s documentation!": [[2, "welcome-to-multi-object-trackers-in-python-s-documentation"]], "Indices and tables": [[2, "indices-and-tables"]]}, "indexentries": {"caffe_ssdmobilenet (class in motrackers.detectors.caffe)": [[0, "motrackers.detectors.caffe.Caffe_SSDMobileNet"]], "centroidkf_tracker (class in motrackers.centroid_kf_tracker)": [[0, "motrackers.centroid_kf_tracker.CentroidKF_Tracker"]], "detector (class in motrackers.detectors.detector)": [[0, "motrackers.detectors.detector.Detector"]], "ioutracker (class in motrackers.iou_tracker)": [[0, "motrackers.iou_tracker.IOUTracker"]], "kftrack4dsort (class in motrackers.track)": [[0, "motrackers.track.KFTrack4DSORT"]], "kftrackcentroid (class in motrackers.track)": [[0, "motrackers.track.KFTrackCentroid"]], "kftracksort (class in motrackers.track)": [[0, "motrackers.track.KFTrackSORT"]], "kftracker1d (class in motrackers.kalman_tracker)": [[0, "motrackers.kalman_tracker.KFTracker1D"]], "kftracker2d (class in motrackers.kalman_tracker)": [[0, "motrackers.kalman_tracker.KFTracker2D"]], "kftracker4d (class in motrackers.kalman_tracker)": [[0, "motrackers.kalman_tracker.KFTracker4D"]], "kftrackerconstantacceleration (class in motrackers.kalman_tracker)": [[0, "motrackers.kalman_tracker.KFTrackerConstantAcceleration"]], "kftrackersort (class in motrackers.kalman_tracker)": [[0, "motrackers.kalman_tracker.KFTrackerSORT"]], "kalmanfilter (class in motrackers.kalman_tracker)": [[0, "motrackers.kalman_tracker.KalmanFilter"]], "sort (class in motrackers.sort_tracker)": [[0, "motrackers.sort_tracker.SORT"]], "tf_ssdmobilenetv2 (class in motrackers.detectors.tf)": [[0, "motrackers.detectors.tf.TF_SSDMobileNetV2"]], "track (class in motrackers.track)": [[0, "motrackers.track.Track"]], "tracker (class in motrackers.tracker)": [[0, "motrackers.tracker.Tracker"]], "yolov3 (class in motrackers.detectors.yolo)": [[0, "motrackers.detectors.yolo.YOLOv3"]], "assign_tracks2detection_centroid_distances() (in module motrackers.centroid_kf_tracker)": [[0, "motrackers.centroid_kf_tracker.assign_tracks2detection_centroid_distances"]], "assign_tracks2detection_iou() (in module motrackers.sort_tracker)": [[0, "motrackers.sort_tracker.assign_tracks2detection_iou"]], "centroid (motrackers.track.track property)": [[0, "motrackers.track.Track.centroid"]], "create_filechooser() (in module motrackers.utils.filechooser_utils)": [[0, "motrackers.utils.filechooser_utils.create_filechooser"]], "detect() (motrackers.detectors.detector.detector method)": [[0, "motrackers.detectors.detector.Detector.detect"]], "detect() (motrackers.detectors.yolo.yolov3 method)": [[0, "motrackers.detectors.yolo.YOLOv3.detect"]], "dict2jsonfile() (in module motrackers.utils.misc)": [[0, "motrackers.utils.misc.dict2jsonfile"]], "draw_bboxes() (motrackers.detectors.detector.detector method)": [[0, "motrackers.detectors.detector.Detector.draw_bboxes"]], "draw_tracks() (in module motrackers.utils.misc)": [[0, "motrackers.utils.misc.draw_tracks"]], "forward() (motrackers.detectors.caffe.caffe_ssdmobilenet method)": [[0, "motrackers.detectors.caffe.Caffe_SSDMobileNet.forward"]], "forward() (motrackers.detectors.detector.detector method)": [[0, "motrackers.detectors.detector.Detector.forward"]], "forward() (motrackers.detectors.tf.tf_ssdmobilenetv2 method)": [[0, "motrackers.detectors.tf.TF_SSDMobileNetV2.forward"]], "forward() (motrackers.detectors.yolo.yolov3 method)": [[0, "motrackers.detectors.yolo.YOLOv3.forward"]], "get_centroid() (in module motrackers.utils.misc)": [[0, "motrackers.utils.misc.get_centroid"]], "get_mot_challenge_format() (motrackers.track.track method)": [[0, "motrackers.track.Track.get_mot_challenge_format"]], "get_vis_drone_format() (motrackers.track.track method)": [[0, "motrackers.track.Track.get_vis_drone_format"]], "intersection_complement_indices() (in module motrackers.utils.misc)": [[0, "motrackers.utils.misc.intersection_complement_indices"]], "iou() (in module motrackers.utils.misc)": [[0, "motrackers.utils.misc.iou"]], "iou_xywh() (in module motrackers.utils.misc)": [[0, "motrackers.utils.misc.iou_xywh"]], "load_labelsjson() (in module motrackers.utils.misc)": [[0, "motrackers.utils.misc.load_labelsjson"]], "midwh2xywh() (in module motrackers.utils.misc)": [[0, "motrackers.utils.misc.midwh2xywh"]], "nms() (in module motrackers.utils.misc)": [[0, "motrackers.utils.misc.nms"]], "predict() (motrackers.kalman_tracker.kalmanfilter method)": [[0, "motrackers.kalman_tracker.KalmanFilter.predict"]], "predict() (motrackers.track.kftrack4dsort method)": [[0, "motrackers.track.KFTrack4DSORT.predict"]], "predict() (motrackers.track.kftrackcentroid method)": [[0, "motrackers.track.KFTrackCentroid.predict"]], "predict() (motrackers.track.kftracksort method)": [[0, "motrackers.track.KFTrackSORT.predict"]], "predict() (motrackers.track.track method)": [[0, "motrackers.track.Track.predict"]], "preprocess_input() (motrackers.tracker.tracker static method)": [[0, "motrackers.tracker.Tracker.preprocess_input"]], "select_caffemodel() (in module motrackers.utils.filechooser_utils)": [[0, "motrackers.utils.filechooser_utils.select_caffemodel"]], "select_caffemodel_prototxt() (in module motrackers.utils.filechooser_utils)": [[0, "motrackers.utils.filechooser_utils.select_caffemodel_prototxt"]], "select_caffemodel_weights() (in module motrackers.utils.filechooser_utils)": [[0, "motrackers.utils.filechooser_utils.select_caffemodel_weights"]], "select_coco_labels() (in module motrackers.utils.filechooser_utils)": [[0, "motrackers.utils.filechooser_utils.select_coco_labels"]], "select_pbtxt() (in module motrackers.utils.filechooser_utils)": [[0, "motrackers.utils.filechooser_utils.select_pbtxt"]], "select_tfmobilenet() (in module motrackers.utils.filechooser_utils)": [[0, "motrackers.utils.filechooser_utils.select_tfmobilenet"]], "select_tfmobilenet_weights() (in module motrackers.utils.filechooser_utils)": [[0, "motrackers.utils.filechooser_utils.select_tfmobilenet_weights"]], "select_videofile() (in module motrackers.utils.filechooser_utils)": [[0, "motrackers.utils.filechooser_utils.select_videofile"]], "select_yolo_config() (in module motrackers.utils.filechooser_utils)": [[0, "motrackers.utils.filechooser_utils.select_yolo_config"]], "select_yolo_model() (in module motrackers.utils.filechooser_utils)": [[0, "motrackers.utils.filechooser_utils.select_yolo_model"]], "select_yolo_weights() (in module motrackers.utils.filechooser_utils)": [[0, "motrackers.utils.filechooser_utils.select_yolo_weights"]], "update() (motrackers.centroid_kf_tracker.centroidkf_tracker method)": [[0, "motrackers.centroid_kf_tracker.CentroidKF_Tracker.update"]], "update() (motrackers.iou_tracker.ioutracker method)": [[0, "motrackers.iou_tracker.IOUTracker.update"]], "update() (motrackers.kalman_tracker.kalmanfilter method)": [[0, "motrackers.kalman_tracker.KalmanFilter.update"]], "update() (motrackers.sort_tracker.sort method)": [[0, "motrackers.sort_tracker.SORT.update"]], "update() (motrackers.track.kftrack4dsort method)": [[0, "motrackers.track.KFTrack4DSORT.update"]], "update() (motrackers.track.kftrackcentroid method)": [[0, "motrackers.track.KFTrackCentroid.update"]], "update() (motrackers.track.kftracksort method)": [[0, "motrackers.track.KFTrackSORT.update"]], "update() (motrackers.track.track method)": [[0, "motrackers.track.Track.update"]], "update() (motrackers.tracker.tracker method)": [[0, "motrackers.tracker.Tracker.update"]], "xywh2xyxy() (in module motrackers.utils.misc)": [[0, "motrackers.utils.misc.xywh2xyxy"]], "xyxy2xywh() (in module motrackers.utils.misc)": [[0, "motrackers.utils.misc.xyxy2xywh"]]}}) \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 0000000..c8ba582 --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,56 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +import os +import sys +sys.path.insert(0, os.path.abspath('./../../motrackers')) +sys.path.insert(0, os.path.abspath('./../../')) + + +# -- Project information ----------------------------------------------------- + +project = 'Multi-object trackers in Python' +copyright = '2021, Aditya M. Deshpande' +author = 'Aditya M. Deshpande' + +# The full version, including alpha/beta/rc tags +release = '1.0.0' + + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.napoleon', 'm2r2'] +source_suffix = ['.rst', '.md'] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = [] + + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'sphinx_rtd_theme' + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] diff --git a/docs/source/includeme/apidocuments.rst b/docs/source/includeme/apidocuments.rst new file mode 100644 index 0000000..fec745d --- /dev/null +++ b/docs/source/includeme/apidocuments.rst @@ -0,0 +1,135 @@ +.. reference_docs: + +Tracker +======= + +.. autoclass:: motrackers.tracker.Tracker + :members: + +SORT +==== + +.. autofunction:: motrackers.sort_tracker.assign_tracks2detection_iou + +.. autoclass:: motrackers.sort_tracker.SORT + :members: + +IOU Tracker +=========== + +.. autoclass:: motrackers.iou_tracker.IOUTracker + :members: + +Kalman Filter based Centroid Tracker +==================================== + +.. autofunction:: motrackers.centroid_kf_tracker.assign_tracks2detection_centroid_distances + +.. autoclass:: motrackers.centroid_kf_tracker.CentroidKF_Tracker + :members: + +Tracks +====== + +.. autoclass:: motrackers.track.Track + :members: + +.. autoclass:: motrackers.track.KFTrackSORT + :members: + +.. autoclass:: motrackers.track.KFTrack4DSORT + :members: + +.. autoclass:: motrackers.track.KFTrackCentroid + :members: + +Kalman Filters +============== + +.. autoclass:: motrackers.kalman_tracker.KalmanFilter + :members: + +.. autoclass:: motrackers.kalman_tracker.KFTrackerConstantAcceleration + :members: + +.. autoclass:: motrackers.kalman_tracker.KFTracker1D + :members: + +.. autoclass:: motrackers.kalman_tracker.KFTracker2D + :members: + +.. autoclass:: motrackers.kalman_tracker.KFTracker4D + :members: + +.. autoclass:: motrackers.kalman_tracker.KFTrackerSORT + :members: + +Object Detection +================ + +.. autoclass:: motrackers.detectors.detector.Detector + :members: + +.. autoclass:: motrackers.detectors.caffe.Caffe_SSDMobileNet + :members: + +.. autoclass:: motrackers.detectors.tf.TF_SSDMobileNetV2 + :members: + +.. autoclass:: motrackers.detectors.yolo.YOLOv3 + :members: + +Utilities +========= + +.. autofunction:: motrackers.utils.misc.get_centroid + +.. autofunction:: motrackers.utils.misc.iou + +.. autofunction:: motrackers.utils.misc.iou_xywh + +.. autofunction:: motrackers.utils.misc.xyxy2xywh + +.. autofunction:: motrackers.utils.misc.xywh2xyxy + +.. autofunction:: motrackers.utils.misc.midwh2xywh + +.. autofunction:: motrackers.utils.misc.intersection_complement_indices + +.. autofunction:: motrackers.utils.misc.nms + +.. autofunction:: motrackers.utils.misc.draw_tracks + +.. autofunction:: motrackers.utils.misc.load_labelsjson + +.. autofunction:: motrackers.utils.misc.dict2jsonfile + +.. autofunction:: motrackers.utils.filechooser_utils.create_filechooser + +.. autofunction:: motrackers.utils.filechooser_utils.select_caffemodel_prototxt + +.. autofunction:: motrackers.utils.filechooser_utils.select_caffemodel_weights + +.. autofunction:: motrackers.utils.filechooser_utils.select_caffemodel + +.. autofunction:: motrackers.utils.filechooser_utils.select_videofile + +.. autofunction:: motrackers.utils.filechooser_utils.select_yolo_weights + +.. autofunction:: motrackers.utils.filechooser_utils.select_coco_labels + +.. autofunction:: motrackers.utils.filechooser_utils.select_yolo_config + +.. autofunction:: motrackers.utils.filechooser_utils.select_yolo_model + +.. autofunction:: motrackers.utils.filechooser_utils.select_pbtxt + +.. autofunction:: motrackers.utils.filechooser_utils.select_tfmobilenet_weights + +.. autofunction:: motrackers.utils.filechooser_utils.select_tfmobilenet + +.. mdinclude:: ./../../../DOWNLOAD_WEIGHTS.md + +.. mdinclude:: ./../../readme/REFERENCES.md + +.. mdinclude:: ./../../readme/CODE_OF_CONDUCT.md diff --git a/docs/source/includeme/readmefile.rst b/docs/source/includeme/readmefile.rst new file mode 100644 index 0000000..80623e6 --- /dev/null +++ b/docs/source/includeme/readmefile.rst @@ -0,0 +1,19 @@ +.. mdinclude:: ./../../../README.md + +Example: `TF-MobileNetSSD + CentroidTracker` +============================================ + +.. image:: ./../../../examples/assets/cows.gif + :alt: Cows with tf-SSD + :target: https://flic.kr/p/26WeEWy + :class: with-shadow + :width: 600px + +Example: `YOLOv3 + CentroidTracker` +=================================== + +.. image:: ./../../../examples/assets/cars.gif + :alt: Cars with YOLO + :target: https://flic.kr/p/L6qyxj + :class: with-shadow + :width: 600px \ No newline at end of file diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 0000000..4fecd30 --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,20 @@ +.. Multi-object trackers in Python documentation master file, created by + sphinx-quickstart on Sat Feb 27 09:59:32 2021. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to Multi-object trackers in Python's documentation! +=========================================================== + +.. toctree:: + :maxdepth: 2 + + includeme/readmefile.rst + includeme/apidocuments.rst + + +Indices and tables +================== + +* :ref:`genindex` + diff --git a/examples/assets/cars.gif b/examples/assets/cars.gif new file mode 100644 index 0000000..bda4a0f Binary files /dev/null and b/examples/assets/cars.gif differ diff --git a/examples/assets/cows.gif b/examples/assets/cows.gif new file mode 100644 index 0000000..8538916 Binary files /dev/null and b/examples/assets/cows.gif differ diff --git a/examples/example_notebooks/detector_Caffe_SSDMobileNet.ipynb b/examples/example_notebooks/detector_Caffe_SSDMobileNet.ipynb new file mode 100644 index 0000000..b34f5cf --- /dev/null +++ b/examples/example_notebooks/detector_Caffe_SSDMobileNet.ipynb @@ -0,0 +1,117 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Loading Caffe-model weights for SSD" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np\n", + "import cv2 as cv\n", + "from motrackers.detectors.caffe import Caffe_SSDMobileNet" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "VIDEO_FILE = \"./../video_data/cars.mp4\"\n", + "WEIGHTS_PATH = \"./../pretrained_models/caffemodel_weights/MobileNetSSD_deploy.caffemodel\"\n", + "CONFIG_FILE_PATH = \"./../pretrained_models/caffemodel_weights/MobileNetSSD_deploy.prototxt\"\n", + "LABELS_PATH=\"./../pretrained_models/caffemodel_weights/ssd_mobilenet_caffe_names.json\"\n", + "CONFIDENCE_THRESHOLD = 0.5\n", + "NMS_THRESHOLD = 0.2\n", + "DRAW_BOUNDING_BOXES = True" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "model = Caffe_SSDMobileNet(\n", + " weights_path=WEIGHTS_PATH, \n", + " configfile_path=CONFIG_FILE_PATH,\n", + " labels_path=LABELS_PATH,\n", + " confidence_threshold=CONFIDENCE_THRESHOLD,\n", + " nms_threshold=NMS_THRESHOLD,\n", + " draw_bboxes=DRAW_BOUNDING_BOXES\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "cap = cv.VideoCapture(VIDEO_FILE)" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "scrolled": false + }, + "outputs": [], + "source": [ + "while True:\n", + " ok, image = cap.read()\n", + " \n", + " if not ok:\n", + " print(\"Cannot read the video feed.\")\n", + " break\n", + " \n", + " bboxes, confidences, class_ids = model.detect(image)\n", + " \n", + " updated_image = model.draw_bboxes(image.copy(), bboxes, confidences, class_ids)\n", + " \n", + " cv.imshow(\"image\", updated_image)\n", + " if cv.waitKey(1) & 0xFF == ord('q'):\n", + " break\n", + "\n", + "cap.release()\n", + "cv.destroyWindow(\"image\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "work_env", + "language": "python", + "name": "work_env" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.9" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/examples/example_notebooks/detector_TF_SSDMobileNetV2.ipynb b/examples/example_notebooks/detector_TF_SSDMobileNetV2.ipynb new file mode 100644 index 0000000..04520f4 --- /dev/null +++ b/examples/example_notebooks/detector_TF_SSDMobileNetV2.ipynb @@ -0,0 +1,126 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Object Detection - Tensorflow model of SSD-MobileNet-V2" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np\n", + "import cv2 as cv\n", + "from motrackers.detectors import TF_SSDMobileNetV2" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "VIDEO_FILE = \"./../video_data/cars.mp4\"\n", + "\n", + "WEIGHTS_PATH = (\n", + " './../pretrained_models/tensorflow_weights/ssd_mobilenet_v2_coco_2018_03_29/frozen_inference_graph.pb'\n", + ")\n", + "\n", + "CONFIG_FILE_PATH = './../pretrained_models/tensorflow_weights/ssd_mobilenet_v2_coco_2018_03_29.pbtxt'\n", + "\n", + "USE_GPU = False\n", + "\n", + "CONFIDENCE_THRESHOLD = 0.5\n", + "\n", + "NMS_THRESHOLD = 0.2\n", + "\n", + "DRAW_BOUNDING_BOXES = True\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "model = TF_SSDMobileNetV2(\n", + " weights_path=WEIGHTS_PATH,\n", + " configfile_path=CONFIG_FILE_PATH,\n", + " confidence_threshold=CONFIDENCE_THRESHOLD,\n", + " nms_threshold=NMS_THRESHOLD,\n", + " draw_bboxes=DRAW_BOUNDING_BOXES,\n", + " use_gpu=USE_GPU\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "cap = cv.VideoCapture(VIDEO_FILE)" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "scrolled": false + }, + "outputs": [], + "source": [ + "while True:\n", + " ok, image = cap.read()\n", + " \n", + " if not ok:\n", + " print(\"Cannot read the video feed.\")\n", + " break\n", + " \n", + " bboxes, confidences, class_ids = model.detect(image)\n", + " \n", + " updated_image = model.draw_bboxes(image.copy(), bboxes, confidences, class_ids)\n", + " \n", + " cv.imshow(\"image\", updated_image)\n", + " \n", + " if cv.waitKey(1) & 0xFF == ord('q'):\n", + " break\n", + "\n", + "cap.release()\n", + "cv.destroyWindow(\"image\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "work_env", + "language": "python", + "name": "work_env" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.9" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/examples/example_notebooks/detector_YOLOv3.ipynb b/examples/example_notebooks/detector_YOLOv3.ipynb new file mode 100644 index 0000000..48eb5eb --- /dev/null +++ b/examples/example_notebooks/detector_YOLOv3.ipynb @@ -0,0 +1,119 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Object Detection - YOLOv3" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np\n", + "import cv2 as cv\n", + "from motrackers.detectors import YOLOv3" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "VIDEO_FILE = \"./../video_data/cars.mp4\"\n", + "WEIGHTS_PATH = './../pretrained_models/yolo_weights/yolov3.weights'\n", + "CONFIG_FILE_PATH = './../pretrained_models/yolo_weights/yolov3.cfg'\n", + "LABELS_PATH = \"./../pretrained_models/yolo_weights/coco_names.json\"\n", + "\n", + "USE_GPU = False\n", + "CONFIDENCE_THRESHOLD = 0.5\n", + "NMS_THRESHOLD = 0.2\n", + "DRAW_BOUNDING_BOXES = True" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "model = YOLOv3(\n", + " weights_path=WEIGHTS_PATH,\n", + " configfile_path=CONFIG_FILE_PATH,\n", + " labels_path=LABELS_PATH,\n", + " confidence_threshold=CONFIDENCE_THRESHOLD,\n", + " nms_threshold=NMS_THRESHOLD,\n", + " draw_bboxes=DRAW_BOUNDING_BOXES,\n", + " use_gpu=USE_GPU\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "cap = cv.VideoCapture(VIDEO_FILE)" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "scrolled": false + }, + "outputs": [], + "source": [ + "while True:\n", + " ok, image = cap.read()\n", + " \n", + " if not ok:\n", + " print(\"Cannot read the video feed.\")\n", + " break\n", + " \n", + " bboxes, confidences, class_ids = model.detect(image)\n", + " updated_image = model.draw_bboxes(image.copy(), bboxes, confidences, class_ids)\n", + " \n", + " cv.imshow(\"image\", updated_image)\n", + " if cv.waitKey(1) & 0xFF == ord('q'):\n", + " break\n", + "\n", + "cap.release()\n", + "cv.destroyWindow(\"image\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "work_env", + "language": "python", + "name": "work_env" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.9" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/examples/example_notebooks/mot_Caffe_SSDMobileNet.ipynb b/examples/example_notebooks/mot_Caffe_SSDMobileNet.ipynb new file mode 100644 index 0000000..8557833 --- /dev/null +++ b/examples/example_notebooks/mot_Caffe_SSDMobileNet.ipynb @@ -0,0 +1,182 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Loading Caffe-model weights for SSD" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np\n", + "import cv2 as cv\n", + "from motrackers.detectors.caffe import Caffe_SSDMobileNet\n", + "from motrackers import CentroidTracker, CentroidKF_Tracker, SORT, IOUTracker\n", + "from motrackers.utils import draw_tracks\n", + "import ipywidgets as widgets" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "abd6e0e1d0aa46138a7fc205c466f217", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Select(description='MOTracker:', options=('CentroidTracker', 'CentroidKF_Tracker', 'SORT', 'IOUTracker'), valu…" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "chosen_tracker = widgets.Select(\n", + " options=[\"CentroidTracker\", \"CentroidKF_Tracker\", \"SORT\", \"IOUTracker\"],\n", + " value='CentroidTracker',\n", + " rows=5,\n", + " description='MOTracker:',\n", + " disabled=False\n", + ")\n", + "chosen_tracker" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "if chosen_tracker.value == 'CentroidTracker':\n", + " tracker = CentroidTracker(max_lost=0, tracker_output_format='mot_challenge')\n", + "elif chosen_tracker.value == 'CentroidKF_Tracker':\n", + " tracker = CentroidKF_Tracker(max_lost=0, tracker_output_format='mot_challenge')\n", + "elif chosen_tracker.value == 'SORT':\n", + " tracker = SORT(max_lost=3, tracker_output_format='mot_challenge', iou_threshold=0.3)\n", + "elif chosen_tracker.value == 'IOUTracker':\n", + " tracker = IOUTracker(max_lost=2, iou_threshold=0.5, min_detection_confidence=0.4, max_detection_confidence=0.7,\n", + " tracker_output_format='mot_challenge')\n", + "else:\n", + " print(\"Please choose one tracker from the above list.\")" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "VIDEO_FILE = \"./../video_data/cars.mp4\"\n", + "WEIGHTS_PATH = \"./../pretrained_models/caffemodel_weights/MobileNetSSD_deploy.caffemodel\"\n", + "CONFIG_FILE_PATH = \"./../pretrained_models/caffemodel_weights/MobileNetSSD_deploy.prototxt\"\n", + "LABELS_PATH=\"./../pretrained_models/caffemodel_weights/ssd_mobilenet_caffe_names.json\"\n", + "\n", + "CONFIDENCE_THRESHOLD = 0.5\n", + "NMS_THRESHOLD = 0.2\n", + "DRAW_BOUNDING_BOXES = True\n", + "USE_GPU=False" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "model = Caffe_SSDMobileNet(\n", + " weights_path=WEIGHTS_PATH,\n", + " configfile_path=CONFIG_FILE_PATH,\n", + " labels_path=LABELS_PATH,\n", + " confidence_threshold=CONFIDENCE_THRESHOLD,\n", + " nms_threshold=NMS_THRESHOLD, \n", + " draw_bboxes=DRAW_BOUNDING_BOXES,\n", + " use_gpu=USE_GPU\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "scrolled": false + }, + "outputs": [], + "source": [ + "def main(video_path, model, tracker):\n", + "\n", + " cap = cv.VideoCapture(video_path)\n", + " while True:\n", + " ok, image = cap.read()\n", + "\n", + " if not ok:\n", + " print(\"Cannot read the video feed.\")\n", + " break\n", + "\n", + " image = cv.resize(image, (700, 500))\n", + "\n", + " bboxes, confidences, class_ids = model.detect(image)\n", + " \n", + " tracks = tracker.update(bboxes, confidences, class_ids)\n", + " \n", + " updated_image = model.draw_bboxes(image.copy(), bboxes, confidences, class_ids)\n", + "\n", + " updated_image = draw_tracks(updated_image, tracks)\n", + "\n", + " cv.imshow(\"image\", updated_image)\n", + " if cv.waitKey(1) & 0xFF == ord('q'):\n", + " break\n", + "\n", + " cap.release()\n", + " cv.destroyAllWindows()" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "main(VIDEO_FILE, model, tracker)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "work_env", + "language": "python", + "name": "work_env" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.9" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/examples/example_notebooks/mot_TF_SSDMobileNetV2.ipynb b/examples/example_notebooks/mot_TF_SSDMobileNetV2.ipynb new file mode 100644 index 0000000..142de22 --- /dev/null +++ b/examples/example_notebooks/mot_TF_SSDMobileNetV2.ipynb @@ -0,0 +1,168 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Multiple object tracking with Tensorflow-SSD-MobileNetv2 based object detection." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np\n", + "import cv2 as cv\n", + "from motrackers.detectors import TF_SSDMobileNetV2\n", + "from motrackers import CentroidTracker, CentroidKF_Tracker, SORT, IOUTracker\n", + "from motrackers.utils import draw_tracks\n", + "import ipywidgets as widgets" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "VIDEO_FILE = \"./../video_data/cars.mp4\"\n", + "WEIGHTS_PATH = (\n", + " './../pretrained_models/tensorflow_weights/ssd_mobilenet_v2_coco_2018_03_29/frozen_inference_graph.pb')\n", + "CONFIG_FILE_PATH = './../pretrained_models/tensorflow_weights/ssd_mobilenet_v2_coco_2018_03_29.pbtxt'\n", + "LABELS_PATH = \"./../pretrained_models/tensorflow_weights/ssd_mobilenet_v2_coco_names.json\"\n", + "\n", + "CONFIDENCE_THRESHOLD = 0.5\n", + "NMS_THRESHOLD = 0.2\n", + "DRAW_BOUNDING_BOXES = True\n", + "USE_GPU = False" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "chosen_tracker = widgets.Select(\n", + " options=[\"CentroidTracker\", \"CentroidKF_Tracker\", \"SORT\", \"IOUTracker\"],\n", + " value='CentroidTracker',\n", + " rows=5,\n", + " description='MOTracker:',\n", + " disabled=False\n", + ")\n", + "chosen_tracker" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "if chosen_tracker.value == 'CentroidTracker':\n", + " tracker = CentroidTracker(max_lost=0, tracker_output_format='mot_challenge')\n", + "elif chosen_tracker.value == 'CentroidKF_Tracker':\n", + " tracker = CentroidKF_Tracker(max_lost=0, tracker_output_format='mot_challenge')\n", + "elif chosen_tracker.value == 'SORT':\n", + " tracker = SORT(max_lost=3, tracker_output_format='mot_challenge', iou_threshold=0.3)\n", + "elif chosen_tracker.value == 'IOUTracker':\n", + " tracker = IOUTracker(max_lost=2, iou_threshold=0.5, min_detection_confidence=0.4, max_detection_confidence=0.7,\n", + " tracker_output_format='mot_challenge')\n", + "else:\n", + " print(\"Please choose one tracker from the above list.\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "model = TF_SSDMobileNetV2(\n", + " weights_path=WEIGHTS_PATH,\n", + " configfile_path=CONFIG_FILE_PATH,\n", + " labels_path=LABELS_PATH,\n", + " confidence_threshold=CONFIDENCE_THRESHOLD,\n", + " nms_threshold=NMS_THRESHOLD,\n", + " draw_bboxes=DRAW_BOUNDING_BOXES,\n", + " use_gpu=USE_GPU\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "scrolled": false + }, + "outputs": [], + "source": [ + "def main(video_path, model, tracker):\n", + "\n", + " cap = cv.VideoCapture(video_path)\n", + " while True:\n", + " ok, image = cap.read()\n", + "\n", + " if not ok:\n", + " print(\"Cannot read the video feed.\")\n", + " break\n", + "\n", + " image = cv.resize(image, (700, 500))\n", + "\n", + " bboxes, confidences, class_ids = model.detect(image)\n", + " \n", + " tracks = tracker.update(bboxes, confidences, class_ids)\n", + " \n", + " updated_image = model.draw_bboxes(image.copy(), bboxes, confidences, class_ids)\n", + "\n", + " updated_image = draw_tracks(updated_image, tracks)\n", + "\n", + " cv.imshow(\"image\", updated_image)\n", + " if cv.waitKey(1) & 0xFF == ord('q'):\n", + " break\n", + "\n", + " cap.release()\n", + " cv.destroyAllWindows()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "main(VIDEO_FILE, model, tracker)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "work_env", + "language": "python", + "name": "work_env" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.9" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/examples/example_notebooks/mot_YOLOv3.ipynb b/examples/example_notebooks/mot_YOLOv3.ipynb new file mode 100644 index 0000000..248ee6d --- /dev/null +++ b/examples/example_notebooks/mot_YOLOv3.ipynb @@ -0,0 +1,182 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Multiple object tracking with YOLOv3-based object detection" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np\n", + "import cv2 as cv\n", + "from motrackers.detectors import YOLOv3\n", + "from motrackers import CentroidTracker, CentroidKF_Tracker, SORT, IOUTracker\n", + "from motrackers.utils import draw_tracks\n", + "import ipywidgets as widgets" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "VIDEO_FILE = \"./../video_data/cars.mp4\"\n", + "WEIGHTS_PATH = './../pretrained_models/yolo_weights/yolov3.weights'\n", + "CONFIG_FILE_PATH = './../pretrained_models/yolo_weights/yolov3.cfg'\n", + "LABELS_PATH = \"./../pretrained_models/yolo_weights/coco_names.json\"\n", + "\n", + "CONFIDENCE_THRESHOLD = 0.5\n", + "NMS_THRESHOLD = 0.2\n", + "DRAW_BOUNDING_BOXES = True\n", + "USE_GPU = False" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "ae18feabad2649079498e476cb1cc240", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Select(description='MOTracker:', options=('CentroidTracker', 'CentroidKF_Tracker', 'SORT', 'IOUTracker'), valu…" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "chosen_tracker = widgets.Select(\n", + " options=[\"CentroidTracker\", \"CentroidKF_Tracker\", \"SORT\", \"IOUTracker\"],\n", + " value='CentroidTracker',\n", + " rows=5,\n", + " description='MOTracker:',\n", + " disabled=False\n", + ")\n", + "chosen_tracker" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "if chosen_tracker.value == 'CentroidTracker':\n", + " tracker = CentroidTracker(max_lost=0, tracker_output_format='mot_challenge')\n", + "elif chosen_tracker.value == 'CentroidKF_Tracker':\n", + " tracker = CentroidKF_Tracker(max_lost=0, tracker_output_format='mot_challenge')\n", + "elif chosen_tracker.value == 'SORT':\n", + " tracker = SORT(max_lost=3, tracker_output_format='mot_challenge', iou_threshold=0.3)\n", + "elif chosen_tracker.value == 'IOUTracker':\n", + " tracker = IOUTracker(max_lost=2, iou_threshold=0.5, min_detection_confidence=0.4, max_detection_confidence=0.7,\n", + " tracker_output_format='mot_challenge')\n", + "else:\n", + " print(\"Please choose one tracker from the above list.\")" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "model = YOLOv3(\n", + " weights_path=WEIGHTS_PATH,\n", + " configfile_path=CONFIG_FILE_PATH,\n", + " labels_path=LABELS_PATH,\n", + " confidence_threshold=CONFIDENCE_THRESHOLD,\n", + " nms_threshold=NMS_THRESHOLD,\n", + " draw_bboxes=DRAW_BOUNDING_BOXES,\n", + " use_gpu=USE_GPU\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "scrolled": false + }, + "outputs": [], + "source": [ + "def main(video_path, model, tracker):\n", + "\n", + " cap = cv.VideoCapture(video_path)\n", + " while True:\n", + " ok, image = cap.read()\n", + "\n", + " if not ok:\n", + " print(\"Cannot read the video feed.\")\n", + " break\n", + "\n", + " image = cv.resize(image, (700, 500))\n", + "\n", + " bboxes, confidences, class_ids = model.detect(image)\n", + " \n", + " tracks = tracker.update(bboxes, confidences, class_ids)\n", + " \n", + " updated_image = model.draw_bboxes(image.copy(), bboxes, confidences, class_ids)\n", + "\n", + " updated_image = draw_tracks(updated_image, tracks)\n", + "\n", + " cv.imshow(\"image\", updated_image)\n", + " if cv.waitKey(1) & 0xFF == ord('q'):\n", + " break\n", + "\n", + " cap.release()\n", + " cv.destroyAllWindows()" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "main(VIDEO_FILE, model, tracker)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "work_env", + "language": "python", + "name": "work_env" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.9" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/examples/example_scripts/detector_Caffe_SSDMobileNet.py b/examples/example_scripts/detector_Caffe_SSDMobileNet.py new file mode 100644 index 0000000..8dce7e9 --- /dev/null +++ b/examples/example_scripts/detector_Caffe_SSDMobileNet.py @@ -0,0 +1,70 @@ +import cv2 as cv +from motrackers.detectors import Caffe_SSDMobileNet + + +def main(video_path, model): + cap = cv.VideoCapture(video_path) + + while True: + ok, image = cap.read() + + if not ok: + print("Cannot read the video feed.") + break + + bboxes, confidences, class_ids = model.detect(image) + updated_image = model.draw_bboxes(image, bboxes, confidences, class_ids) + + cv.imshow("image", updated_image) + if cv.waitKey(1) & 0xFF == ord('q'): + break + + cap.release() + cv.destroyAllWindows() + + +if __name__ == '__main__': + import argparse + + parser = argparse.ArgumentParser( + description='Object detections in input video using Caffemodel of MobileNetSSD.') + + parser.add_argument( + '--video', '-v', type=str, default="./../video_data/cars.mp4", help='Input video path.') + + parser.add_argument( + '--weights', '-w', type=str, + default="./../pretrained_models/caffemodel_weights/MobileNetSSD_deploy.caffemodel", + help='path to weights file of Caffe-MobileNetSSD, i.e., `.caffemodel` file.' + ) + + parser.add_argument( + '--config', '-c', type=str, + default="./../pretrained_models/caffemodel_weights/MobileNetSSD_deploy.prototxt", + help='path to config file of Caffe-MobileNetSSD, i.e., `.prototxt` file.' + ) + + parser.add_argument( + '--labels', '-l', type=str, + default="./../pretrained_models/caffemodel_weights/ssd_mobilenet_caffe_names.json", + help='path to labels file of coco dataset (`.json` file.)' + ) + + parser.add_argument( + '--gpu', type=bool, + default=False, help='Flag to use gpu to run the deep learning model. Default is `False`' + ) + + args = parser.parse_args() + + model = Caffe_SSDMobileNet( + weights_path=args.weights, + configfile_path=args.config, + labels_path=args.labels, + confidence_threshold=0.5, + nms_threshold=0.2, + draw_bboxes=True, + use_gpu=args.gpu + ) + + main(args.video, model) diff --git a/examples/example_scripts/detector_TF_SSDMobileNetV2.py b/examples/example_scripts/detector_TF_SSDMobileNetV2.py new file mode 100644 index 0000000..37f3005 --- /dev/null +++ b/examples/example_scripts/detector_TF_SSDMobileNetV2.py @@ -0,0 +1,69 @@ +import cv2 as cv +from motrackers.detectors import TF_SSDMobileNetV2 + + +def main(video_path, model): + cap = cv.VideoCapture(video_path) + while True: + ok, image = cap.read() + + if not ok: + print("Cannot read the video feed.") + break + + bboxes, confidences, class_ids = model.detect(image) + updated_image = model.draw_bboxes(image, bboxes, confidences, class_ids) + + cv.imshow("image", updated_image) + if cv.waitKey(1) & 0xFF == ord('q'): + break + + cap.release() + cv.destroyAllWindows() + + +if __name__ == '__main__': + import argparse + + parser = argparse.ArgumentParser( + description='Object detections in input video using TensorFlow model of MobileNetSSD.') + + parser.add_argument( + '--video', '-v', type=str, default="./../video_data/cars.mp4", help='Input video path.') + + parser.add_argument( + '--weights', '-w', type=str, + default="./../pretrained_models/tensorflow_weights/ssd_mobilenet_v2_coco_2018_03_29/frozen_inference_graph.pb", + help='path to weights file of tf-MobileNetSSD (`.pb` file).' + ) + + parser.add_argument( + '--config', '-c', type=str, + default="./../pretrained_models/tensorflow_weights/ssd_mobilenet_v2_coco_2018_03_29.pbtxt", + help='path to config file of Caffe-MobileNetSSD (`.pbtxt` file).' + ) + + parser.add_argument( + '--labels', '-l', type=str, + default="./../pretrained_models/tensorflow_weights/ssd_mobilenet_v2_coco_names.json", + help='path to labels file of coco dataset (`.names` file.)' + ) + + parser.add_argument( + '--gpu', type=bool, default=False, + help='Flag to use gpu to run the deep learning model. Default is `False`' + ) + + args = parser.parse_args() + + model = TF_SSDMobileNetV2( + weights_path=args.weights, + configfile_path=args.config, + labels_path=args.labels, + confidence_threshold=0.5, + nms_threshold=0.2, + draw_bboxes=True, + use_gpu=args.gpu + ) + + main(args.video, model) diff --git a/examples/example_scripts/detector_YOLOv3.py b/examples/example_scripts/detector_YOLOv3.py new file mode 100644 index 0000000..c5967ce --- /dev/null +++ b/examples/example_scripts/detector_YOLOv3.py @@ -0,0 +1,70 @@ +import cv2 as cv +from motrackers.detectors import YOLOv3 + + +def main(video_path, model): + cap = cv.VideoCapture(video_path) + while True: + ok, image = cap.read() + + if not ok: + print("Cannot read the video feed.") + break + + bboxes, confidences, class_ids = model.detect(image) + updated_image = model.draw_bboxes(image, bboxes, confidences, class_ids) + + cv.imshow("image", updated_image) + if cv.waitKey(1) & 0xFF == ord('q'): + break + + cap.release() + cv.destroyAllWindows() + + +if __name__ == '__main__': + import argparse + + parser = argparse.ArgumentParser( + description='Object detections in input video using YOLOv3 trained on COCO dataset.' + ) + + parser.add_argument( + '--video', '-v', type=str, default="./../video_data/cars.mp4", help='Input video path.') + + parser.add_argument( + '--weights', '-w', type=str, + default="./../pretrained_models/yolo_weights/yolov3.weights", + help='path to weights file of YOLOv3 (`.weights` file.)' + ) + + parser.add_argument( + '--config', '-c', type=str, + default="./../pretrained_models/yolo_weights/yolov3.cfg", + help='path to config file of YOLOv3 (`.cfg` file.)' + ) + + parser.add_argument( + '--labels', '-l', type=str, + default="./../pretrained_models/yolo_weights/coco_names.json", + help='path to labels file of coco dataset (`.names` file.)' + ) + + parser.add_argument( + '--gpu', type=bool, + default=False, help='Flag to use gpu to run the deep learning model. Default is `False`' + ) + + args = parser.parse_args() + + model = YOLOv3( + weights_path=args.weights, + configfile_path=args.config, + labels_path=args.labels, + confidence_threshold=0.5, + nms_threshold=0.2, + draw_bboxes=True, + use_gpu=args.gpu + ) + + main(args.video, model) diff --git a/examples/example_scripts/mot_Caffe_SSDMobileNet.py b/examples/example_scripts/mot_Caffe_SSDMobileNet.py new file mode 100644 index 0000000..46a7083 --- /dev/null +++ b/examples/example_scripts/mot_Caffe_SSDMobileNet.py @@ -0,0 +1,87 @@ +import cv2 as cv +from motrackers.detectors import Caffe_SSDMobileNet +from motrackers import CentroidTracker, CentroidKF_Tracker, SORT, IOUTracker +from motrackers.utils import draw_tracks + + +def main(video_path, model, tracker): + + cap = cv.VideoCapture(video_path) + while True: + ok, image = cap.read() + + if not ok: + print("Cannot read the video feed.") + break + + image = cv.resize(image, (700, 500)) + + bboxes, confidences, class_ids = model.detect(image) + tracks = tracker.update(bboxes, confidences, class_ids) + updated_image = model.draw_bboxes(image.copy(), bboxes, confidences, class_ids) + + updated_image = draw_tracks(updated_image, tracks) + + cv.imshow("image", updated_image) + if cv.waitKey(1) & 0xFF == ord('q'): + break + + cap.release() + cv.destroyAllWindows() + + +if __name__ == '__main__': + import argparse + + parser = argparse.ArgumentParser( + description='Object detections in input video using Caffemodel of MobileNetSSD.') + + parser.add_argument( + '--video', '-v', type=str, default="./../video_data/cars.mp4", help='Input video path.') + + parser.add_argument( + '--weights', '-w', type=str, default="./../pretrained_models/caffemodel_weights/MobileNetSSD_deploy.caffemodel", + help='path to weights file of Caffe-MobileNetSSD, i.e., `.caffemodel` file.') + + parser.add_argument( + '--config', '-c', type=str, default="./../pretrained_models/caffemodel_weights/MobileNetSSD_deploy.prototxt", + help='path to config file of Caffe-MobileNetSSD, i.e., `.prototxt` file.') + + parser.add_argument( + '--labels', '-l', type=str, + default="./../pretrained_models/caffemodel_weights/ssd_mobilenet_caffe_names.json", + help='path to labels file of coco dataset (`.names` file.)' + ) + + parser.add_argument( + '--gpu', type=bool, default=False, help='Flag to use gpu to run the deep learning model. Default is `False`') + + parser.add_argument( + '--tracker', type=str, default='SORT', help="Tracker used to track objects." + " Options include ['CentroidTracker', 'CentroidKF_Tracker', 'SORT', IOUTracker]") + + args = parser.parse_args() + + if args.tracker == 'CentroidTracker': + tracker = CentroidTracker(max_lost=0, tracker_output_format='mot_challenge') + elif args.tracker == 'CentroidKF_Tracker': + tracker = CentroidKF_Tracker(max_lost=0, tracker_output_format='mot_challenge') + elif args.tracker == 'SORT': + tracker = SORT(max_lost=3, tracker_output_format='mot_challenge', iou_threshold=0.3) + elif args.tracker == 'IOUTracker': + tracker = IOUTracker(max_lost=2, iou_threshold=0.5, min_detection_confidence=0.4, max_detection_confidence=0.7, + tracker_output_format='mot_challenge') + else: + raise NotImplementedError + + model = Caffe_SSDMobileNet( + weights_path=args.weights, + configfile_path=args.config, + labels_path=args.labels, + confidence_threshold=0.5, + nms_threshold=0.2, + draw_bboxes=True, + use_gpu=args.gpu + ) + + main(args.video, model, tracker) diff --git a/examples/example_scripts/mot_TF_SSDMobileNet.py b/examples/example_scripts/mot_TF_SSDMobileNet.py new file mode 100644 index 0000000..c643aaf --- /dev/null +++ b/examples/example_scripts/mot_TF_SSDMobileNet.py @@ -0,0 +1,94 @@ +import cv2 as cv +from motrackers.detectors import TF_SSDMobileNetV2 +from motrackers import CentroidTracker, CentroidKF_Tracker, SORT, IOUTracker +from motrackers.utils import draw_tracks + + +def main(video_path, model, tracker): + cap = cv.VideoCapture(video_path) + while True: + ok, image = cap.read() + + if not ok: + print("Cannot read the video feed.") + break + + image = cv.resize(image, (700, 500)) + + bboxes, confidences, class_ids = model.detect(image) + tracks = tracker.update(bboxes, confidences, class_ids) + updated_image = model.draw_bboxes(image.copy(), bboxes, confidences, class_ids) + + updated_image = draw_tracks(updated_image, tracks) + + cv.imshow("image", updated_image) + if cv.waitKey(1) & 0xFF == ord('q'): + break + + cap.release() + cv.destroyAllWindows() + + +if __name__ == '__main__': + import argparse + + parser = argparse.ArgumentParser( + description='Object detections in input video using TensorFlow model of MobileNetSSD.') + + parser.add_argument( + '--video', '-v', type=str, default="./../video_data/cars.mp4", help='Input video path.') + + parser.add_argument( + '--weights', '-w', type=str, + default="./../pretrained_models/tensorflow_weights/ssd_mobilenet_v2_coco_2018_03_29/frozen_inference_graph.pb", + help='path to weights file of tf-MobileNetSSD (`.pb` file).' + ) + + parser.add_argument( + '--config', '-c', + type=str, + default="./../pretrained_models/tensorflow_weights/ssd_mobilenet_v2_coco_2018_03_29.pbtxt", + help='path to config file of Caffe-MobileNetSSD (`.pbtxt` file).' + ) + + parser.add_argument( + '--labels', '-l', type=str, + default="./../pretrained_models/tensorflow_weights/ssd_mobilenet_v2_coco_names.json", + help='path to labels file of coco dataset (`.names` file.)' + ) + + parser.add_argument( + '--gpu', type=bool, default=False, + help='Flag to use gpu to run the deep learning model. Default is `False`' + ) + + parser.add_argument( + '--tracker', type=str, default='IOUTracker', + help="Tracker used to track objects. Options include ['CentroidTracker', 'CentroidKF_Tracker', " + "'SORT', IOUTracker]") + + args = parser.parse_args() + + if args.tracker == 'CentroidTracker': + tracker = CentroidTracker(max_lost=0, tracker_output_format='mot_challenge') + elif args.tracker == 'CentroidKF_Tracker': + tracker = CentroidKF_Tracker(max_lost=0, tracker_output_format='mot_challenge') + elif args.tracker == 'SORT': + tracker = SORT(max_lost=3, tracker_output_format='mot_challenge', iou_threshold=0.3) + elif args.tracker == 'IOUTracker': + tracker = IOUTracker(max_lost=2, iou_threshold=0.5, min_detection_confidence=0.4, max_detection_confidence=0.7, + tracker_output_format='mot_challenge') + else: + raise NotImplementedError + + model = TF_SSDMobileNetV2( + weights_path=args.weights, + configfile_path=args.config, + labels_path=args.labels, + confidence_threshold=0.4, + nms_threshold=0.2, + draw_bboxes=True, + use_gpu=args.gpu + ) + + main(args.video, model, tracker) diff --git a/examples/example_scripts/mot_YOLOv3.py b/examples/example_scripts/mot_YOLOv3.py new file mode 100644 index 0000000..e9295dd --- /dev/null +++ b/examples/example_scripts/mot_YOLOv3.py @@ -0,0 +1,94 @@ +import cv2 as cv +from motrackers.detectors import YOLOv3 +from motrackers import CentroidTracker, CentroidKF_Tracker, SORT, IOUTracker +from motrackers.utils import draw_tracks + + +def main(video_path, model, tracker): + + cap = cv.VideoCapture(video_path) + while True: + ok, image = cap.read() + + if not ok: + print("Cannot read the video feed.") + break + + image = cv.resize(image, (700, 500)) + + bboxes, confidences, class_ids = model.detect(image) + tracks = tracker.update(bboxes, confidences, class_ids) + updated_image = model.draw_bboxes(image.copy(), bboxes, confidences, class_ids) + + updated_image = draw_tracks(updated_image, tracks) + + cv.imshow("image", updated_image) + if cv.waitKey(1) & 0xFF == ord('q'): + break + + cap.release() + cv.destroyAllWindows() + + +if __name__ == '__main__': + import argparse + + parser = argparse.ArgumentParser( + description='Object detections in input video using YOLOv3 trained on COCO dataset.' + ) + + parser.add_argument( + '--video', '-v', type=str, default="./../video_data/cars.mp4", help='Input video path.') + + parser.add_argument( + '--weights', '-w', type=str, + default="./../pretrained_models/yolo_weights/yolov3.weights", + help='path to weights file of YOLOv3 (`.weights` file.)' + ) + + parser.add_argument( + '--config', '-c', type=str, + default="./../pretrained_models/yolo_weights/yolov3.cfg", + help='path to config file of YOLOv3 (`.cfg` file.)' + ) + + parser.add_argument( + '--labels', '-l', type=str, + default="./../pretrained_models/yolo_weights/coco_names.json", + help='path to labels file of coco dataset (`.names` file.)' + ) + + parser.add_argument( + '--gpu', type=bool, + default=False, help='Flag to use gpu to run the deep learning model. Default is `False`' + ) + + parser.add_argument( + '--tracker', type=str, default='CentroidKF_Tracker', + help="Tracker used to track objects. Options include ['CentroidTracker', 'CentroidKF_Tracker', 'SORT']") + + args = parser.parse_args() + + if args.tracker == 'CentroidTracker': + tracker = CentroidTracker(max_lost=0, tracker_output_format='mot_challenge') + elif args.tracker == 'CentroidKF_Tracker': + tracker = CentroidKF_Tracker(max_lost=0, tracker_output_format='mot_challenge') + elif args.tracker == 'SORT': + tracker = SORT(max_lost=3, tracker_output_format='mot_challenge', iou_threshold=0.3) + elif args.tracker == 'IOUTracker': + tracker = IOUTracker(max_lost=2, iou_threshold=0.5, min_detection_confidence=0.4, max_detection_confidence=0.7, + tracker_output_format='mot_challenge') + else: + raise NotImplementedError + + model = YOLOv3( + weights_path=args.weights, + configfile_path=args.config, + labels_path=args.labels, + confidence_threshold=0.5, + nms_threshold=0.2, + draw_bboxes=True, + use_gpu=args.gpu + ) + + main(args.video, model, tracker) diff --git a/examples/example_scripts/readme.md b/examples/example_scripts/readme.md new file mode 100644 index 0000000..c296962 --- /dev/null +++ b/examples/example_scripts/readme.md @@ -0,0 +1,7 @@ +## How to use? + +To see how to use these example scripts, simply type the following in the terminal: + +``` +python3 --help +``` diff --git a/examples/motmetrics_eval/data/TUD-Campus/gt.txt b/examples/motmetrics_eval/data/TUD-Campus/gt.txt new file mode 100644 index 0000000..182d09a --- /dev/null +++ b/examples/motmetrics_eval/data/TUD-Campus/gt.txt @@ -0,0 +1,359 @@ +1,1,399,182,121,229,1,-1,-1,-1 +1,2,282,201,92,184,1,-1,-1,-1 +1,3,63,153,82,288,1,-1,-1,-1 +1,4,192,206,62,137,1,-1,-1,-1 +1,5,125,209,74,157,1,-1,-1,-1 +1,6,162,208,55,145,1,-1,-1,-1 +2,1,399,181,139,235,1,-1,-1,-1 +2,2,269,202,87,182,1,-1,-1,-1 +2,3,71,151,100,284,1,-1,-1,-1 +2,4,200,206,55,137,1,-1,-1,-1 +2,5,127,210,77,157,1,-1,-1,-1 +2,6,157,206,71,143,1,-1,-1,-1 +3,1,419,182,106,227,1,-1,-1,-1 +3,2,271,196,76,190,1,-1,-1,-1 +3,3,70,155,111,286,1,-1,-1,-1 +3,4,209,204,47,139,1,-1,-1,-1 +3,5,136,206,64,160,1,-1,-1,-1 +3,6,162,204,71,142,1,-1,-1,-1 +4,1,428,181,111,237,1,-1,-1,-1 +4,2,262,196,76,185,1,-1,-1,-1 +4,3,80,160,106,280,1,-1,-1,-1 +4,4,218,206,41,138,1,-1,-1,-1 +4,5,131,208,75,154,1,-1,-1,-1 +4,6,164,212,73,131,1,-1,-1,-1 +5,1,439,179,95,238,1,-1,-1,-1 +5,2,264,197,66,187,1,-1,-1,-1 +5,3,84,165,104,267,1,-1,-1,-1 +5,4,227,208,39,139,1,-1,-1,-1 +5,5,136,208,74.364,153.95,1,-1,-1,-1 +5,6,180,211,53,139,1,-1,-1,-1 +6,1,454,179,87,238,1,-1,-1,-1 +6,2,251,194,68,187,1,-1,-1,-1 +6,3,89,164,115,270,1,-1,-1,-1 +6,4,228,208,47,136,1,-1,-1,-1 +6,5,141,209,73.727,153.91,1,-1,-1,-1 +6,6,183,214,53,136,1,-1,-1,-1 +7,1,453,177,81,239,1,-1,-1,-1 +7,2,245,190,69,196,1,-1,-1,-1 +7,3,103,165,110,272,1,-1,-1,-1 +7,4,234,208,48,135.5,1,-1,-1,-1 +7,5,146,209,73.091,153.86,1,-1,-1,-1 +7,6,184,211,56,145,1,-1,-1,-1 +8,1,471,178,76,241,1,-1,-1,-1 +8,2,236,188,70,197,1,-1,-1,-1 +8,3,117,165,101,276,1,-1,-1,-1 +8,4,239,208,49,135,1,-1,-1,-1 +8,5,151,209,72.454,153.82,1,-1,-1,-1 +8,6,190,211,55,144,1,-1,-1,-1 +9,1,464,173,101,244,1,-1,-1,-1 +9,2,232,190,74,195,1,-1,-1,-1 +9,3,125,158,113,283,1,-1,-1,-1 +9,4,245,209,50,134.5,1,-1,-1,-1 +9,5,156,209,71.818,153.77,1,-1,-1,-1 +9,6,193,214,56,138,1,-1,-1,-1 +10,1,479,168,81,251,1,-1,-1,-1 +10,2,224,190,78,194,1,-1,-1,-1 +10,3,134,159,97,283,1,-1,-1,-1 +10,4,251,209,51,134,1,-1,-1,-1 +10,5,161,210,71.182,153.73,1,-1,-1,-1 +11,1,483,169,88,250,1,-1,-1,-1 +11,2,220,194,77,191,1,-1,-1,-1 +11,3,139,154,92,286,1,-1,-1,-1 +11,4,256,209,52,133.5,1,-1,-1,-1 +11,5,166,210,70.546,153.68,1,-1,-1,-1 +12,1,497,167,99,249,1,-1,-1,-1 +12,2,210,195,70,185,1,-1,-1,-1 +12,3,139,155,100,285,1,-1,-1,-1 +12,4,262,209,53,133,1,-1,-1,-1 +12,5,171,210,69.909,153.64,1,-1,-1,-1 +13,1,502,172,100,246,1,-1,-1,-1 +13,2,210,195,73,185,1,-1,-1,-1 +13,3,160,151,90,289,1,-1,-1,-1 +13,4,264,209,55,129,1,-1,-1,-1 +13,5,176,210,69.273,153.59,1,-1,-1,-1 +14,1,499,172,108,241,1,-1,-1,-1 +14,2,203,194,72.2,187.8,1,-1,-1,-1 +14,3,163,149,88,293,1,-1,-1,-1 +14,4,261,208,58,132,1,-1,-1,-1 +14,5,181,211,68.636,153.55,1,-1,-1,-1 +15,1,506,178,109,239,1,-1,-1,-1 +15,2,196,194,71.4,190.6,1,-1,-1,-1 +15,3,179,149,91,291,1,-1,-1,-1 +15,4,268,206,65,149,1,-1,-1,-1 +15,5,186,211,68,153.5,1,-1,-1,-1 +16,1,514,177,117,239,1,-1,-1,-1 +16,2,190,193,70.6,193.4,1,-1,-1,-1 +16,3,182,150,92,292,1,-1,-1,-1 +16,4,279,205,50,139,1,-1,-1,-1 +16,5,191,211,67.364,153.45,1,-1,-1,-1 +17,1,520,176,114,247,1,-1,-1,-1 +17,2,183,193,69.8,196.2,1,-1,-1,-1 +17,3,200,148,93,296,1,-1,-1,-1 +17,4,287,201,44,148,1,-1,-1,-1 +17,5,196,212,66.727,153.41,1,-1,-1,-1 +18,1,522,165,111,263,1,-1,-1,-1 +18,2,176,192,69,199,1,-1,-1,-1 +18,3,196,149,111,299,1,-1,-1,-1 +18,4,293,208,49,139,1,-1,-1,-1 +18,5,201,212,66.091,153.36,1,-1,-1,-1 +19,1,534,168,103,253,1,-1,-1,-1 +19,2,174,185,68,199,1,-1,-1,-1 +19,3,206,157,104,287,1,-1,-1,-1 +19,4,296,213,57,132,1,-1,-1,-1 +19,5,206,212,65.454,153.32,1,-1,-1,-1 +20,1,547,182,88,240,1,-1,-1,-1 +20,2,165,187,62,199,1,-1,-1,-1 +20,3,204,159,118,285,1,-1,-1,-1 +20,4,296,205,60,137,1,-1,-1,-1 +20,5,211,212,64.818,153.27,1,-1,-1,-1 +21,1,565,176,74,247,1,-1,-1,-1 +21,2,159,194,60,191,1,-1,-1,-1 +21,3,215,162,122,282,1,-1,-1,-1 +21,4,301,209,57,135,1,-1,-1,-1 +21,5,216,213,64.182,153.23,1,-1,-1,-1 +22,1,575,170,87,255,1,-1,-1,-1 +22,2,150,188,68,200,1,-1,-1,-1 +22,3,222,163,108,286,1,-1,-1,-1 +22,4,307,208,61,140,1,-1,-1,-1 +22,5,221,213,63.545,153.18,1,-1,-1,-1 +23,1,582,168,81,262,1,-1,-1,-1 +23,2,139,186,69,199,1,-1,-1,-1 +23,3,219,164,119,282,1,-1,-1,-1 +23,4,307,205,68,144,1,-1,-1,-1 +23,5,226,213,62.909,153.14,1,-1,-1,-1 +24,1,585,165,94,269,1,-1,-1,-1 +24,2,131,188,75,200,1,-1,-1,-1 +24,3,243,162,120,289,1,-1,-1,-1 +24,4,310,205,71,142,1,-1,-1,-1 +24,5,231,213,62.273,153.09,1,-1,-1,-1 +24,7,-28,183,76,235,1,-1,-1,-1 +25,2,121,191,87,189,1,-1,-1,-1 +25,3,254,165,97,281,1,-1,-1,-1 +25,4,321,211,55,133,1,-1,-1,-1 +25,5,236,214,61.636,153.05,1,-1,-1,-1 +25,7,-15,179,63,240,1,-1,-1,-1 +26,2,113,190,79,195,1,-1,-1,-1 +26,3,259,155,97,294,1,-1,-1,-1 +26,4,322,208,58,136,1,-1,-1,-1 +26,5,241,214,61,153,1,-1,-1,-1 +26,7,-20,180,83,235,1,-1,-1,-1 +27,2,109,194,88,192,1,-1,-1,-1 +27,3,274,158,88,296,1,-1,-1,-1 +27,4,328,208,57.739,136.26,1,-1,-1,-1 +27,5,242,222,74,150,1,-1,-1,-1 +27,7,-30,182,91,233,1,-1,-1,-1 +28,2,99,196,96,193,1,-1,-1,-1 +28,3,285,153,90,295,1,-1,-1,-1 +28,4,333,208,57.478,136.52,1,-1,-1,-1 +28,5,257,224,55,147,1,-1,-1,-1 +28,7,-21,177,82,236,1,-1,-1,-1 +29,2,88,194,93,188,1,-1,-1,-1 +29,3,287,162,106,283,1,-1,-1,-1 +29,4,339,208,57.217,136.78,1,-1,-1,-1 +29,5,261,218,60,154,1,-1,-1,-1 +29,7,-10,173,74,239.5,1,-1,-1,-1 +30,2,88,188,84,193,1,-1,-1,-1 +30,3,307,157,93,292,1,-1,-1,-1 +30,4,344,209,56.956,137.04,1,-1,-1,-1 +30,5,259,215,65,153,1,-1,-1,-1 +30,7,2,168,66,243,1,-1,-1,-1 +31,2,90,201,84,184,1,-1,-1,-1 +31,3,319,162,95,286,1,-1,-1,-1 +31,4,350,209,56.696,137.3,1,-1,-1,-1 +31,5,264,208,55,162,1,-1,-1,-1 +31,7,3,176,82,235,1,-1,-1,-1 +32,2,84,181,81,205,1,-1,-1,-1 +32,3,319,157,112,287,1,-1,-1,-1 +32,4,355,209,56.435,137.57,1,-1,-1,-1 +32,5,270,215,61,159,1,-1,-1,-1 +32,7,1,174,93,240,1,-1,-1,-1 +33,2,72,188,85,200,1,-1,-1,-1 +33,3,322,162,115,283,1,-1,-1,-1 +33,4,361,209,56.174,137.83,1,-1,-1,-1 +33,5,277,214,52,158,1,-1,-1,-1 +33,7,8,187,100,224,1,-1,-1,-1 +34,2,70,181,74,196,1,-1,-1,-1 +34,3,324,162,122,289,1,-1,-1,-1 +34,4,367,209,55.913,138.09,1,-1,-1,-1 +34,5,278,215,57,155,1,-1,-1,-1 +34,7,22,181,96,227,1,-1,-1,-1 +35,2,62,182,75.2,197,1,-1,-1,-1 +35,3,338,154,121,295,1,-1,-1,-1 +35,4,372,209,55.652,138.35,1,-1,-1,-1 +35,5,288,219,54,151,1,-1,-1,-1 +35,7,33,182,90,235,1,-1,-1,-1 +36,2,54,184,76.4,198,1,-1,-1,-1 +36,3,352,160,111,291,1,-1,-1,-1 +36,4,378,209,55.391,138.61,1,-1,-1,-1 +36,5,299,218,49,153,1,-1,-1,-1 +36,7,31,188,103,221,1,-1,-1,-1 +37,2,47,185,77.6,199,1,-1,-1,-1 +37,3,361,167,106,282,1,-1,-1,-1 +37,4,383,209,55.13,138.87,1,-1,-1,-1 +37,5,301,222,55,153,1,-1,-1,-1 +37,7,43,178,93,238,1,-1,-1,-1 +38,2,39,187,78.8,200,1,-1,-1,-1 +38,3,371,167,107,286,1,-1,-1,-1 +38,4,389,210,54.87,139.13,1,-1,-1,-1 +38,5,303,217,60,157,1,-1,-1,-1 +38,7,49,182,99,230,1,-1,-1,-1 +39,2,31,188,80,201,1,-1,-1,-1 +39,3,385,169,91,281,1,-1,-1,-1 +39,4,394,210,54.609,139.39,1,-1,-1,-1 +39,5,305,213,61,155,1,-1,-1,-1 +39,7,59,178,81,234,1,-1,-1,-1 +40,2,21,179,86,212,1,-1,-1,-1 +40,3,386,155,108,300,1,-1,-1,-1 +40,4,400,210,54.348,139.65,1,-1,-1,-1 +40,5,307,217,64,153,1,-1,-1,-1 +40,7,59,174,92,237,1,-1,-1,-1 +41,2,12,183,83,208,1,-1,-1,-1 +41,3,400,158,96,296,1,-1,-1,-1 +41,4,405,210,54.087,139.91,1,-1,-1,-1 +41,5,314,219,63,155,1,-1,-1,-1 +41,7,71,176,79,235,1,-1,-1,-1 +42,2,10,181,85,207,1,-1,-1,-1 +42,3,404,157,107,300,1,-1,-1,-1 +42,4,411,210,53.826,140.17,1,-1,-1,-1 +42,5,319,220,62,156,1,-1,-1,-1 +42,7,77,177,91,239,1,-1,-1,-1 +43,2,2,186,84,202,1,-1,-1,-1 +43,3,426,159,97,296,1,-1,-1,-1 +43,4,417,210,53.565,140.43,1,-1,-1,-1 +43,5,321,214,65,157,1,-1,-1,-1 +43,7,97,172,80,249,1,-1,-1,-1 +44,2,-3,186,79,209,1,-1,-1,-1 +44,3,430,154,98,303,1,-1,-1,-1 +44,4,422,210,53.304,140.7,1,-1,-1,-1 +44,5,325,214,66,158,1,-1,-1,-1 +44,7,102,171,86,246,1,-1,-1,-1 +45,2,-8,186,74,216,1,-1,-1,-1 +45,3,436,153,110,307,1,-1,-1,-1 +45,4,428,210,53.044,140.96,1,-1,-1,-1 +45,5,329,217,66,153,1,-1,-1,-1 +45,7,97,174,103,240,1,-1,-1,-1 +46,2,-14,186,65,220,1,-1,-1,-1 +46,3,439,158,126,304,1,-1,-1,-1 +46,4,433,211,52.783,141.22,1,-1,-1,-1 +46,5,340,219,54,148,1,-1,-1,-1 +46,7,108,178,114,238,1,-1,-1,-1 +47,2,-24,182,69,221,1,-1,-1,-1 +47,3,449,164,119,294,1,-1,-1,-1 +47,4,439,211,52.522,141.48,1,-1,-1,-1 +47,5,334,211,64,159,1,-1,-1,-1 +47,7,121,177,101,231,1,-1,-1,-1 +47,8,312,204,63,155,1,-1,-1,-1 +48,2,-28,176,76,227,1,-1,-1,-1 +48,3,460,162,125,295,1,-1,-1,-1 +48,4,444,211,52.261,141.74,1,-1,-1,-1 +48,5,342,215,58,150,1,-1,-1,-1 +48,7,127,185,100,231,1,-1,-1,-1 +48,8,318,198,57,161,1,-1,-1,-1 +49,3,478,164,102,291,1,-1,-1,-1 +49,4,450,211,52,142,1,-1,-1,-1 +49,5,345,215,60,157,1,-1,-1,-1 +49,7,132,182,88,236,1,-1,-1,-1 +49,8,312,193,82,171,1,-1,-1,-1 +50,3,481,157,108,300,1,-1,-1,-1 +50,4,450,209,56,142,1,-1,-1,-1 +50,5,356,214,52,154,1,-1,-1,-1 +50,7,140,183,94,235,1,-1,-1,-1 +50,8,328,199,65,162,1,-1,-1,-1 +51,3,494,159,100,303,1,-1,-1,-1 +51,4,455,206,56,143,1,-1,-1,-1 +51,5,352,209,64,165,1,-1,-1,-1 +51,7,154,181,89,238,1,-1,-1,-1 +51,8,328,199,69,165,1,-1,-1,-1 +52,3,497,158,104,301,1,-1,-1,-1 +52,4,460,209,53,139,1,-1,-1,-1 +52,5,358,215,65,150,1,-1,-1,-1 +52,7,165,181,81,238,1,-1,-1,-1 +52,8,330,199,67,166,1,-1,-1,-1 +53,3,505,150,103,307,1,-1,-1,-1 +53,4,467,213,60,140,1,-1,-1,-1 +53,5,365,214,65,158,1,-1,-1,-1 +53,7,173,178,79,241,1,-1,-1,-1 +53,8,333,195,73,169,1,-1,-1,-1 +54,3,508,148,100,310,1,-1,-1,-1 +54,4,473,217,61,131,1,-1,-1,-1 +54,5,365,214,70,158,1,-1,-1,-1 +54,7,185,176,81,249,1,-1,-1,-1 +54,8,342,199,67,166,1,-1,-1,-1 +55,3,514,151,105,306,1,-1,-1,-1 +55,4,482,215,63,130,1,-1,-1,-1 +55,5,367,217,75,151,1,-1,-1,-1 +55,7,196,177,75,242,1,-1,-1,-1 +55,8,349,196,63,162,1,-1,-1,-1 +56,3,529,151,99,308,1,-1,-1,-1 +56,4,482,209,64,144,1,-1,-1,-1 +56,5,379,219,62,151,1,-1,-1,-1 +56,7,201,174,88,240,1,-1,-1,-1 +56,8,352,193,63,173,1,-1,-1,-1 +57,3,538,150,102,310,1,-1,-1,-1 +57,4,486,214,61,131,1,-1,-1,-1 +57,5,382,223,59,151,1,-1,-1,-1 +57,7,208,173,94,249,1,-1,-1,-1 +57,8,366,193,53,172,1,-1,-1,-1 +58,3,539,157,101,305,1,-1,-1,-1 +58,4,491,211,65,140,1,-1,-1,-1 +58,5,386,218,56,152,1,-1,-1,-1 +58,7,213,182,102,239,1,-1,-1,-1 +58,8,366,196,50,175,1,-1,-1,-1 +59,3,553,152,113,304,1,-1,-1,-1 +59,4,499,210,61,142,1,-1,-1,-1 +59,5,393,218,53,152,1,-1,-1,-1 +59,7,223,182,103,237,1,-1,-1,-1 +59,8,371,198,53,166,1,-1,-1,-1 +60,3,553,157,123,300,1,-1,-1,-1 +60,4,506,215,59,134,1,-1,-1,-1 +60,5,397,215,57,152,1,-1,-1,-1 +60,7,231,187,107,236,1,-1,-1,-1 +60,8,372,199,58,163,1,-1,-1,-1 +61,3,565,160,113,308,1,-1,-1,-1 +61,4,517,217,51,131,1,-1,-1,-1 +61,5,402,213,57,154,1,-1,-1,-1 +61,7,236,187,106,235,1,-1,-1,-1 +61,8,372,199,59,169,1,-1,-1,-1 +62,3,572,167,110,295,1,-1,-1,-1 +62,4,514,213,59,138,1,-1,-1,-1 +62,5,411,211,57,160,1,-1,-1,-1 +62,7,251,185,101,242,1,-1,-1,-1 +62,8,375,201,77,161,1,-1,-1,-1 +63,3,575,173,97,290,1,-1,-1,-1 +63,4,518,205,60,144,1,-1,-1,-1 +63,5,409,214,67,160,1,-1,-1,-1 +63,7,260,183,103,244,1,-1,-1,-1 +63,8,377,199,69,169,1,-1,-1,-1 +64,4,528,210,56,142,1,-1,-1,-1 +64,5,418,215,56,152,1,-1,-1,-1 +64,7,273,183,85,240,1,-1,-1,-1 +64,8,378,204,69,165,1,-1,-1,-1 +65,4,534,214,58,139,1,-1,-1,-1 +65,5,423,214,68,158,1,-1,-1,-1 +65,7,280,179,90,242,1,-1,-1,-1 +65,8,383,204,73,161,1,-1,-1,-1 +66,4,537,206,62,143,1,-1,-1,-1 +66,5,421,217,73,154,1,-1,-1,-1 +66,7,297,179,84,246,1,-1,-1,-1 +66,8,383,204,73,162,1,-1,-1,-1 +67,4,542,209,74,147,1,-1,-1,-1 +67,5,434,214,58,158,1,-1,-1,-1 +67,7,306,179,80,239,1,-1,-1,-1 +67,8,391,196,66,175,1,-1,-1,-1 +68,4,547,211,61,140,1,-1,-1,-1 +68,5,434,220,67,151,1,-1,-1,-1 +68,7,315,173,90,253,1,-1,-1,-1 +68,8,403,201,63,167,1,-1,-1,-1 +69,4,557,215,62,138,1,-1,-1,-1 +69,5,441,217,61,155,1,-1,-1,-1 +69,7,325,178,91,250,1,-1,-1,-1 +69,8,399,201,70,177,1,-1,-1,-1 +70,4,561,210,59,142,1,-1,-1,-1 +70,5,446,217,64,155,1,-1,-1,-1 +70,7,326,182,100,235,1,-1,-1,-1 +70,8,403,199,65,169,1,-1,-1,-1 +71,4,561,220,63,133,1,-1,-1,-1 +71,5,449,219,61,153,1,-1,-1,-1 +71,7,335,183,107,243,1,-1,-1,-1 +71,8,416,204,58,164,1,-1,-1,-1 diff --git a/examples/motmetrics_eval/data/TUD-Campus/test.txt b/examples/motmetrics_eval/data/TUD-Campus/test.txt new file mode 100644 index 0000000..64b0fe1 --- /dev/null +++ b/examples/motmetrics_eval/data/TUD-Campus/test.txt @@ -0,0 +1,222 @@ +1,3,113.84,274.5,57.307,130.05,-1,-1,-1,-1 +1,6,273.05,203.83,77.366,175.56,-1,-1,-1,-1 +1,10,416.68,205.54,91.04,206.59,-1,-1,-1,-1 +1,13,175.02,195.54,60.972,138.36,-1,-1,-1,-1 +2,3,116.37,265.2,62.858,142.64,-1,-1,-1,-1 +2,6,267.86,202.71,77.704,176.33,-1,-1,-1,-1 +2,10,423.95,203.42,91.88,208.5,-1,-1,-1,-1 +2,13,177.14,202.51,58.209,132.09,-1,-1,-1,-1 +3,3,118.93,255.89,68.408,155.24,-1,-1,-1,-1 +3,6,262.73,201.65,78.033,177.08,-1,-1,-1,-1 +3,10,431.14,201.32,92.719,210.4,-1,-1,-1,-1 +3,13,179.21,209.5,55.445,125.82,-1,-1,-1,-1 +4,3,121.53,246.57,73.959,167.83,-1,-1,-1,-1 +4,6,257.67,200.61,78.354,177.81,-1,-1,-1,-1 +4,10,438.16,199.26,93.559,212.31,-1,-1,-1,-1 +4,13,181.25,216.56,52.681,119.55,-1,-1,-1,-1 +5,3,124.22,237.24,79.51,180.43,-1,-1,-1,-1 +5,6,252.68,199.54,78.667,178.52,-1,-1,-1,-1 +5,10,444.94,197.29,94.398,214.21,-1,-1,-1,-1 +5,13,183.24,223.72,49.917,113.27,-1,-1,-1,-1 +6,3,127,227.96,85.061,193.02,-1,-1,-1,-1 +6,6,247.74,198.46,78.972,179.21,-1,-1,-1,-1 +6,10,451.36,195.47,95.238,216.12,-1,-1,-1,-1 +6,13,185.16,230.95,47.154,107,-1,-1,-1,-1 +7,3,129.86,218.75,90.612,205.62,-1,-1,-1,-1 +7,6,242.86,197.44,79.267,179.88,-1,-1,-1,-1 +7,10,457.4,193.8,96.077,218.02,-1,-1,-1,-1 +7,13,187.05,238.21,44.39,100.73,-1,-1,-1,-1 +8,3,132.77,209.65,96.163,218.21,-1,-1,-1,-1 +8,6,237.99,196.55,79.555,180.53,-1,-1,-1,-1 +8,10,463.14,192.21,96.916,219.93,-1,-1,-1,-1 +9,3,135.64,200.65,101.71,230.81,-1,-1,-1,-1 +9,6,233.04,195.92,79.834,181.16,-1,-1,-1,-1 +9,10,468.66,190.65,97.756,221.83,-1,-1,-1,-1 +10,3,138.45,191.79,107.27,243.4,-1,-1,-1,-1 +10,6,227.9,195.56,80.105,181.78,-1,-1,-1,-1 +10,10,474.09,189.09,98.595,223.74,-1,-1,-1,-1 +11,3,141.22,183.1,112.82,256,-1,-1,-1,-1 +11,6,222.43,195.44,80.367,182.37,-1,-1,-1,-1 +11,10,479.5,187.49,99.435,225.64,-1,-1,-1,-1 +12,3,143.96,174.55,118.37,268.6,-1,-1,-1,-1 +12,6,216.54,195.56,80.621,182.95,-1,-1,-1,-1 +12,10,484.99,185.85,100.27,227.55,-1,-1,-1,-1 +13,3,146.68,166.1,123.92,281.19,-1,-1,-1,-1 +13,6,210.1,195.93,80.866,183.51,-1,-1,-1,-1 +13,10,490.67,184.15,101.11,229.45,-1,-1,-1,-1 +14,6,203.1,196.5,81.104,184.04,-1,-1,-1,-1 +14,10,496.59,182.38,101.95,231.36,-1,-1,-1,-1 +15,6,195.62,197.15,81.332,184.56,-1,-1,-1,-1 +15,10,502.81,180.54,102.79,233.26,-1,-1,-1,-1 +16,6,187.79,197.8,81.553,185.06,-1,-1,-1,-1 +16,7,276.17,205.24,60.444,137.16,-1,-1,-1,-1 +16,10,509.37,178.64,103.63,235.16,-1,-1,-1,-1 +17,6,179.76,198.42,81.764,185.54,-1,-1,-1,-1 +17,7,282.02,209.51,58.423,132.58,-1,-1,-1,-1 +17,10,516.23,176.69,104.47,237.07,-1,-1,-1,-1 +18,6,171.65,199.03,81.968,186.01,-1,-1,-1,-1 +18,7,287.93,213.81,56.403,127.99,-1,-1,-1,-1 +18,10,523.34,174.73,105.31,238.97,-1,-1,-1,-1 +19,6,163.55,199.67,82.163,186.45,-1,-1,-1,-1 +19,7,293.99,218.11,54.382,123.4,-1,-1,-1,-1 +19,10,530.57,172.78,106.15,240.88,-1,-1,-1,-1 +20,6,155.46,200.39,82.35,186.87,-1,-1,-1,-1 +20,7,300.27,222.37,52.361,118.82,-1,-1,-1,-1 +21,6,147.3,201.23,82.528,187.28,-1,-1,-1,-1 +21,7,306.86,226.57,50.34,114.23,-1,-1,-1,-1 +22,6,139.04,202.19,82.698,187.66,-1,-1,-1,-1 +22,7,313.74,230.72,48.32,109.65,-1,-1,-1,-1 +23,6,130.69,203.28,82.859,188.03,-1,-1,-1,-1 +23,7,320.84,234.83,46.299,105.06,-1,-1,-1,-1 +24,6,122.3,204.52,83.012,188.38,-1,-1,-1,-1 +24,7,328.08,238.93,44.278,100.48,-1,-1,-1,-1 +24,11,224.23,208.03,71.57,162.41,-1,-1,-1,-1 +25,6,113.93,205.85,83.157,188.71,-1,-1,-1,-1 +25,7,335.33,243.04,42.257,95.892,-1,-1,-1,-1 +25,11,230.36,214.02,68.455,155.34,-1,-1,-1,-1 +26,4,119.05,191.06,80.289,182.2,-1,-1,-1,-1 +26,7,342.57,247.15,40.236,91.306,-1,-1,-1,-1 +26,9,-15.182,261.28,64.106,145.47,-1,-1,-1,-1 +26,11,236.15,218.42,66.058,149.9,-1,-1,-1,-1 +27,4,109.54,188.88,82.744,187.77,-1,-1,-1,-1 +27,7,349.78,251.25,38.216,86.721,-1,-1,-1,-1 +27,9,-16.51,246.39,71.474,162.19,-1,-1,-1,-1 +27,11,241.64,221.42,64.306,145.92,-1,-1,-1,-1 +28,4,100.03,186.72,85.2,193.34,-1,-1,-1,-1 +28,9,-17.899,231.48,78.843,178.91,-1,-1,-1,-1 +28,11,246.79,223.23,63.128,143.25,-1,-1,-1,-1 +29,4,90.482,184.67,87.656,198.91,-1,-1,-1,-1 +29,9,-19.351,216.58,86.212,195.63,-1,-1,-1,-1 +29,11,251.59,224.01,62.458,141.73,-1,-1,-1,-1 +30,4,80.854,182.84,90.111,204.49,-1,-1,-1,-1 +30,9,-20.845,201.69,93.58,212.35,-1,-1,-1,-1 +30,11,255.99,223.9,62.231,141.22,-1,-1,-1,-1 +31,4,71.177,181.25,92.567,210.06,-1,-1,-1,-1 +31,9,-22.364,186.8,100.95,229.07,-1,-1,-1,-1 +31,11,260.09,223.01,62.386,141.57,-1,-1,-1,-1 +32,4,61.563,179.93,95.023,215.63,-1,-1,-1,-1 +32,11,263.94,221.53,62.864,142.65,-1,-1,-1,-1 +33,4,52.124,178.89,97.479,221.2,-1,-1,-1,-1 +33,8,324.5,165.22,108.85,247.01,-1,-1,-1,-1 +33,11,267.58,219.61,63.611,144.35,-1,-1,-1,-1 +34,4,42.892,178.09,99.934,226.78,-1,-1,-1,-1 +34,8,336.28,176.03,105.56,239.53,-1,-1,-1,-1 +34,11,271.09,217.43,64.576,146.54,-1,-1,-1,-1 +35,4,33.841,177.49,102.39,232.35,-1,-1,-1,-1 +35,8,348.07,186.95,102.26,232.06,-1,-1,-1,-1 +35,11,274.48,215.13,65.708,149.11,-1,-1,-1,-1 +36,4,24.941,177.01,104.85,237.92,-1,-1,-1,-1 +36,8,359.8,198.05,98.967,224.58,-1,-1,-1,-1 +36,11,277.84,212.8,66.965,151.96,-1,-1,-1,-1 +37,4,16.117,176.59,107.3,243.49,-1,-1,-1,-1 +37,8,371.47,209.36,95.673,217.1,-1,-1,-1,-1 +37,11,281.24,210.52,68.301,154.99,-1,-1,-1,-1 +38,2,52.423,232.95,80.36,182.36,-1,-1,-1,-1 +38,8,383.09,220.95,92.379,209.63,-1,-1,-1,-1 +38,11,284.69,208.3,69.68,158.12,-1,-1,-1,-1 +39,2,56.427,217.08,87.228,197.94,-1,-1,-1,-1 +39,8,394.66,232.78,89.085,202.15,-1,-1,-1,-1 +39,11,288.21,206.16,71.063,161.26,-1,-1,-1,-1 +40,2,61.088,203.79,92.98,210.99,-1,-1,-1,-1 +40,8,406.23,244.74,85.791,194.68,-1,-1,-1,-1 +40,11,291.81,204.09,72.419,164.34,-1,-1,-1,-1 +41,2,66.422,192.94,97.686,221.67,-1,-1,-1,-1 +41,5,394.42,197.9,97.849,222.04,-1,-1,-1,-1 +41,11,295.46,202.07,73.718,167.28,-1,-1,-1,-1 +42,2,72.446,184.34,101.42,230.14,-1,-1,-1,-1 +42,5,400.86,193.91,102.46,232.51,-1,-1,-1,-1 +42,11,299.14,200,74.933,170.04,-1,-1,-1,-1 +43,2,79.136,177.84,104.25,236.56,-1,-1,-1,-1 +43,5,407.31,190.07,107.08,242.98,-1,-1,-1,-1 +43,11,302.83,197.86,76.041,172.55,-1,-1,-1,-1 +44,2,86.433,173.27,106.24,241.09,-1,-1,-1,-1 +44,5,413.79,186.43,111.69,253.45,-1,-1,-1,-1 +44,11,306.54,195.65,77.02,174.78,-1,-1,-1,-1 +45,2,94.236,170.49,107.48,243.89,-1,-1,-1,-1 +45,5,420.34,182.99,116.3,263.91,-1,-1,-1,-1 +45,11,310.3,193.42,77.854,176.67,-1,-1,-1,-1 +46,2,102.52,169.29,108.02,245.13,-1,-1,-1,-1 +46,5,426.95,179.62,120.92,274.38,-1,-1,-1,-1 +46,11,314.13,191.28,78.529,178.2,-1,-1,-1,-1 +47,2,111.21,169.48,107.95,244.96,-1,-1,-1,-1 +47,5,433.61,176.29,125.53,284.85,-1,-1,-1,-1 +47,11,318.04,189.41,79.034,179.34,-1,-1,-1,-1 +48,2,120.2,170.97,107.33,243.55,-1,-1,-1,-1 +48,5,442.57,183.44,125.53,284.85,-1,-1,-1,-1 +48,11,322.05,187.93,79.36,180.08,-1,-1,-1,-1 +49,1,459.32,237.96,50.475,114.54,-1,-1,-1,-1 +49,2,129.39,173.6,106.23,241.06,-1,-1,-1,-1 +49,11,326.2,186.99,79.503,180.41,-1,-1,-1,-1 +50,1,462.86,233.83,51.899,117.77,-1,-1,-1,-1 +50,2,138.73,177.21,104.73,237.65,-1,-1,-1,-1 +50,11,330.53,186.6,79.461,180.31,-1,-1,-1,-1 +51,1,466.5,230.01,53.199,120.72,-1,-1,-1,-1 +51,2,148.19,181.54,102.89,233.48,-1,-1,-1,-1 +51,11,335.03,186.77,79.236,179.8,-1,-1,-1,-1 +52,1,470.24,226.53,54.374,123.39,-1,-1,-1,-1 +52,2,157.75,186.54,100.79,228.71,-1,-1,-1,-1 +52,11,339.68,187.47,78.833,178.89,-1,-1,-1,-1 +53,1,474.11,223.4,55.425,125.78,-1,-1,-1,-1 +53,2,167.48,192.06,98.496,223.51,-1,-1,-1,-1 +53,11,344.45,188.69,78.259,177.59,-1,-1,-1,-1 +54,1,478.14,220.61,56.352,127.88,-1,-1,-1,-1 +54,2,177.42,197.94,96.081,218.03,-1,-1,-1,-1 +54,11,349.28,190.37,77.525,175.92,-1,-1,-1,-1 +55,1,482.39,218.19,57.154,129.7,-1,-1,-1,-1 +55,2,187.55,204.01,93.617,212.44,-1,-1,-1,-1 +55,11,354.13,192.44,76.646,173.93,-1,-1,-1,-1 +55,12,533.9,309.3,68.825,156.18,-1,-1,-1,-1 +56,1,486.87,216.16,57.832,131.24,-1,-1,-1,-1 +56,2,197.87,210.13,91.174,206.9,-1,-1,-1,-1 +56,11,358.95,194.8,75.638,171.64,-1,-1,-1,-1 +56,12,533.51,279.28,82.049,186.19,-1,-1,-1,-1 +57,1,491.6,214.54,58.386,132.49,-1,-1,-1,-1 +57,2,208.33,216.16,88.824,201.56,-1,-1,-1,-1 +57,11,363.73,197.38,74.522,169.1,-1,-1,-1,-1 +57,12,533.16,249.29,95.273,216.2,-1,-1,-1,-1 +58,1,496.55,213.28,58.815,133.47,-1,-1,-1,-1 +58,2,218.83,221.94,86.637,196.6,-1,-1,-1,-1 +58,11,368.43,200.11,73.32,166.38,-1,-1,-1,-1 +58,12,532.85,219.33,108.5,246.2,-1,-1,-1,-1 +59,1,501.69,212.34,59.119,134.16,-1,-1,-1,-1 +59,2,229.42,227.21,84.684,192.17,-1,-1,-1,-1 +59,11,373.11,202.9,72.061,163.52,-1,-1,-1,-1 +59,12,532.56,189.41,121.72,276.21,-1,-1,-1,-1 +60,1,506.97,211.69,59.3,134.57,-1,-1,-1,-1 +60,2,240.03,231.7,83.037,188.43,-1,-1,-1,-1 +60,11,377.81,205.68,70.773,160.6,-1,-1,-1,-1 +60,12,536.94,180.92,125.53,284.85,-1,-1,-1,-1 +61,1,512.37,211.32,59.355,134.69,-1,-1,-1,-1 +61,2,250.51,235.22,81.767,185.55,-1,-1,-1,-1 +61,11,382.61,208.36,69.489,157.68,-1,-1,-1,-1 +61,12,543.18,181.11,125.53,284.85,-1,-1,-1,-1 +62,1,517.89,211.16,59.287,134.54,-1,-1,-1,-1 +62,2,260.69,237.62,80.944,183.68,-1,-1,-1,-1 +62,11,387.51,210.9,68.246,154.86,-1,-1,-1,-1 +63,1,523.53,211.17,59.094,134.1,-1,-1,-1,-1 +63,2,270.48,238.63,80.641,182.99,-1,-1,-1,-1 +63,11,392.47,213.29,67.081,152.22,-1,-1,-1,-1 +64,1,529.29,211.36,58.776,133.38,-1,-1,-1,-1 +64,2,279.79,238.08,80.928,183.64,-1,-1,-1,-1 +64,11,397.5,215.45,66.039,149.86,-1,-1,-1,-1 +65,1,535.17,211.62,58.334,132.37,-1,-1,-1,-1 +65,2,288.52,235.8,81.876,185.79,-1,-1,-1,-1 +65,11,402.55,217.33,65.163,147.87,-1,-1,-1,-1 +66,1,541.16,211.9,57.768,131.09,-1,-1,-1,-1 +66,2,296.67,231.74,83.556,189.61,-1,-1,-1,-1 +66,11,407.6,218.87,64.503,146.37,-1,-1,-1,-1 +67,1,547.25,212.24,57.077,129.52,-1,-1,-1,-1 +67,2,304.28,225.68,86.04,195.24,-1,-1,-1,-1 +67,11,412.69,220,64.11,145.48,-1,-1,-1,-1 +68,1,553.44,212.71,56.262,127.67,-1,-1,-1,-1 +68,2,311.34,217.45,89.398,202.86,-1,-1,-1,-1 +68,11,417.76,220.6,64.039,145.32,-1,-1,-1,-1 +69,1,559.73,213.37,55.323,125.54,-1,-1,-1,-1 +69,2,317.88,206.93,93.702,212.63,-1,-1,-1,-1 +69,11,422.74,220.5,64.348,146.02,-1,-1,-1,-1 +70,1,566.12,214.27,54.259,123.13,-1,-1,-1,-1 +70,2,323.85,194.07,99.022,224.7,-1,-1,-1,-1 +70,11,427.58,219.49,65.097,147.72,-1,-1,-1,-1 +71,1,572.59,215.45,53.07,120.43,-1,-1,-1,-1 +71,2,329.22,178.75,105.43,239.25,-1,-1,-1,-1 +71,11,432.2,217.39,66.352,150.57,-1,-1,-1,-1 diff --git a/examples/motmetrics_eval/data/TUD-Stadtmitte/gt.txt b/examples/motmetrics_eval/data/TUD-Stadtmitte/gt.txt new file mode 100644 index 0000000..c3bd759 --- /dev/null +++ b/examples/motmetrics_eval/data/TUD-Stadtmitte/gt.txt @@ -0,0 +1,1156 @@ +1,1,88,99,61.08,218.56,1,4.4852,5.5016,0 +1,2,181,95,75.808,227.01,1,4.4091,4.4283,0 +1,3,184,96,35.446,154.5,1,12.621,10.628,0 +1,4,357,82,72.924,246.18,1,4.3869,2.7804,0 +1,5,458,89,64.796,236.59,1,4.7801,2.1475,0 +1,6,513,111,36.501,122.15,1,16.592,8.209,0 +1,7,576,84,61.632,195.56,1,9.2619,3.381,0 +2,1,84,99,61.08,218.56,1,4.4717,5.5332,0 +2,2,184,95,75.63,226.62,1,4.4935,4.4599,0 +2,3,184,96,35.532,154.5,1,12.621,10.628,0 +2,4,360,82,72.831,245.79,1,4.4652,2.802,0 +2,5,460,89,64.89,236.19,1,4.7833,2.1314,0 +2,6,512,111,36.48,122.15,1,16.59,8.2237,0 +2,7,574,84,61.596,195.37,1,9.2594,3.4022,0 +3,1,80,100,61.08,218.56,1,4.3797,5.5027,0 +3,2,188,95,75.412,226.14,1,4.5047,4.4288,0 +3,3,184,96,35.636,154.51,1,12.621,10.628,0 +3,4,362,82,72.718,245.31,1,4.4692,2.7865,0 +3,5,462,89,65.005,235.71,1,4.861,2.1575,0 +3,6,511,111,36.453,122.14,1,16.589,8.2383,0 +3,7,572,84,61.552,195.14,1,9.257,3.4233,0 +4,1,75,100,61.08,218.56,1,4.3626,5.542,0 +4,2,192,95,75.173,225.62,1,4.5926,4.4526,0 +4,3,184,96,35.751,154.52,1,12.621,10.628,0 +4,4,365,82,72.593,244.78,1,4.5481,2.8082,0 +4,5,465,89,65.131,235.18,1,4.8657,2.1333,0 +4,6,510,111,36.425,122.13,1,16.588,8.2529,0 +4,7,569,84,61.504,194.89,1,9.3727,3.5155,0 +5,1,69,101,61.08,218.56,1,4.2642,5.527,0 +5,2,196,95,74.925,225.07,1,4.6036,4.4212,0 +5,3,184,96,35.87,154.53,1,12.621,10.628,0 +5,4,368,82,72.464,244.24,1,4.554,2.7847,0 +5,5,468,89,65.262,234.63,1,4.9457,2.1514,0 +5,6,508,111,36.395,122.13,1,16.585,8.2822,0 +5,7,566,84,61.455,194.63,1,9.3689,3.5473,0 +6,1,64,101,61.08,218.56,1,4.2469,5.5661,0 +6,2,200,95,74.675,224.53,1,4.6921,4.445,0 +6,3,184,96,35.99,154.53,1,12.621,10.628,0 +6,4,371,82,72.332,243.69,1,4.6335,2.8064,0 +6,5,471,89,65.394,234.07,1,4.9504,2.127,0 +6,6,507,111,36.365,122.12,1,16.584,8.2968,0 +6,7,564,84,61.404,194.37,1,9.3664,3.5685,0 +6,8,616,108,23.994,126.99,1,16.481,6.6959,0 +7,1,59,101,61.08,218.56,1,4.2294,5.6051,0 +7,2,204,95,74.425,223.98,1,4.7812,4.4689,0 +7,3,184,96,36.11,154.54,1,12.624,10.615,0 +7,4,374,82,72.2,243.13,1,4.6393,2.7828,0 +7,5,473,90,65.525,233.52,1,4.9535,2.1108,0 +7,6,506,112,36.335,122.11,1,16.365,8.1919,0 +7,7,561,84,61.352,194.1,1,9.3627,3.6003,0 +7,8,615,108,25.355,127.03,1,16.267,6.5908,0 +8,1,53,102,61.08,218.56,1,4.1314,5.5897,0 +8,2,208,95,74.175,223.43,1,4.7921,4.4372,0 +8,3,184,96,36.23,154.55,1,12.624,10.615,0 +8,4,377,82,72.068,242.59,1,4.7194,2.8046,0 +8,5,476,90,65.655,232.97,1,5.034,2.1287,0 +8,6,504,112,36.305,122.11,1,16.362,8.2209,0 +8,7,558,85,61.3,193.84,1,9.3589,3.6321,0 +8,8,613,108,27.016,127.08,1,16.266,6.6053,0 +9,1,48,102,61.08,218.56,1,4.1136,5.6285,0 +9,2,212,95,73.925,222.88,1,4.8791,4.469,0 +9,3,183,96,36.35,154.56,1,12.621,10.628,0 +9,4,380,82,71.936,242.03,1,4.7232,2.7887,0 +9,5,479,90,65.786,232.41,1,5.0386,2.1042,0 +9,6,503,112,36.275,122.1,1,16.361,8.2354,0 +9,7,555,85,61.248,193.58,1,9.355,3.6639,0 +9,8,611,108,28.839,127.13,1,16.265,6.6197,0 +10,1,43,103,61.08,218.56,1,4.0197,5.6051,0 +10,2,216,95,73.675,222.33,1,4.8899,4.4371,0 +10,3,183,96,36.47,154.57,1,12.621,10.628,0 +10,4,383,82,71.805,241.49,1,4.804,2.8105,0 +10,5,482,90,65.918,231.85,1,5.1198,2.1221,0 +10,6,502,112,36.245,122.1,1,16.36,8.25,0 +10,7,553,85,61.196,193.31,1,9.3524,3.685,0 +10,8,609,108,30.725,127.19,1,16.264,6.6341,0 +11,1,37,103,61.08,218.56,1,3.998,5.6514,0 +11,2,220,95,73.425,221.78,1,4.9803,4.461,0 +11,3,183,96,36.59,154.57,1,12.621,10.628,0 +11,4,386,82,71.675,240.94,1,4.8855,2.8325,0 +11,5,485,90,66.05,231.3,1,5.1258,2.0892,0 +11,6,500,112,36.216,122.09,1,16.357,8.279,0 +11,7,550,85,61.145,193.05,1,9.3486,3.7168,0 +11,8,607,107,32.63,127.24,1,16.477,6.7542,0 +12,1,32,103,61.238,218.55,1,3.9798,5.69,0 +12,2,224,95,73.176,221.23,1,4.9909,4.4288,0 +12,3,183,96,36.71,154.58,1,12.621,10.628,0 +12,4,389,82,71.545,240.38,1,4.8911,2.8085,0 +12,5,487,90,66.182,230.75,1,5.2062,2.1153,0 +12,6,499,112,36.188,122.08,1,16.356,8.2934,0 +12,7,547,85,61.095,192.79,1,9.4654,3.8112,0 +12,8,606,107,34.535,127.3,1,16.477,6.7542,0 +13,1,26,104,61.782,218.53,1,3.8826,5.6739,0 +13,2,228,95,72.928,220.68,1,5.082,4.4526,0 +13,3,183,96,36.83,154.59,1,12.621,10.628,0 +13,4,393,82,71.414,239.84,1,4.9751,2.8224,0 +13,5,490,90,66.314,230.19,1,5.2107,2.0905,0 +13,6,498,112,36.16,122.08,1,16.355,8.308,0 +13,7,545,85,61.045,192.53,1,9.4628,3.8325,0 +13,8,604,107,36.421,127.35,1,16.476,6.7687,0 +14,1,20,104,63.155,218.48,1,3.8641,5.7122,0 +14,2,232,95,72.68,220.13,1,5.0925,4.4202,0 +14,3,183,96,36.95,154.6,1,12.621,10.628,0 +14,4,396,82,71.282,239.28,1,4.9806,2.7982,0 +14,5,493,90,66.445,229.63,1,5.2932,2.1084,0 +14,6,496,112,36.132,122.07,1,16.352,8.337,0 +14,7,542,85,60.995,192.26,1,9.4588,3.8644,0 +14,8,602,107,38.244,127.4,1,16.475,6.7833,0 +15,1,14,105,65.7,218.39,1,3.7712,5.6883,0 +15,2,237,95,72.432,219.59,1,5.1868,4.4359,0 +15,3,183,96,37.07,154.61,1,12.621,10.628,0 +15,4,399,82,71.15,238.74,1,5.0634,2.8202,0 +15,5,496,90,66.575,229.08,1,5.2976,2.0834,0 +15,6,495,112,36.104,122.07,1,16.351,8.3515,0 +15,7,539,85,60.945,192,1,9.4548,3.8963,0 +15,8,600,107,39.905,127.45,1,16.473,6.8124,0 +16,1,7,105,69.165,218.26,1,3.7524,5.7263,0 +16,2,241,95,72.184,219.04,1,5.1971,4.4033,0 +16,3,183,96,37.19,154.61,1,12.621,10.628,0 +16,4,402,82,71.018,238.19,1,5.0689,2.7958,0 +16,5,499,90,66.706,228.53,1,5.3808,2.1013,0 +16,6,493,112,36.076,122.06,1,16.348,8.3805,0 +16,7,536,85,60.895,191.74,1,9.5729,3.9922,0 +16,8,598,107,41.266,127.49,1,16.472,6.8269,0 +17,1,0,105,72.378,218.15,1,3.7336,5.7644,0 +17,2,245,95,71.935,218.49,1,5.2869,4.4352,0 +17,3,183,96,37.309,154.62,1,12.621,10.628,0 +17,4,405,83,70.886,237.64,1,5.0743,2.7714,0 +17,5,501,90,66.838,227.97,1,5.4633,2.1278,0 +17,6,492,113,36.051,122.07,1,16.132,8.2756,0 +17,7,534,86,60.845,191.47,1,9.448,3.9494,0 +17,8,597,108,42.219,127.52,1,16.258,6.7208,0 +18,1,1,106,74.057,218.12,1,3.6675,5.6872,0 +18,2,249,95,71.685,217.94,1,5.3801,4.4591,0 +18,3,183,96,37.427,154.63,1,12.621,10.628,0 +18,4,408,83,70.755,237.09,1,5.0798,2.747,0 +18,5,504,90,66.97,227.41,1,5.4676,2.1025,0 +18,6,491,113,36.037,122.1,1,16.13,8.2899,0 +18,7,531,86,60.795,191.21,1,9.4439,3.9812,0 +18,8,595,108,42.763,127.53,1,16.256,6.7496,0 +19,1,-4,106,73.244,218.22,1,3.6448,5.7326,0 +19,2,253,95,71.435,217.39,1,5.3902,4.4261,0 +19,3,183,96,37.545,154.64,1,12.621,10.628,0 +19,4,411,83,70.625,236.54,1,5.1631,2.7687,0 +19,5,507,90,67.102,226.86,1,5.5523,2.1205,0 +19,6,489,113,36.041,122.18,1,16.128,8.3187,0 +19,7,528,86,60.745,190.95,1,9.562,4.0777,0 +19,8,594,108,43.004,127.54,1,16.255,6.7641,0 +20,1,-7,106,69.735,218.48,1,3.6257,5.7704,0 +20,2,257,95,71.185,216.84,1,5.4841,4.4499,0 +20,3,183,96,37.663,154.65,1,12.621,10.628,0 +20,4,414,83,70.495,235.99,1,5.2472,2.7906,0 +20,5,510,90,67.234,226.31,1,5.5565,2.0951,0 +20,6,487,113,36.071,122.33,1,16.125,8.3475,0 +20,7,526,86,60.695,190.69,1,9.5592,4.099,0 +20,8,592,109,43.075,127.56,1,16.042,6.6878,0 +21,1,-9,106,64.375,218.86,1,3.6104,5.8007,0 +21,2,261,95,70.935,216.29,1,5.494,4.4167,0 +21,3,183,96,37.781,154.65,1,12.621,10.628,0 +21,4,417,83,70.364,235.44,1,5.2525,2.7659,0 +21,5,513,90,67.365,225.75,1,5.6419,2.1131,0 +21,6,485,112,36.127,122.53,1,16.337,8.4965,0 +21,7,523,86,60.645,190.43,1,9.555,4.131,0 +21,8,591,109,43.068,127.59,1,16.041,6.7021,0 +22,1,0,106,58.857,219.25,1,3.5605,5.6935,0 +22,2,265,95,70.685,215.74,1,5.5886,4.4405,0 +22,3,183,96,37.9,154.66,1,12.621,10.628,0 +22,4,420,83,70.232,234.89,1,5.3372,2.7878,0 +22,5,515,90,67.495,225.19,1,5.6447,2.096,0 +22,6,483,112,36.201,122.79,1,16.335,8.5255,0 +22,7,520,86,60.595,190.16,1,9.5509,4.163,0 +22,8,590,109,43.022,127.65,1,16.04,6.7164,0 +23,2,269,95,70.435,215.19,1,5.5984,4.407,0 +23,3,183,96,38.02,154.67,1,12.624,10.615,0 +23,4,423,83,70.1,234.34,1,5.3425,2.7629,0 +23,5,518,90,67.626,224.64,1,5.7308,2.1141,0 +23,6,481,112,36.286,123.07,1,16.117,8.4337,0 +23,7,517,86,60.545,189.9,1,9.6702,4.2612,0 +23,8,590,109,42.956,127.74,1,16.04,6.7164,0 +24,2,273,95,70.185,214.64,1,5.6937,4.4308,0 +24,3,183,96,38.14,154.68,1,12.624,10.615,0 +24,4,426,83,69.968,233.79,1,5.4262,2.7932,0 +24,5,521,90,67.758,224.09,1,5.7349,2.0883,0 +24,6,479,112,36.375,123.36,1,16.114,8.4625,0 +24,7,515,86,60.495,189.64,1,9.6674,4.2826,0 +24,8,590,109,42.875,127.84,1,16.04,6.7164,0 +25,2,277,95,69.935,214.1,1,5.701,4.4055,0 +25,3,183,96,38.26,154.69,1,12.624,10.615,0 +25,4,429,83,69.836,233.25,1,5.4314,2.7682,0 +25,5,524,90,67.89,223.53,1,5.8217,2.1064,0 +25,6,477,112,36.465,123.66,1,16.111,8.4912,0 +25,7,512,86,60.445,189.38,1,9.6631,4.3148,0 +25,8,590,109,42.786,127.95,1,16.04,6.7164,0 +26,2,282,95,69.685,213.55,1,5.7994,4.4208,0 +26,3,183,96,38.38,154.69,1,12.624,10.615,0 +26,4,432,83,69.705,232.69,1,5.5176,2.7902,0 +26,5,527,90,68.022,222.97,1,5.9107,2.1159,0 +26,6,475,111,36.556,123.95,1,16.324,8.6416,0 +26,7,509,86,60.395,189.11,1,9.6587,4.3469,0 +26,8,589,109,42.695,128.06,1,15.832,6.6268,0 +27,2,286,95,69.435,213,1,5.8089,4.3868,0 +27,3,183,96,38.5,154.7,1,12.624,10.615,0 +27,4,435,83,69.575,232.15,1,5.5227,2.765,0 +27,5,529,90,68.154,222.42,1,5.9134,2.0985,0 +27,6,473,111,36.648,124.24,1,16.106,8.5488,0 +27,7,507,87,60.345,188.85,1,9.6558,4.3683,0 +27,8,589,109,42.602,128.17,1,15.832,6.6268,0 +28,2,290,95,69.185,212.45,1,5.9057,4.4105,0 +28,3,183,96,38.62,154.71,1,12.624,10.615,0 +28,4,438,83,69.444,231.59,1,5.6096,2.787,0 +28,5,532,90,68.285,221.87,1,6.0017,2.1167,0 +28,6,471,111,36.74,124.54,1,16.103,8.5775,0 +28,7,504,87,60.295,188.59,1,9.6515,4.4004,0 +28,8,589,109,42.51,128.29,1,15.832,6.6268,0 +29,2,294,95,68.935,211.9,1,6.0033,4.4344,0 +29,3,183,96,38.74,154.72,1,12.624,10.615,0 +29,4,441,83,69.312,231.04,1,5.6146,2.7616,0 +29,5,535,90,68.415,221.31,1,6.0057,2.0904,0 +29,6,469,111,36.832,124.83,1,16.1,8.6063,0 +29,7,501,87,60.245,188.32,1,9.6471,4.4325,0 +29,8,589,109,42.417,128.4,1,15.832,6.6268,0 +30,2,298,95,68.685,211.35,1,6.0126,4.3999,0 +30,3,183,96,38.86,154.73,1,12.624,10.615,0 +30,4,444,83,69.18,230.5,1,5.7023,2.7837,0 +30,5,538,91,68.546,220.75,1,6.0097,2.0641,0 +30,6,466,110,36.924,125.12,1,16.096,8.6494,0 +30,7,498,87,60.195,188.06,1,9.6426,4.4646,0 +30,8,589,109,42.323,128.51,1,15.832,6.6268,0 +31,2,302,95,68.436,210.8,1,6.111,4.4237,0 +31,3,183,96,38.98,154.73,1,12.624,10.615,0 +31,4,447,83,69.048,229.94,1,5.7906,2.8059,0 +31,5,541,91,68.678,220.2,1,6.0136,2.0378,0 +31,6,464,110,37.015,125.42,1,16.093,8.6782,0 +31,7,496,87,60.145,187.8,1,9.7647,4.5544,0 +31,8,589,109,42.23,128.63,1,15.832,6.6268,0 +32,2,306,95,68.188,210.25,1,6.1201,4.3891,0 +32,3,183,96,39.1,154.74,1,12.624,10.615,0 +32,4,450,84,68.916,229.4,1,5.7122,2.7326,0 +32,5,543,91,68.81,219.65,1,6.1013,2.0645,0 +32,6,462,110,37.105,125.71,1,16.091,8.707,0 +32,7,493,87,60.095,187.54,1,9.7602,4.5867,0 +32,8,589,109,42.137,128.74,1,15.832,6.6268,0 +33,2,310,95,67.94,209.7,1,6.217,4.4215,0 +33,3,183,96,39.22,154.75,1,12.624,10.615,0 +33,4,453,84,68.785,228.84,1,5.8005,2.7545,0 +33,5,546,91,68.942,219.09,1,6.1052,2.038,0 +33,6,460,110,37.195,126.01,1,15.876,8.6142,0 +33,7,490,87,60.045,187.27,1,9.7557,4.6189,0 +33,8,589,109,42.043,128.86,1,15.832,6.6268,0 +34,2,314,95,67.692,209.16,1,6.2261,4.3866,0 +34,3,182,96,39.34,154.76,1,12.621,10.628,0 +34,4,456,84,68.655,228.29,1,5.8054,2.7288,0 +34,5,549,91,69.074,218.54,1,6.195,2.0559,0 +34,6,458,109,37.285,126.3,1,16.085,8.7645,0 +34,7,488,87,59.995,187.01,1,9.7511,4.6512,0 +34,8,589,109,41.95,128.97,1,15.83,6.641,0 +35,2,318,95,67.444,208.61,1,6.326,4.4104,0 +35,3,182,96,39.46,154.77,1,12.621,10.628,0 +35,4,459,84,68.525,227.75,1,5.8945,2.7508,0 +35,5,552,91,69.205,217.98,1,6.2857,2.0739,0 +35,6,456,109,37.375,126.59,1,16.082,8.7933,0 +35,7,485,87,59.945,186.75,1,9.8731,4.7534,0 +35,8,589,109,41.858,129.09,1,15.626,6.5386,0 +36,2,322,95,67.195,208.06,1,6.3349,4.3753,0 +36,3,182,96,39.58,154.77,1,12.621,10.628,0 +36,4,463,84,68.394,227.2,1,5.9009,2.7163,0 +36,5,555,91,69.335,217.43,1,6.2895,2.0471,0 +36,6,454,109,37.465,126.89,1,16.079,8.8221,0 +36,7,482,87,59.895,186.49,1,9.8685,4.7859,0 +36,8,589,109,41.765,129.2,1,15.626,6.5386,0 +37,2,327,95,66.945,207.51,1,6.4379,4.3901,0 +37,3,182,96,39.7,154.78,1,12.621,10.628,0 +37,4,466,84,68.262,226.65,1,5.9907,2.7382,0 +37,5,557,91,69.466,216.87,1,6.3797,2.0741,0 +37,6,451,109,37.554,127.18,1,15.863,8.7425,0 +37,7,479,88,59.845,186.22,1,9.7372,4.7478,0 +37,8,589,109,41.672,129.31,1,15.626,6.5386,0 +38,2,331,95,66.695,206.96,1,6.5395,4.4139,0 +38,3,182,96,39.82,154.79,1,12.621,10.628,0 +38,4,469,84,68.13,226.1,1,5.9954,2.7121,0 +38,5,560,91,69.57,216.32,1,6.3834,2.0471,0 +38,6,449,108,37.642,127.47,1,16.072,8.894,0 +38,7,477,88,59.795,185.96,1,9.8607,4.8399,0 +38,8,589,109,41.58,129.43,1,15.626,6.5386,0 +39,2,335,95,66.445,206.41,1,6.5482,4.3783,0 +39,3,182,96,39.94,154.8,1,12.621,10.628,0 +39,4,472,84,67.998,225.55,1,6.0845,2.7428,0 +39,5,563,91,69.578,215.77,1,6.4757,2.0652,0 +39,6,447,108,37.725,127.74,1,16.069,8.9228,0 +39,7,474,88,59.745,185.7,1,9.8559,4.8723,0 +39,8,588,109,41.487,129.54,1,15.625,6.5526,0 +40,2,339,95,66.195,205.86,1,6.6506,4.402,0 +40,3,182,96,40.06,154.81,1,12.624,10.615,0 +40,4,475,84,67.866,225,1,6.0892,2.7165,0 +40,5,566,91,69.344,215.23,1,6.4794,2.038,0 +40,6,445,108,37.8,128,1,15.854,8.8281,0 +40,7,471,88,59.695,185.44,1,9.8512,4.9047,0 +40,8,588,108,41.393,129.66,1,15.829,6.6552,0 +41,2,343,95,65.945,205.31,1,6.657,4.3751,0 +41,3,182,96,40.18,154.81,1,12.624,10.615,0 +41,4,478,84,67.735,224.45,1,6.1806,2.7385,0 +41,5,569,91,68.659,214.71,1,6.5725,2.0561,0 +41,6,444,108,37.862,128.22,1,15.852,8.8424,0 +41,7,469,88,59.645,185.17,1,9.848,4.9262,0 +41,8,588,108,41.3,129.77,1,15.829,6.6552,0 +42,2,347,95,65.695,204.76,1,6.7604,4.3989,0 +42,3,182,96,40.3,154.82,1,12.624,10.615,0 +42,4,481,84,67.605,223.9,1,6.2728,2.7607,0 +42,5,571,91,67.362,214.2,1,6.5737,2.047,0 +42,6,442,108,37.913,128.41,1,15.849,8.8709,0 +42,7,466,88,59.595,184.91,1,9.9713,5.0309,0 +42,8,588,108,41.208,129.88,1,15.829,6.6552,0 +43,2,351,95,65.445,204.21,1,6.7688,4.3628,0 +43,3,182,96,40.42,154.83,1,12.624,10.615,0 +43,4,484,84,67.475,223.35,1,6.2774,2.7341,0 +43,5,574,91,65.454,213.72,1,6.6665,2.0743,0 +43,6,440,107,37.954,128.58,1,16.059,9.0236,0 +43,7,463,88,59.545,184.65,1,9.9665,5.0634,0 +43,8,588,108,41.115,130,1,15.625,6.5526,0 +44,2,355,95,65.195,203.67,1,6.873,4.3864,0 +44,3,182,96,40.54,154.84,1,12.624,10.615,0 +44,4,487,84,67.344,222.8,1,6.3705,2.7563,0 +44,5,577,91,63.096,213.26,1,6.6689,2.0559,0 +44,6,439,107,37.99,128.74,1,16.057,9.038,0 +44,7,461,88,59.495,184.38,1,9.9632,5.0851,0 +44,8,588,108,41.023,130.11,1,15.625,6.5526,0 +45,2,359,95,64.945,203.12,1,6.8813,4.3501,0 +45,3,182,96,40.66,154.85,1,12.624,10.615,0 +45,4,490,84,67.212,222.25,1,6.375,2.7296,0 +45,5,580,91,60.496,212.81,1,6.7625,2.0834,0 +45,6,437,107,38.025,128.89,1,16.056,9.0524,0 +45,7,458,88,59.445,184.12,1,9.9583,5.1177,0 +45,8,588,108,40.93,130.22,1,15.625,6.5526,0 +46,2,363,95,64.695,202.57,1,6.9863,4.3737,0 +46,3,182,96,40.78,154.85,1,12.624,10.615,0 +46,4,493,84,67.08,221.71,1,6.4689,2.7518,0 +46,5,582,91,57.8,212.36,1,6.7625,2.0834,0 +46,6,436,107,38.059,129.04,1,15.842,8.9423,0 +46,7,455,88,59.395,183.86,1,10.083,5.2241,0 +46,8,588,108,40.837,130.34,1,15.625,6.5526,0 +47,2,367,95,64.445,202.02,1,6.9945,4.3371,0 +47,3,182,96,40.9,154.86,1,12.624,10.615,0 +47,4,496,84,66.948,221.16,1,6.4733,2.7249,0 +47,5,585,91,55.075,211.91,1,6.8571,2.1111,0 +47,6,434,107,38.093,129.2,1,15.839,8.9708,0 +47,7,452,89,59.345,183.6,1,9.9484,5.1827,0 +47,8,588,108,40.743,130.45,1,15.625,6.5526,0 +48,2,372,95,64.195,201.47,1,7.1024,4.3514,0 +48,3,182,96,41.02,154.87,1,12.624,10.615,0 +48,4,499,85,66.816,220.6,1,6.4777,2.698,0 +48,5,588,91,52.35,211.46,1,6.8595,2.0925,0 +48,6,433,107,38.127,129.35,1,15.837,8.9851,0 +48,7,450,89,59.294,183.34,1,9.945,5.2044,0 +48,8,588,108,40.65,130.57,1,15.625,6.5526,0 +49,2,376,95,63.945,200.92,1,7.2074,4.3844,0 +49,3,182,96,41.14,154.88,1,12.624,10.615,0 +49,4,502,85,66.685,220.06,1,6.4821,2.6711,0 +49,5,590,91,49.625,211.01,1,6.8595,2.0925,0 +49,6,431,107,38.16,129.5,1,15.834,9.0136,0 +49,7,447,89,59.242,183.07,1,9.94,5.2369,0 +49,8,588,108,40.557,130.68,1,15.625,6.5526,0 +50,2,380,95,63.695,200.37,1,7.2153,4.3472,0 +50,3,182,96,41.26,154.89,1,12.624,10.615,0 +50,4,505,85,66.555,219.5,1,6.5768,2.6929,0 +50,5,593,91,46.9,210.56,1,6.955,2.1204,0 +50,6,430,107,38.193,129.65,1,15.833,9.0279,0 +50,7,444,89,59.19,182.81,1,10.065,5.3441,0 +50,8,588,108,40.463,130.8,1,15.625,6.5526,0 +51,2,384,95,63.446,199.82,1,7.3232,4.3709,0 +51,3,182,96,41.38,154.89,1,12.624,10.615,0 +51,4,508,85,66.425,218.96,1,6.6723,2.715,0 +51,5,596,91,44.176,210.11,1,6.9573,2.1017,0 +51,6,428,107,38.227,129.8,1,15.83,9.0565,0 +51,7,442,89,59.138,182.55,1,10.061,5.3659,0 +51,8,587,108,40.37,130.91,1,15.624,6.5667,0 +52,2,388,95,63.198,199.27,1,7.3309,4.3335,0 +52,3,182,96,41.5,154.9,1,12.624,10.615,0 +52,4,511,85,66.294,218.41,1,6.6766,2.6877,0 +52,5,599,91,41.452,209.66,1,7.0526,2.1391,0 +52,6,427,107,38.26,129.95,1,15.828,9.0707,0 +52,7,439,89,59.086,182.28,1,10.056,5.3986,0 +52,8,587,108,40.278,131.02,1,15.422,6.4656,0 +53,2,392,95,62.95,198.72,1,7.4398,4.3571,0 +53,3,182,96,41.62,154.91,1,12.624,10.615,0 +53,4,514,85,66.162,217.85,1,6.773,2.7098,0 +53,5,601,91,38.728,209.21,1,7.0537,2.1297,0 +53,6,425,107,38.293,130.1,1,15.616,8.9753,0 +53,7,436,89,59.035,182.02,1,10.051,5.4313,0 +53,8,587,108,40.185,131.14,1,15.422,6.4656,0 +54,2,396,95,62.702,198.18,1,7.4474,4.3194,0 +54,3,182,96,41.74,154.92,1,12.624,10.615,0 +54,4,517,85,66.03,217.31,1,6.7772,2.6824,0 +54,5,604,91,36.004,208.76,1,7.1511,2.158,0 +54,6,424,107,38.327,130.26,1,15.614,8.9895,0 +54,7,433,89,58.985,181.76,1,10.177,5.5404,0 +54,8,587,108,40.093,131.25,1,15.422,6.4656,0 +55,2,399,95,62.454,197.63,1,7.5553,4.3525,0 +55,3,182,96,41.86,154.93,1,12.624,10.615,0 +55,4,520,85,65.898,216.75,1,6.8731,2.7136,0 +55,5,607,91,33.28,208.32,1,7.1522,2.1485,0 +55,6,422,107,38.361,130.41,1,15.611,9.0178,0 +55,7,431,89,58.935,181.5,1,10.174,5.5623,0 +55,8,587,108,40.003,131.37,1,15.422,6.4656,0 +56,2,403,95,62.205,197.08,1,7.5628,4.3145,0 +56,3,182,96,41.98,154.93,1,12.624,10.615,0 +56,4,523,85,65.766,216.21,1,6.8773,2.686,0 +56,5,610,91,30.555,207.87,1,7.2506,2.177,0 +56,6,421,106,38.395,130.56,1,15.819,9.1564,0 +56,7,428,89,58.885,181.24,1,10.168,5.5952,0 +56,8,587,108,39.926,131.48,1,15.421,6.4795,0 +57,2,407,95,61.955,196.53,1,7.6717,4.3476,0 +57,3,182,96,42.1,154.94,1,12.627,10.602,0 +57,4,526,85,65.635,215.66,1,6.9755,2.7082,0 +57,5,612,91,27.83,207.42,1,7.2506,2.177,0 +57,6,419,106,38.429,130.71,1,15.816,9.185,0 +57,7,425,90,58.835,180.97,1,10.163,5.6281,0 +57,8,587,107,39.88,131.59,1,15.623,6.5808,0 +58,2,410,95,61.705,195.98,1,7.7817,4.381,0 +58,3,182,96,42.22,154.95,1,12.627,10.602,0 +58,4,529,85,65.505,215.11,1,6.9796,2.6804,0 +58,5,615,91,25.132,206.97,1,7.3499,2.2058,0 +58,6,418,106,38.463,130.86,1,15.814,9.1993,0 +58,7,423,90,58.785,180.71,1,10.16,5.65,0 +58,8,586,107,39.893,131.71,1,15.622,6.5949,0 +59,2,414,95,61.455,195.43,1,7.789,4.3426,0 +59,3,182,96,42.34,154.96,1,12.627,10.602,0 +59,4,533,85,65.374,214.56,1,7.08,2.6932,0 +59,5,618,91,22.525,206.54,1,7.3522,2.1866,0 +59,6,416,106,38.497,131.01,1,15.601,9.1027,0 +59,7,420,90,58.735,180.45,1,10.154,5.6829,0 +59,8,586,108,39.984,131.82,1,15.42,6.4935,0 +60,2,417,95,61.205,194.88,1,7.9001,4.376,0 +60,3,181,96,42.46,154.97,1,12.624,10.615,0 +60,4,536,85,65.242,214.01,1,7.0841,2.6652,0 +60,5,620,91,20.15,206.15,1,7.3533,2.1771,0 +60,6,415,106,38.53,131.16,1,15.6,9.1169,0 +60,7,417,90,58.685,180.18,1,10.149,5.7157,0 +60,8,585,108,40.156,131.94,1,15.42,6.4935,0 +61,2,421,95,60.955,194.33,1,7.9073,4.3373,0 +61,3,181,96,42.579,154.97,1,12.624,10.615,0 +61,4,539,85,65.11,213.46,1,7.1841,2.6874,0 +61,5,622,91,18.204,205.83,1,7.4525,2.2155,0 +61,6,413,106,38.563,131.32,1,15.597,9.1452,0 +61,7,414,90,58.635,179.92,1,10.276,5.8274,0 +61,8,584,108,40.385,132.05,1,15.221,6.4074,0 +62,2,425,95,60.705,193.78,1,8.0212,4.361,0 +62,3,181,96,42.697,154.98,1,12.624,10.615,0 +62,4,542,85,64.978,212.91,1,7.285,2.7097,0 +62,5,623,91,16.842,205.61,1,7.4525,2.2155,0 +62,6,412,106,38.597,131.47,1,15.595,9.1594,0 +62,7,412,90,58.585,179.66,1,10.273,5.8494,0 +62,8,582,108,40.646,132.16,1,15.219,6.4351,0 +63,2,428,95,60.455,193.24,1,8.0266,4.3318,0 +63,3,181,96,42.815,154.99,1,12.624,10.615,0 +63,4,545,86,64.846,212.36,1,7.192,2.6309,0 +63,6,410,106,38.63,131.62,1,15.592,9.1877,0 +63,7,409,90,58.535,179.4,1,10.267,5.8825,0 +63,8,581,108,40.92,132.28,1,15.217,6.449,0 +64,2,432,95,60.205,192.69,1,8.1415,4.3556,0 +64,3,181,96,42.933,155,1,12.45,10.488,0 +64,4,548,86,64.715,211.81,1,7.2929,2.6529,0 +64,6,409,106,38.663,131.77,1,15.59,9.2019,0 +64,7,406,90,58.485,179.13,1,10.262,5.9155,0 +64,8,580,108,41.198,132.39,1,15.216,6.4628,0 +65,2,435,95,59.955,192.14,1,8.145,4.3359,0 +65,3,181,96,43.051,155.01,1,12.45,10.488,0 +65,4,551,86,64.585,211.26,1,7.2968,2.6245,0 +65,6,407,106,38.697,131.92,1,15.587,9.2302,0 +65,7,404,90,58.435,178.87,1,10.393,6.0181,0 +65,8,579,108,41.475,132.51,1,15.215,6.4767,0 +66,2,439,96,59.705,191.59,1,8.152,4.2966,0 +66,3,181,96,43.17,155.01,1,12.45,10.488,0 +66,4,554,86,64.455,210.71,1,7.3986,2.6465,0 +66,6,406,106,38.731,132.07,1,15.379,9.1199,0 +66,7,401,91,58.385,178.61,1,10.252,5.9706,0 +66,8,577,108,41.752,132.62,1,15.213,6.5043,0 +67,2,442,96,59.455,191.04,1,8.1572,4.2671,0 +67,3,181,96,43.29,155.02,1,12.45,10.488,0 +67,4,557,86,64.324,210.16,1,7.4024,2.6179,0 +67,6,404,106,38.765,132.22,1,15.376,9.148,0 +67,7,398,91,58.335,178.34,1,10.247,6.0036,0 +67,8,576,109,42.03,132.74,1,15.017,6.4051,0 +68,2,446,96,59.205,190.49,1,8.2731,4.2905,0 +68,3,181,96,43.41,155.03,1,12.45,10.488,0 +68,4,560,86,64.192,209.62,1,7.5053,2.6399,0 +68,6,403,105,38.799,132.38,1,15.581,9.2869,0 +68,7,395,91,58.285,178.08,1,10.241,6.0366,0 +68,8,575,109,42.307,132.85,1,15.016,6.4188,0 +69,2,450,96,58.955,189.94,1,8.3902,4.314,0 +69,3,181,96,43.53,155.04,1,12.45,10.488,0 +69,4,563,86,64.06,209.06,1,7.509,2.6111,0 +69,6,401,105,38.833,132.53,1,15.577,9.3152,0 +69,7,393,91,58.235,177.82,1,10.372,6.14,0 +69,8,573,109,42.585,132.96,1,15.014,6.4462,0 +70,2,453,96,58.706,189.39,1,8.3953,4.2841,0 +70,3,181,96,43.65,155.04,1,12.45,10.488,0 +70,4,566,86,63.904,208.52,1,7.6116,2.6428,0 +70,6,400,105,38.867,132.68,1,15.576,9.3294,0 +70,7,390,91,58.185,177.56,1,10.367,6.1733,0 +70,8,572,109,42.862,133.08,1,14.82,6.3617,0 +71,2,457,96,58.458,188.84,1,8.5135,4.3076,0 +71,3,181,96,43.77,155.05,1,12.45,10.488,0 +71,4,569,86,63.666,207.98,1,7.7165,2.6651,0 +71,6,399,105,38.9,132.83,1,15.574,9.3436,0 +71,7,387,91,58.135,177.29,1,10.361,6.2065,0 +71,8,571,109,43.138,133.19,1,14.819,6.3753,0 +72,2,460,96,58.21,188.29,1,8.5184,4.2775,0 +72,3,181,96,43.889,155.06,1,12.45,10.488,0 +72,4,572,86,63.221,207.46,1,7.7202,2.6359,0 +72,6,397,105,38.933,132.98,1,15.571,9.3719,0 +72,7,385,91,58.085,177.03,1,10.357,6.2287,0 +72,8,570,109,43.415,133.31,1,14.818,6.3889,0 +73,2,464,96,57.962,187.75,1,8.6362,4.3112,0 +73,3,181,96,44.002,155.07,1,12.453,10.475,0 +73,4,575,86,62.392,206.98,1,7.8261,2.6582,0 +73,6,396,105,38.967,133.13,1,15.362,9.2604,0 +73,7,382,91,58.035,176.77,1,10.488,6.3452,0 +73,8,568,109,43.693,133.42,1,14.816,6.4161,0 +74,2,467,96,57.714,187.2,1,8.641,4.2808,0 +74,3,181,96,44.103,155.07,1,12.453,10.475,0 +74,4,578,86,61.039,206.56,1,7.8285,2.6387,0 +74,6,395,105,39,133.28,1,15.361,9.2745,0 +74,7,379,91,57.985,176.51,1,10.48,6.3898,0 +74,8,567,110,43.97,133.53,1,14.624,6.3324,0 +74,9,604,108,34.383,160.6,1,10.673,3.9121,0 +75,2,471,96,57.465,186.65,1,8.7616,4.3044,0 +75,3,181,96,44.18,155.08,1,12.453,10.475,0 +75,4,580,86,59.162,206.19,1,7.8297,2.6289,0 +75,6,395,105,39.033,133.44,1,15.361,9.2745,0 +75,7,376,91,57.935,176.25,1,10.474,6.4233,0 +75,8,566,110,44.248,133.65,1,14.624,6.3324,0 +75,9,601,109,36.779,160.24,1,10.536,3.8681,0 +76,2,475,96,57.215,186.1,1,8.768,4.2637,0 +76,3,181,96,44.225,155.07,1,12.453,10.475,0 +76,4,583,86,56.901,205.85,1,7.9354,2.661,0 +76,6,395,105,39.067,133.59,1,15.361,9.2745,0 +76,7,374,92,57.885,175.98,1,10.47,6.4455,0 +76,8,565,110,44.525,133.76,1,14.623,6.3459,0 +76,9,596,109,39.702,159.8,1,10.666,3.9802,0 +77,2,478,96,56.965,185.55,1,8.8881,4.2974,0 +77,3,182,96,44.239,155.07,1,12.456,10.462,0 +77,4,586,86,54.433,205.54,1,7.9378,2.6413,0 +77,6,394,105,39.101,133.74,1,15.359,9.2885,0 +77,7,371,92,57.835,175.72,1,10.464,6.479,0 +77,8,563,110,44.802,133.88,1,14.621,6.3729,0 +77,9,592,110,42.91,159.33,1,10.529,3.9357,0 +78,2,482,96,56.715,185,1,8.8944,4.2564,0 +78,3,182,96,44.23,155.06,1,12.456,10.462,0 +78,4,588,86,51.883,205.24,1,7.9378,2.6413,0 +78,6,394,105,39.135,133.89,1,15.359,9.2885,0 +78,7,368,92,57.785,175.46,1,10.458,6.5124,0 +78,8,562,110,45.078,133.99,1,14.62,6.3864,0 +78,9,587,110,46.196,158.83,1,10.66,4.0368,0 +79,2,485,97,56.465,184.45,1,8.8991,4.2256,0 +79,3,182,96,44.209,155.05,1,12.456,10.462,0 +79,4,591,86,49.309,204.94,1,8.0446,2.6737,0 +79,6,394,105,39.169,134.04,1,15.155,9.1645,0 +79,7,366,92,57.735,175.19,1,10.454,6.5347,0 +79,8,561,110,45.353,134.1,1,14.431,6.3034,0 +79,9,582,111,49.393,158.34,1,10.521,4.0145,0 +80,2,489,97,56.215,183.9,1,9.0219,4.2489,0 +80,3,183,96,44.182,155.04,1,12.459,10.449,0 +80,4,593,86,46.714,204.63,1,8.0458,2.6638,0 +80,6,394,105,39.203,134.19,1,15.155,9.1645,0 +80,7,363,92,57.685,174.93,1,10.586,6.6541,0 +80,8,559,110,45.621,134.22,1,14.429,6.3301,0 +80,9,577,111,52.285,157.88,1,10.651,4.1161,0 +81,2,493,97,55.965,183.35,1,9.0265,4.2178,0 +81,3,183,96,44.154,155.03,1,12.459,10.449,0 +81,4,596,86,44.047,204.31,1,8.0481,2.6439,0 +81,6,394,105,39.237,134.34,1,15.155,9.1645,0 +81,7,360,92,57.635,174.67,1,10.58,6.6878,0 +81,8,558,111,45.87,134.33,1,14.243,6.2481,0 +81,9,573,112,54.61,157.46,1,10.513,4.082,0 +82,2,496,97,55.715,182.81,1,9.1491,4.2515,0 +82,3,184,96,44.125,155.01,1,12.462,10.436,0 +82,4,599,86,41.201,203.93,1,8.1549,2.6864,0 +82,6,394,105,39.27,134.5,1,15.155,9.1645,0 +82,7,357,92,57.585,174.41,1,10.574,6.7214,0 +82,8,557,111,46.083,134.45,1,14.243,6.2481,0 +82,9,569,112,56.162,157.1,1,10.51,4.1157,0 +83,2,500,97,55.465,182.26,1,9.1551,4.2098,0 +83,3,184,96,44.095,155,1,12.462,10.436,0 +83,4,602,86,38.021,203.44,1,8.1572,2.6665,0 +83,6,394,105,39.303,134.65,1,15.155,9.1645,0 +83,7,355,92,57.535,174.15,1,10.57,6.7439,0 +83,8,555,111,46.248,134.56,1,14.241,6.2747,0 +83,9,565,112,56.941,156.8,1,10.639,4.2291,0 +84,2,503,97,55.215,181.71,1,9.279,4.2436,0 +84,3,185,96,44.065,154.99,1,12.638,10.55,0 +84,4,606,86,34.389,202.82,1,8.2663,2.6993,0 +84,6,394,105,39.337,134.8,1,15.155,9.1645,0 +84,7,352,92,57.485,173.88,1,10.704,6.8655,0 +84,8,554,111,46.364,134.68,1,14.239,6.2879,0 +84,9,561,112,57.154,156.55,1,10.634,4.2743,0 +85,2,507,97,54.965,181.16,1,9.2849,4.2016,0 +85,3,185,96,44.035,154.98,1,12.638,10.55,0 +85,4,610,86,30.35,202.06,1,8.2686,2.6791,0 +85,6,394,105,39.371,134.95,1,15.155,9.1645,0 +85,7,349,92,57.435,173.62,1,10.697,6.8994,0 +85,8,553,111,46.446,134.79,1,14.238,6.3012,0 +85,9,558,112,57.061,156.32,1,10.63,4.3082,0 +86,2,510,97,54.715,180.61,1,9.41,4.2354,0 +86,3,186,96,44.005,154.97,1,12.64,10.537,0 +86,4,614,86,26.137,201.23,1,8.3788,2.7121,0 +86,6,394,105,39.405,135.1,1,14.955,9.0423,0 +86,7,347,93,57.385,173.36,1,10.553,6.8336,0 +86,8,551,111,46.508,134.9,1,14.236,6.3278,0 +86,9,555,113,56.848,156.1,1,10.492,4.2727,0 +87,2,514,97,54.465,180.06,1,9.4158,4.1931,0 +87,3,186,96,43.976,154.96,1,12.638,10.55,0 +87,4,618,86,22.143,200.43,1,8.4901,2.7455,0 +87,6,393,105,39.439,135.25,1,14.953,9.0561,0 +87,7,344,93,57.335,173.09,1,10.547,6.8673,0 +87,8,550,111,46.563,135.02,1,14.053,6.2463,0 +87,9,551,113,56.6,155.89,1,10.621,4.3871,0 +88,2,518,97,54.215,179.51,1,9.5438,4.2163,0 +88,3,186,95,43.948,154.94,1,12.813,10.678,0 +88,4,621,86,18.815,199.75,1,8.6016,2.7894,0 +88,6,393,105,39.473,135.4,1,14.953,9.0561,0 +88,7,341,93,57.285,172.83,1,10.681,6.9898,0 +88,8,548,111,46.617,135.13,1,14.05,6.2726,0 +88,9,548,113,56.352,155.67,1,10.617,4.421,0 +89,2,521,97,53.966,178.96,1,9.6702,4.2612,0 +89,3,187,95,43.92,154.93,1,12.816,10.665,0 +89,4,624,86,16.471,199.28,1,8.6038,2.7689,0 +89,6,393,105,39.507,135.56,1,14.953,9.0561,0 +89,7,339,93,57.235,172.57,1,10.676,7.0124,0 +89,8,547,111,46.67,135.25,1,14.049,6.2858,0 +89,9,545,113,56.104,155.46,1,10.613,4.4547,0 +90,2,525,97,53.718,178.41,1,9.6759,4.2183,0 +90,3,187,95,43.892,154.92,1,12.816,10.665,0 +90,6,393,105,39.54,135.71,1,14.953,9.0561,0 +90,7,337,93,57.185,172.31,1,10.672,7.035,0 +90,8,545,111,46.722,135.36,1,14.046,6.3121,0 +90,9,541,113,55.855,155.24,1,10.607,4.5111,0 +91,2,528,97,53.47,177.87,1,9.8051,4.2525,0 +91,3,188,95,43.864,154.91,1,12.819,10.652,0 +91,6,393,105,39.573,135.86,1,14.953,9.0561,0 +91,7,335,93,57.134,172.04,1,10.668,7.0576,0 +91,8,544,111,46.775,135.47,1,14.045,6.3253,0 +91,9,538,113,55.605,155.03,1,10.603,4.5448,0 +92,2,532,98,53.222,177.32,1,9.6856,4.1431,0 +92,3,188,95,43.835,154.9,1,12.819,10.652,0 +92,6,393,105,39.607,136.01,1,14.755,8.9357,0 +92,7,334,93,57.082,171.78,1,10.808,7.1595,0 +92,8,542,111,46.827,135.59,1,14.043,6.3516,0 +92,9,535,113,55.355,154.81,1,10.735,4.6503,0 +93,2,536,98,52.974,176.77,1,9.8161,4.1661,0 +93,3,189,95,43.805,154.88,1,12.822,10.639,0 +93,6,393,106,39.64,136.16,1,14.561,8.817,0 +93,7,333,93,57.03,171.52,1,10.806,7.1709,0 +93,8,541,111,46.88,135.7,1,14.041,6.3648,0 +93,9,532,113,55.106,154.59,1,10.731,4.6842,0 +94,2,539,98,52.725,176.22,1,9.8202,4.1336,0 +94,3,189,95,43.775,154.87,1,12.822,10.639,0 +94,6,393,106,39.673,136.31,1,14.561,8.817,0 +94,7,331,93,56.978,171.25,1,10.801,7.1937,0 +94,8,539,111,46.933,135.81,1,14.039,6.3911,0 +94,9,528,113,54.858,154.38,1,10.725,4.7295,0 +95,2,543,98,52.475,175.67,1,9.9521,4.1565,0 +95,3,190,95,43.745,154.86,1,12.824,10.626,0 +95,6,393,106,39.707,136.46,1,14.561,8.817,0 +95,7,330,93,56.926,170.99,1,10.943,7.2972,0 +95,8,538,111,46.985,135.93,1,14.037,6.4043,0 +95,9,525,113,54.61,154.16,1,10.721,4.7634,0 +96,2,546,98,52.225,175.12,1,9.9561,4.1238,0 +96,3,190,95,43.715,154.85,1,12.824,10.626,0 +96,6,393,106,39.741,136.62,1,14.561,8.817,0 +96,7,329,93,56.875,170.73,1,10.941,7.3087,0 +96,8,536,111,47.037,136.04,1,13.855,6.3357,0 +96,9,522,113,54.362,153.95,1,10.855,4.8709,0 +97,2,550,98,51.975,174.57,1,10.088,4.1577,0 +97,3,190,95,43.685,154.84,1,12.824,10.626,0 +97,6,392,106,39.775,136.77,1,14.559,8.8306,0 +97,7,328,93,56.825,170.47,1,10.939,7.3201,0 +97,8,535,111,47.09,136.16,1,13.854,6.3488,0 +97,9,518,113,54.114,153.73,1,10.849,4.9164,0 +98,2,553,98,51.725,174.02,1,10.092,4.1248,0 +98,3,191,95,43.656,154.83,1,12.827,10.613,0 +98,6,392,106,39.809,136.92,1,14.559,8.8306,0 +98,7,326,93,56.775,170.21,1,10.934,7.3431,0 +98,8,533,111,47.143,136.27,1,13.851,6.3749,0 +98,9,515,113,53.865,153.51,1,10.843,4.9619,0 +99,2,557,98,51.475,173.47,1,10.227,4.1477,0 +99,3,191,95,43.628,154.81,1,12.827,10.613,0 +99,6,392,106,39.843,137.07,1,14.367,8.7136,0 +99,7,325,93,56.725,169.94,1,11.078,7.4483,0 +99,8,532,111,47.195,136.38,1,13.85,6.388,0 +99,9,512,114,53.615,153.3,1,10.701,4.9215,0 +100,2,561,98,51.225,172.92,1,10.363,4.1709,0 +100,3,192,95,43.6,154.8,1,12.83,10.6,0 +100,6,392,106,39.877,137.22,1,14.367,8.7136,0 +100,7,324,93,56.675,169.68,1,11.076,7.4599,0 +100,8,530,111,47.248,136.5,1,13.848,6.4141,0 +100,9,508,114,53.365,153.08,1,10.695,4.9667,0 +101,2,564,98,50.975,172.38,1,10.367,4.1375,0 +101,3,192,95,43.572,154.79,1,12.83,10.6,0 +101,6,392,106,39.91,137.37,1,14.367,8.7136,0 +101,7,322,93,56.625,169.42,1,11.071,7.483,0 +101,8,529,111,47.3,136.61,1,13.846,6.4271,0 +101,9,505,114,53.115,152.87,1,10.829,5.0755,0 +102,2,568,98,50.725,171.83,1,10.505,4.1606,0 +102,3,193,94,43.544,154.78,1,13.011,10.716,0 +102,6,392,106,39.943,137.52,1,14.367,8.7136,0 +102,7,321,93,56.575,169.16,1,11.069,7.4945,0 +102,8,527,111,47.353,136.73,1,13.844,6.4532,0 +102,9,502,114,52.866,152.65,1,10.825,5.1095,0 +103,2,571,98,50.475,171.28,1,10.508,4.1269,0 +103,3,193,94,43.515,154.77,1,13.011,10.716,0 +103,6,392,106,39.977,137.67,1,14.367,8.7136,0 +103,7,320,93,56.525,168.89,1,11.215,7.6016,0 +103,8,526,111,47.407,136.84,1,13.842,6.4663,0 +103,9,498,114,52.618,152.44,1,10.819,5.1549,0 +104,2,575,98,50.225,170.73,1,10.648,4.15,0 +104,3,194,94,43.485,154.76,1,13.013,10.703,0 +104,6,392,106,40.01,137.83,1,14.369,8.7001,0 +104,7,319,93,56.475,168.63,1,11.213,7.6132,0 +104,8,524,111,47.46,136.96,1,13.84,6.4924,0 +104,9,495,114,52.37,152.22,1,10.814,5.1889,0 +105,2,578,99,49.951,170.18,1,10.516,4.0595,0 +105,3,194,94,43.455,154.75,1,13.013,10.703,0 +105,6,392,106,40.043,137.98,1,14.369,8.7001,0 +105,7,317,93,56.425,168.37,1,11.208,7.6365,0 +105,8,523,111,47.513,137.07,1,13.661,6.4106,0 +105,9,492,114,52.122,152,1,10.81,5.2229,0 +106,2,582,99,49.594,169.65,1,10.655,4.0821,0 +106,3,194,94,43.425,154.73,1,13.013,10.703,0 +106,6,392,106,40.077,138.12,1,14.18,8.5849,0 +106,7,316,93,56.375,168.1,1,11.206,7.6481,0 +106,8,521,111,47.565,137.18,1,13.659,6.4365,0 +106,9,489,114,51.874,151.79,1,10.943,5.3455,0 +107,2,585,99,49.027,169.14,1,10.659,4.0481,0 +107,3,195,94,43.395,154.72,1,13.016,10.69,0 +107,6,392,106,40.111,138.27,1,14.18,8.5849,0 +107,7,315,93,56.325,167.84,1,11.353,7.757,0 +107,8,520,111,47.617,137.3,1,13.657,6.4494,0 +107,9,485,114,51.625,151.57,1,10.937,5.3911,0 +108,2,589,99,48.071,168.69,1,10.799,4.0707,0 +108,3,195,94,43.365,154.71,1,13.016,10.69,0 +108,6,392,106,40.145,138.4,1,14.18,8.5849,0 +108,7,313,93,56.275,167.58,1,11.349,7.7804,0 +108,8,518,111,47.67,137.41,1,13.655,6.4753,0 +108,9,482,114,51.377,151.36,1,10.932,5.4253,0 +109,2,592,99,46.586,168.31,1,10.802,4.0479,0 +109,3,196,94,43.336,154.7,1,13.019,10.677,0 +109,6,392,106,40.179,138.51,1,14.18,8.5849,0 +109,7,312,93,56.225,167.32,1,11.347,7.7922,0 +109,8,517,111,47.723,137.53,1,13.653,6.4883,0 +109,9,479,114,51.138,151.14,1,10.928,5.4595,0 +110,2,595,99,44.571,167.99,1,10.942,4.0935,0 +110,3,196,94,43.308,154.69,1,13.019,10.677,0 +110,6,392,106,40.213,138.61,1,14.18,8.5849,0 +110,7,311,93,56.175,167.06,1,11.345,7.8039,0 +110,8,515,111,47.775,137.64,1,13.65,6.5141,0 +110,9,475,114,50.92,150.93,1,11.063,5.5844,0 +111,2,598,99,42.167,167.73,1,10.944,4.0705,0 +111,3,197,94,43.28,154.68,1,13.021,10.664,0 +111,6,393,106,40.247,138.7,1,14.182,8.5716,0 +111,7,310,93,56.125,166.79,1,11.494,7.9146,0 +111,8,514,111,47.827,137.75,1,13.649,6.5271,0 +111,9,472,114,50.742,150.73,1,11.058,5.6188,0 +112,2,601,99,39.553,167.5,1,10.945,4.0591,0 +112,3,197,94,43.252,154.66,1,13.021,10.664,0 +112,6,393,106,40.28,138.78,1,14.182,8.5716,0 +112,7,308,93,56.075,166.53,1,11.489,7.9383,0 +112,8,512,111,47.88,137.87,1,13.646,6.553,0 +112,9,469,114,50.617,150.53,1,11.053,5.6532,0 +113,2,603,99,36.855,167.28,1,10.946,4.0476,0 +113,3,197,94,43.224,154.65,1,13.021,10.664,0 +113,6,394,107,40.313,138.86,1,13.998,8.4449,0 +113,7,307,93,56.025,166.27,1,11.487,7.9501,0 +113,8,511,111,47.933,137.98,1,13.645,6.5659,0 +113,9,466,114,50.545,150.35,1,11.049,5.6876,0 +114,2,606,99,34.132,167.06,1,10.948,4.0246,0 +114,3,198,94,43.195,154.64,1,13.024,10.65,0 +114,6,394,107,40.347,138.94,1,13.998,8.4449,0 +114,7,306,93,55.975,166,1,11.483,7.9738,0 +114,8,509,111,47.985,138.1,1,13.467,6.4969,0 +114,9,463,114,50.513,150.17,1,11.044,5.722,0 +115,2,609,99,31.41,166.84,1,11.089,4.0818,0 +115,3,198,94,43.165,154.63,1,13.024,10.65,0 +115,6,395,107,40.38,139.02,1,13.816,8.3202,0 +115,7,304,93,55.925,165.74,1,11.632,8.0983,0 +115,8,508,111,48.038,138.21,1,13.467,6.4969,0 +115,9,459,114,50.502,149.99,1,11.181,5.8494,0 +116,2,611,99,28.714,166.63,1,11.09,4.0702,0 +116,3,198,93,43.135,154.62,1,13.205,10.781,0 +116,6,395,107,40.413,139.09,1,13.816,8.3202,0 +116,7,303,93,55.875,165.48,1,11.63,8.1103,0 +116,8,506,111,48.09,138.32,1,13.465,6.5225,0 +116,9,456,114,50.5,149.82,1,11.176,5.884,0 +117,2,614,99,26.11,166.42,1,11.092,4.0471,0 +117,3,198,93,43.105,154.61,1,13.205,10.781,0 +117,6,396,107,40.447,139.17,1,13.818,8.3071,0 +117,7,302,93,55.825,165.22,1,11.628,8.1222,0 +117,8,505,111,48.143,138.44,1,13.463,6.5354,0 +117,9,453,114,50.5,149.65,1,11.171,5.9186,0 +118,2,616,99,23.737,166.23,1,11.092,4.0471,0 +118,3,198,93,43.075,154.59,1,13.205,10.781,0 +118,6,396,107,40.481,139.25,1,13.818,8.3071,0 +118,7,301,93,55.775,164.95,1,11.781,8.2367,0 +118,8,503,111,48.197,138.55,1,13.46,6.561,0 +118,9,450,114,50.5,149.47,1,11.166,5.9532,0 +119,2,618,99,21.792,166.07,1,11.094,4.0355,0 +119,3,198,93,43.045,154.58,1,13.205,10.781,0 +119,6,397,107,40.515,139.33,1,13.819,8.2939,0 +119,7,299,93,55.725,164.69,1,11.777,8.2608,0 +119,8,502,111,48.25,138.67,1,13.459,6.5739,0 +119,9,447,114,50.5,149.3,1,11.161,5.9878,0 +120,2,620,99,20.431,165.96,1,11.237,4.0815,0 +120,3,198,93,43.016,154.57,1,13.205,10.781,0 +120,6,397,108,40.549,139.41,1,13.639,8.1842,0 +120,7,298,93,55.675,164.43,1,11.774,8.2728,0 +120,8,500,111,48.303,138.78,1,13.456,6.5995,0 +120,9,444,114,50.5,149.12,1,11.156,6.0223,0 +121,3,198,93,42.988,154.56,1,13.205,10.781,0 +121,6,398,108,40.583,139.49,1,13.64,8.1712,0 +121,7,297,93,55.625,164.16,1,11.772,8.2848,0 +121,8,499,111,48.355,138.9,1,13.455,6.6123,0 +121,9,441,114,50.5,148.95,1,11.296,6.141,0 +122,3,198,93,42.96,154.55,1,13.205,10.781,0 +122,6,398,108,40.617,139.56,1,13.64,8.1712,0 +122,7,295,93,55.575,163.9,1,11.926,8.4134,0 +122,8,497,111,48.407,139.01,1,13.28,6.5433,0 +122,9,437,114,50.5,148.78,1,11.289,6.1874,0 +123,3,198,93,42.932,154.54,1,13.205,10.781,0 +123,6,398,108,40.65,139.64,1,13.64,8.1712,0 +123,7,294,93,55.525,163.64,1,11.924,8.4256,0 +123,8,496,111,48.46,139.12,1,13.278,6.556,0 +123,9,434,114,50.5,148.6,1,11.284,6.2222,0 +124,3,198,93,42.904,154.53,1,13.205,10.781,0 +124,6,399,108,40.683,139.72,1,13.642,8.1582,0 +124,7,293,93,55.475,163.38,1,11.921,8.4377,0 +124,8,494,111,48.513,139.24,1,13.275,6.5815,0 +124,9,431,114,50.5,148.43,1,11.279,6.257,0 +125,3,198,93,42.875,154.51,1,13.205,10.781,0 +125,6,399,108,40.717,139.8,1,13.642,8.1582,0 +125,7,292,94,55.425,163.12,1,11.761,8.345,0 +125,8,493,111,48.565,139.35,1,13.274,6.5942,0 +125,9,428,114,50.494,148.26,1,11.273,6.2918,0 +126,3,198,93,42.845,154.5,1,13.205,10.781,0 +126,6,400,108,40.751,139.88,1,13.644,8.1452,0 +126,7,290,94,55.375,162.85,1,11.914,8.4741,0 +126,8,491,111,48.617,139.47,1,13.271,6.6197,0 +126,9,425,114,50.47,148.08,1,11.268,6.3265,0 +127,3,198,93,42.815,154.49,1,13.205,10.781,0 +127,6,400,109,40.785,139.96,1,13.466,8.0373,0 +127,7,289,94,55.323,162.59,1,11.912,8.4862,0 +127,8,490,111,48.666,139.59,1,13.27,6.6324,0 +127,9,422,114,50.397,147.91,1,11.41,6.4482,0 +128,3,198,93,42.785,154.48,1,13.205,10.781,0 +128,6,401,109,40.819,140.04,1,13.292,7.9182,0 +128,7,288,94,55.262,162.34,1,11.91,8.4984,0 +128,8,488,111,48.709,139.72,1,13.267,6.6578,0 +128,9,419,114,50.234,147.74,1,11.405,6.4832,0 +129,3,198,93,42.755,154.47,1,13.205,10.781,0 +129,6,401,109,40.853,140.12,1,13.292,7.9182,0 +129,7,287,94,55.182,162.11,1,11.908,8.5105,0 +129,8,487,111,48.741,139.88,1,13.265,6.6706,0 +129,9,416,114,49.949,147.57,1,11.398,6.5298,0 +130,3,198,93,42.726,154.46,1,13.205,10.781,0 +130,6,402,109,40.887,140.19,1,13.294,7.9054,0 +130,7,285,94,55.064,161.91,1,12.063,8.6418,0 +130,8,485,111,48.758,140.08,1,13.092,6.6014,0 +130,9,414,114,49.541,147.4,1,11.394,6.5531,0 +131,3,198,93,42.698,154.44,1,13.205,10.781,0 +131,6,402,109,40.92,140.27,1,13.294,7.9054,0 +131,7,284,93,54.896,161.76,1,12.223,8.7626,0 +131,8,484,111,48.76,140.3,1,13.091,6.6141,0 +131,9,411,114,49.044,147.23,1,11.389,6.5881,0 +132,3,198,93,42.67,154.43,1,13.205,10.781,0 +132,6,403,109,40.953,140.35,1,13.296,7.8926,0 +132,7,284,93,54.678,161.67,1,12.223,8.7626,0 +132,8,483,111,48.751,140.56,1,13.089,6.6267,0 +132,9,409,114,48.498,147.06,1,11.385,6.6115,0 +133,3,198,93,42.642,154.42,1,13.205,10.781,0 +133,6,403,109,40.987,140.43,1,13.296,7.8926,0 +133,7,283,93,54.424,161.61,1,12.221,8.7749,0 +133,8,482,111,48.736,140.82,1,13.088,6.6393,0 +133,9,407,114,47.932,146.88,1,11.528,6.7359,0 +134,3,198,93,42.614,154.41,1,13.205,10.781,0 +134,6,404,110,41.02,140.51,1,13.124,7.7754,0 +134,7,282,93,54.15,161.57,1,12.219,8.7873,0 +134,8,480,111,48.719,141.1,1,12.917,6.5708,0 +134,9,404,113,47.36,146.72,1,11.674,6.862,0 +134,10,0,119,29.818,172.01,1,6.4463,8.3377,0 +135,3,198,93,42.585,154.4,1,13.205,10.781,0 +135,6,404,110,41.053,140.59,1,13.124,7.7754,0 +135,7,281,93,53.868,161.54,1,12.214,8.812,0 +135,8,479,111,48.7,141.37,1,12.915,6.5834,0 +135,9,402,113,46.788,146.54,1,11.671,6.8857,0 +135,10,0,118,32.385,173.01,1,6.4544,8.3186,0 +136,3,198,92,42.555,154.38,1,13.389,10.914,0 +136,6,405,110,41.087,140.66,1,13.126,7.7627,0 +136,7,281,93,53.585,161.51,1,12.214,8.812,0 +136,8,478,111,48.681,141.65,1,12.914,6.5959,0 +136,9,400,113,46.216,146.37,1,11.667,6.9094,0 +136,10,0,117,35.485,174.21,1,6.4585,8.3091,0 +137,3,198,92,42.525,154.37,1,13.389,10.914,0 +137,6,405,110,41.121,140.74,1,13.126,7.7627,0 +137,7,280,93,53.302,161.48,1,12.212,8.8243,0 +137,8,477,111,48.663,141.92,1,12.912,6.6084,0 +137,9,397,113,45.645,146.2,1,11.659,6.9567,0 +137,10,0,115,38.777,175.46,1,6.5707,8.3793,0 +138,3,198,92,42.495,154.36,1,13.389,10.914,0 +138,6,406,110,41.155,140.82,1,13.128,7.75,0 +138,7,279,93,53.018,161.45,1,12.21,8.8367,0 +138,8,476,111,48.645,142.19,1,12.745,6.5281,0 +138,9,395,113,45.075,146.03,1,11.656,6.9803,0 +138,10,0,114,41.906,176.59,1,6.5747,8.3697,0 +139,3,198,92,42.465,154.35,1,13.389,10.914,0 +139,6,406,110,41.189,140.9,1,13.128,7.75,0 +139,7,279,93,52.734,161.43,1,12.21,8.8367,0 +139,8,474,111,48.627,142.47,1,12.742,6.5529,0 +139,9,393,113,44.505,145.86,1,11.805,7.0972,0 +139,10,0,113,44.543,177.42,1,6.5827,8.3505,0 +140,3,198,92,42.435,154.34,1,13.389,10.914,0 +140,6,407,111,41.223,140.98,1,12.959,7.6347,0 +140,7,278,92,52.45,161.4,1,12.372,8.9598,0 +140,8,473,111,48.609,142.74,1,12.741,6.5653,0 +140,9,390,113,43.935,145.69,1,11.797,7.1449,0 +140,10,0,112,46.463,177.82,1,6.6921,8.4308,0 +141,3,197,92,42.406,154.33,1,13.386,10.928,0 +141,6,407,111,41.257,141.06,1,12.79,7.5334,0 +141,7,277,92,52.166,161.37,1,12.37,8.9723,0 +141,8,472,111,48.59,143.01,1,12.576,6.4858,0 +141,9,388,113,43.365,145.52,1,11.794,7.1687,0 +141,10,8,112,47.665,177.81,1,6.7239,8.3536,0 +142,3,197,92,42.378,154.31,1,13.386,10.928,0 +142,6,408,111,41.29,141.13,1,12.792,7.5209,0 +142,7,277,92,51.882,161.34,1,12.367,8.9848,0 +142,8,471,110,48.571,143.29,1,12.738,6.5902,0 +142,9,386,113,42.794,145.35,1,11.79,7.1925,0 +142,10,11,112,48.341,177.48,1,6.7397,8.315,0 +143,3,197,92,42.35,154.3,1,13.386,10.928,0 +143,6,408,111,41.323,141.21,1,12.792,7.5209,0 +143,7,276,92,51.598,161.31,1,12.365,8.9972,0 +143,8,469,110,48.553,143.56,1,12.735,6.615,0 +143,9,384,112,42.222,145.18,1,11.941,7.3117,0 +143,10,15,112,48.732,176.98,1,6.862,8.3662,0 +144,3,197,92,42.322,154.29,1,13.386,10.928,0 +144,6,409,111,41.357,141.29,1,12.794,7.5085,0 +144,7,275,92,51.314,161.28,1,12.363,9.0097,0 +144,8,468,110,48.535,143.84,1,12.733,6.6274,0 +144,9,381,112,41.65,145.01,1,11.934,7.3597,0 +144,10,19,112,49.01,176.41,1,6.8775,8.3273,0 +145,3,197,92,42.294,154.28,1,13.386,10.928,0 +145,6,409,111,41.39,141.37,1,12.794,7.5085,0 +145,7,275,92,51.03,161.25,1,12.363,9.0097,0 +145,8,467,110,48.517,144.11,1,12.568,6.5475,0 +145,9,379,112,41.078,144.84,1,12.087,7.4809,0 +145,10,23,112,49.255,175.83,1,7.0009,8.3788,0 +146,3,197,92,42.265,154.27,1,13.386,10.928,0 +146,6,410,111,41.423,141.45,1,12.796,7.496,0 +146,7,274,92,50.746,161.22,1,12.361,9.0221,0 +146,8,466,110,48.499,144.38,1,12.567,6.5598,0 +146,9,377,112,40.506,144.66,1,12.083,7.5051,0 +146,10,27,112,49.5,175.25,1,7.0163,8.3397,0 +147,3,197,92,42.235,154.26,1,13.386,10.928,0 +147,6,410,112,41.457,141.54,1,12.63,7.3964,0 +147,7,273,92,50.462,161.19,1,12.358,9.0346,0 +147,8,464,110,48.48,144.66,1,12.563,6.5844,0 +147,9,374,112,39.935,144.5,1,12.075,7.5536,0 +147,10,31,112,49.745,174.66,1,7.1408,8.3913,0 +148,3,197,92,42.205,154.25,1,13.386,10.928,0 +148,6,411,112,41.491,141.66,1,12.632,7.384,0 +148,7,273,92,50.178,161.16,1,12.358,9.0346,0 +148,8,463,110,48.461,144.93,1,12.562,6.5968,0 +148,9,372,112,39.371,144.32,1,12.072,7.5777,0 +148,10,35,112,49.991,174.08,1,7.156,8.352,0 +149,3,197,92,42.175,154.23,1,13.386,10.928,0 +149,6,411,112,41.525,141.82,1,12.632,7.384,0 +149,7,272,91,49.894,161.14,1,12.521,9.1727,0 +149,8,462,110,48.443,145.21,1,12.399,6.5174,0 +149,9,370,112,38.83,144.15,1,12.068,7.602,0 +149,10,39,112,50.237,173.5,1,7.2853,8.3939,0 +150,3,197,92,42.145,154.22,1,13.386,10.928,0 +150,6,411,112,41.559,142.04,1,12.468,7.2859,0 +150,7,271,91,49.61,161.11,1,12.518,9.1853,0 +150,8,461,110,48.425,145.48,1,12.398,6.5297,0 +150,9,367,112,38.343,143.98,1,12.221,7.738,0 +150,10,43,113,50.483,172.91,1,7.3003,8.3543,0 +151,3,197,92,42.115,154.21,1,13.386,10.928,0 +151,6,411,112,41.593,142.32,1,12.468,7.2859,0 +151,7,270,91,49.326,161.08,1,12.516,9.1979,0 +151,8,460,110,48.407,145.75,1,12.396,6.5419,0 +151,9,365,112,37.959,143.79,1,12.216,7.7746,0 +151,10,47,113,50.729,172.33,1,7.3152,8.3147,0 +152,3,197,92,42.086,154.2,1,13.386,10.928,0 +152,6,410,112,41.627,142.65,1,12.466,7.2982,0 +152,7,270,91,49.042,161.05,1,12.516,9.1979,0 +152,8,458,110,48.389,146.03,1,12.234,6.4756,0 +152,9,363,111,37.714,143.6,1,12.373,7.9006,0 +152,10,51,113,50.975,171.75,1,7.4418,8.3664,0 +153,3,197,92,42.058,154.19,1,13.386,10.928,0 +153,6,410,112,41.66,143,1,12.305,7.2013,0 +153,7,269,91,48.758,161.02,1,12.514,9.2104,0 +153,8,457,110,48.37,146.3,1,12.232,6.4877,0 +153,9,362,111,37.608,143.39,1,12.371,7.9129,0 +153,10,56,113,51.22,171.16,1,7.4602,8.3166,0 +154,3,197,92,42.03,154.18,1,13.386,10.928,0 +154,6,409,112,41.693,143.37,1,12.303,7.2135,0 +154,7,268,91,48.475,160.99,1,12.681,9.3383,0 +154,8,456,110,48.351,146.58,1,12.231,6.4998,0 +154,9,360,111,37.605,143.17,1,12.367,7.9375,0 +154,10,60,113,51.465,170.58,1,7.5879,8.3684,0 +155,3,197,92,42.002,154.16,1,13.386,10.928,0 +155,6,409,112,41.727,143.73,1,12.303,7.2135,0 +155,7,268,91,48.192,160.96,1,12.681,9.3383,0 +155,8,455,110,48.333,146.85,1,12.229,6.5119,0 +155,9,359,111,37.656,142.95,1,12.53,8.0532,0 +155,10,64,113,51.71,170,1,7.6024,8.3283,0 +156,3,197,92,41.974,154.15,1,13.383,10.941,0 +156,6,408,112,41.76,144.09,1,12.142,7.1299,0 +156,7,267,91,47.908,160.93,1,12.676,9.3637,0 +156,8,453,110,48.315,147.12,1,12.069,6.4462,0 +156,9,357,111,37.73,142.73,1,12.526,8.078,0 +156,10,68,113,51.955,169.41,1,7.7312,8.3803,0 +157,3,197,91,41.945,154.14,1,13.57,11.076,0 +157,6,408,112,41.793,144.46,1,12.142,7.1299,0 +157,7,266,91,47.624,160.9,1,12.674,9.3764,0 +157,8,452,110,48.297,147.4,1,12.067,6.4582,0 +157,9,356,111,37.81,142.51,1,12.524,8.0904,0 +157,10,72,113,52.201,168.83,1,7.865,8.4227,0 +158,3,197,91,41.915,154.13,1,13.57,11.076,0 +158,6,407,112,41.827,144.82,1,12.14,7.1421,0 +158,7,266,90,47.34,160.88,1,12.846,9.4936,0 +158,8,451,110,48.279,147.67,1,12.066,6.4703,0 +158,9,354,111,37.89,142.28,1,12.52,8.1152,0 +158,10,76,113,52.447,168.25,1,7.8791,8.382,0 +159,3,197,91,41.885,154.12,1,13.57,11.076,0 +159,6,407,112,41.861,145.19,1,11.982,7.0475,0 +159,7,265,90,47.056,160.85,1,12.844,9.5064,0 +159,8,450,110,48.26,147.95,1,12.064,6.4823,0 +159,9,353,111,37.97,142.06,1,12.518,8.1276,0 +159,10,80,113,52.693,167.66,1,8.0105,8.4347,0 +160,3,197,91,41.855,154.11,1,13.57,11.076,0 +160,6,406,112,41.895,145.55,1,11.981,7.0595,0 +160,7,264,90,46.772,160.82,1,12.841,9.5192,0 +160,8,448,110,48.24,148.22,1,11.906,6.4171,0 +160,9,351,111,38.05,141.84,1,12.682,8.2455,0 +160,10,84,114,52.939,167.08,1,7.9073,8.3008,0 +161,3,197,91,41.825,154.09,1,13.57,11.076,0 +161,6,406,112,41.929,145.91,1,11.981,7.0595,0 +161,7,264,90,46.488,160.79,1,12.841,9.5192,0 +161,8,447,110,48.221,148.5,1,11.904,6.4291,0 +161,9,350,111,38.13,141.62,1,12.68,8.258,0 +161,10,88,114,53.185,166.5,1,8.0384,8.3529,0 +162,3,197,91,41.795,154.08,1,13.57,11.076,0 +162,6,405,112,41.963,146.25,1,11.824,6.978,0 +162,7,263,90,46.204,160.76,1,12.839,9.532,0 +162,8,446,110,48.203,148.77,1,11.902,6.441,0 +162,9,348,111,38.21,141.4,1,12.676,8.283,0 +162,10,93,114,53.43,165.91,1,8.1743,8.3952,0 +163,3,197,91,41.766,154.07,1,13.57,11.076,0 +163,6,404,112,41.997,146.55,1,11.822,6.9899,0 +163,7,262,90,45.922,160.73,1,12.834,9.5576,0 +163,8,445,110,48.185,149.04,1,11.748,6.3646,0 +163,9,347,111,38.29,141.17,1,12.674,8.2955,0 +163,10,97,114,53.675,165.33,1,8.188,8.354,0 +164,3,196,91,41.738,154.06,1,13.567,11.09,0 +164,6,403,112,42.03,146.81,1,11.822,6.9899,0 +164,7,262,90,45.646,160.69,1,12.834,9.5576,0 +164,8,444,110,48.167,149.32,1,11.746,6.3764,0 +164,9,345,111,38.369,140.95,1,12.839,8.4282,0 +164,10,101,114,53.92,164.75,1,8.3217,8.4068,0 +165,3,196,91,41.71,154.05,1,13.567,11.09,0 +165,6,401,112,42.063,147.03,1,11.665,6.9212,0 +165,7,261,90,45.386,160.64,1,12.832,9.5704,0 +165,8,442,110,48.149,149.59,1,11.743,6.4001,0 +165,9,344,111,38.447,140.73,1,12.837,8.4408,0 +165,10,105,114,54.165,164.16,1,8.3385,8.3549,0 +166,3,196,91,41.682,154.04,1,13.567,11.09,0 +166,6,399,113,42.097,147.2,1,11.51,6.8533,0 +166,7,260,90,45.154,160.56,1,12.83,9.5832,0 +166,8,441,110,48.13,149.86,1,11.741,6.412,0 +166,9,342,110,38.525,140.51,1,13.004,8.5755,0 +166,10,109,114,54.411,163.58,1,8.4735,8.4078,0 +167,3,196,91,41.654,154.03,1,13.567,11.09,0 +167,6,397,113,42.131,147.36,1,11.506,6.8768,0 +167,7,260,90,44.962,160.44,1,12.83,9.5832,0 +167,8,440,110,48.111,150.14,1,11.588,6.3362,0 +167,9,341,110,38.603,140.28,1,13.002,8.5882,0 +167,10,113,114,54.657,163,1,8.4868,8.3661,0 +168,3,196,91,41.625,154.01,1,13.567,11.09,0 +168,6,395,113,42.165,147.52,1,11.502,6.9003,0 +168,7,260,89,44.808,160.28,1,13.004,9.703,0 +168,8,439,110,48.093,150.41,1,11.587,6.3479,0 +168,9,339,110,38.681,140.06,1,12.998,8.6136,0 +168,10,117,114,54.903,162.41,1,8.623,8.4192,0 +169,3,196,91,41.595,154,1,13.567,11.09,0 +169,6,393,113,42.199,147.67,1,11.499,6.9238,0 +169,7,260,90,44.682,160.09,1,12.83,9.5832,0 +169,8,437,110,48.075,150.69,1,11.583,6.3715,0 +169,9,338,110,38.76,139.84,1,13.17,8.7378,0 +169,10,121,115,55.149,161.83,1,8.6361,8.3771,0 +170,3,196,91,41.565,153.99,1,13.756,11.227,0 +170,6,391,113,42.233,147.82,1,11.495,6.9473,0 +170,7,260,90,44.573,159.88,1,13.004,9.703,0 +170,8,436,110,48.057,150.96,1,11.582,6.3833,0 +170,9,336,110,38.84,139.62,1,13.165,8.7634,0 +170,10,125,115,55.395,161.25,1,8.6491,8.3351,0 +171,3,196,91,41.535,153.98,1,13.756,11.227,0 +171,6,389,113,42.267,147.97,1,11.491,6.9707,0 +171,7,260,90,44.47,159.68,1,13.004,9.703,0 +171,8,435,110,48.039,151.23,1,11.431,6.3081,0 +171,9,335,110,38.92,139.4,1,13.164,8.7763,0 +171,10,130,115,55.64,160.66,1,8.7898,8.3776,0 +172,3,196,91,41.505,153.97,1,13.756,11.227,0 +172,6,387,113,42.3,148.12,1,11.338,6.9028,0 +172,7,260,90,44.37,159.46,1,13.004,9.703,0 +172,8,434,110,48.02,151.51,1,11.429,6.3197,0 +172,9,333,110,39,139.17,1,13.159,8.8019,0 +172,10,134,115,55.885,160.08,1,8.8026,8.3353,0 +173,3,196,91,41.476,153.96,1,13.756,11.227,0 +173,6,385,113,42.333,148.27,1,11.334,6.9261,0 +173,7,260,90,44.27,159.25,1,13.004,9.703,0 +173,8,433,110,48.001,151.78,1,11.428,6.3314,0 +173,9,332,110,39.08,138.95,1,13.334,8.9285,0 +173,10,138,115,56.13,159.5,1,8.9445,8.3778,0 +174,3,196,91,41.448,153.94,1,13.756,11.227,0 +174,6,383,113,42.367,148.42,1,11.33,6.9494,0 +174,7,260,90,44.17,159.04,1,13.004,9.703,0 +174,8,431,110,47.983,152.06,1,11.275,6.2802,0 +174,9,330,110,39.16,138.73,1,13.33,8.9543,0 +174,10,142,115,56.375,158.91,1,9.0846,8.4314,0 +175,3,196,91,41.42,153.93,1,13.756,11.227,0 +175,6,381,113,42.4,148.57,1,11.326,6.9727,0 +175,7,260,90,44.071,158.83,1,13.182,9.8245,0 +175,8,430,110,47.965,152.33,1,11.273,6.2918,0 +175,9,329,110,39.239,138.51,1,13.328,8.9673,0 +175,10,146,115,56.618,158.33,1,9.0971,8.3885,0 +176,3,196,91,41.394,153.92,1,13.756,11.227,0 +176,6,379,113,42.432,148.72,1,11.322,6.996,0 +176,7,260,90,43.975,158.63,1,13.179,9.8375,0 +176,8,429,110,47.948,152.59,1,11.272,6.3034,0 +176,9,327,110,39.316,138.29,1,13.323,8.9932,0 +176,10,150,115,56.854,157.78,1,9.2387,8.4423,0 +177,3,196,91,41.369,153.91,1,13.756,11.227,0 +177,6,377,113,42.461,148.85,1,11.319,7.0193,0 +177,7,260,90,43.888,158.44,1,13.179,9.8375,0 +177,8,428,110,47.932,152.83,1,11.27,6.3149,0 +177,9,326,110,39.386,138.1,1,13.321,9.0061,0 +177,10,154,115,57.068,157.27,1,9.251,8.3992,0 +178,3,196,90,41.349,153.9,1,13.948,11.366,0 +178,6,376,113,42.486,148.96,1,11.316,7.031,0 +178,7,260,90,43.817,158.29,1,13.179,9.8375,0 +178,8,427,110,47.919,153.02,1,11.123,6.2411,0 +178,9,325,110,39.443,137.94,1,13.498,9.1352,0 +178,10,157,115,57.244,156.85,1,9.3909,8.4641,0 +179,3,196,90,41.334,153.9,1,13.948,11.366,0 +179,6,375,113,42.503,149.04,1,11.167,6.9514,0 +179,7,260,90,43.767,158.19,1,13.179,9.8375,0 +179,8,426,110,47.909,153.16,1,11.121,6.2526,0 +179,9,324,110,39.483,137.83,1,13.496,9.1483,0 +179,10,159,116,57.366,156.56,1,9.2663,8.3452,0 diff --git a/examples/motmetrics_eval/data/TUD-Stadtmitte/test.txt b/examples/motmetrics_eval/data/TUD-Stadtmitte/test.txt new file mode 100644 index 0000000..3ad9559 --- /dev/null +++ b/examples/motmetrics_eval/data/TUD-Stadtmitte/test.txt @@ -0,0 +1,749 @@ +1,1,425.78,91.371,106.46,241.58,-1,-1,-1,-1 +1,3,330.85,77.998,104.84,237.9,-1,-1,-1,-1 +1,4,85.65,135.15,80.321,182.27,-1,-1,-1,-1 +1,5,167.02,73.423,106.01,240.55,-1,-1,-1,-1 +1,6,559.16,78.692,86.706,196.76,-1,-1,-1,-1 +2,1,429.87,98.817,102.38,232.33,-1,-1,-1,-1 +2,3,335.1,81,103.64,235.19,-1,-1,-1,-1 +2,4,78.12,125.34,84.666,192.13,-1,-1,-1,-1 +2,5,172.08,78.856,103.68,235.27,-1,-1,-1,-1 +2,6,558.37,79.386,86.527,196.35,-1,-1,-1,-1 +3,1,433.01,101.84,100.26,227.53,-1,-1,-1,-1 +3,3,339.22,83.447,102.7,233.05,-1,-1,-1,-1 +3,4,70.836,116.64,88.525,200.89,-1,-1,-1,-1 +3,5,177.12,83.989,101.49,230.3,-1,-1,-1,-1 +3,6,557.55,80.091,86.348,195.95,-1,-1,-1,-1 +4,1,435.58,101.99,99.444,225.66,-1,-1,-1,-1 +4,3,343.16,85.406,101.98,231.41,-1,-1,-1,-1 +4,4,63.745,109.07,91.899,208.54,-1,-1,-1,-1 +4,5,182.19,88.799,99.481,225.75,-1,-1,-1,-1 +4,6,556.7,80.759,86.169,195.54,-1,-1,-1,-1 +5,1,437.88,100.46,99.431,225.63,-1,-1,-1,-1 +5,3,346.93,86.87,101.46,230.23,-1,-1,-1,-1 +5,4,56.774,102.66,94.788,215.1,-1,-1,-1,-1 +5,5,187.36,93.314,97.674,221.65,-1,-1,-1,-1 +5,6,555.78,81.345,85.99,195.13,-1,-1,-1,-1 +6,1,440.14,98.199,99.87,226.63,-1,-1,-1,-1 +6,3,350.54,87.831,101.11,229.44,-1,-1,-1,-1 +6,4,49.907,97.427,97.192,220.56,-1,-1,-1,-1 +6,5,192.63,97.494,96.079,218.03,-1,-1,-1,-1 +6,6,554.78,81.812,85.812,194.73,-1,-1,-1,-1 +7,1,442.5,95.795,100.51,228.09,-1,-1,-1,-1 +7,3,354.04,88.268,100.91,228.99,-1,-1,-1,-1 +7,4,43.151,93.419,99.111,224.91,-1,-1,-1,-1 +7,5,198,101.21,94.697,214.89,-1,-1,-1,-1 +7,6,553.68,82.118,85.633,194.32,-1,-1,-1,-1 +8,1,445.03,93.591,101.19,229.63,-1,-1,-1,-1 +8,3,357.44,88.237,100.84,228.84,-1,-1,-1,-1 +8,4,36.564,90.66,100.55,228.16,-1,-1,-1,-1 +8,5,203.43,104.33,93.524,212.23,-1,-1,-1,-1 +8,6,552.49,82.234,85.454,193.92,-1,-1,-1,-1 +9,1,447.79,91.768,101.8,231.02,-1,-1,-1,-1 +9,3,360.74,87.834,100.89,228.93,-1,-1,-1,-1 +9,4,30.22,89.167,101.49,230.32,-1,-1,-1,-1 +9,5,208.85,106.77,92.545,210.01,-1,-1,-1,-1 +9,6,551.28,82.135,85.275,193.51,-1,-1,-1,-1 +9,11,154.14,64.542,82.792,187.87,-1,-1,-1,-1 +10,1,450.79,90.403,102.29,232.13,-1,-1,-1,-1 +10,3,363.95,87.164,101.02,229.23,-1,-1,-1,-1 +10,4,24.182,88.961,101.96,231.37,-1,-1,-1,-1 +10,5,214.14,108.44,91.746,208.2,-1,-1,-1,-1 +10,6,550.14,81.763,85.096,193.1,-1,-1,-1,-1 +10,11,157.44,76.474,76.717,174.09,-1,-1,-1,-1 +11,1,454.07,89.477,102.64,232.91,-1,-1,-1,-1 +11,3,367.04,86.337,101.22,229.68,-1,-1,-1,-1 +11,4,18.498,89.982,101.94,231.32,-1,-1,-1,-1 +11,5,219.25,109.36,91.106,206.74,-1,-1,-1,-1 +11,6,549.14,81.068,84.917,192.7,-1,-1,-1,-1 +11,11,160.12,85.622,71.876,163.1,-1,-1,-1,-1 +12,1,457.64,88.91,102.84,233.36,-1,-1,-1,-1 +12,3,369.98,85.471,101.47,230.26,-1,-1,-1,-1 +12,4,13.194,92.161,101.43,230.18,-1,-1,-1,-1 +12,5,224.06,109.63,90.605,205.61,-1,-1,-1,-1 +12,6,548.33,80.01,84.738,192.29,-1,-1,-1,-1 +12,11,162.24,92.333,68.116,154.57,-1,-1,-1,-1 +13,1,461.41,88.635,102.91,233.53,-1,-1,-1,-1 +13,3,372.77,84.724,101.76,230.91,-1,-1,-1,-1 +13,4,8.2951,95.348,100.44,227.93,-1,-1,-1,-1 +13,5,228.55,109.37,90.221,204.74,-1,-1,-1,-1 +13,6,547.75,78.569,84.559,191.89,-1,-1,-1,-1 +13,11,163.88,96.898,65.293,148.17,-1,-1,-1,-1 +14,1,465.3,88.552,102.88,233.45,-1,-1,-1,-1 +14,3,375.41,84.194,102.06,231.61,-1,-1,-1,-1 +14,4,3.8143,99.469,98.966,224.58,-1,-1,-1,-1 +14,5,232.75,108.69,89.933,204.08,-1,-1,-1,-1 +14,6,547.44,76.752,84.38,191.48,-1,-1,-1,-1 +14,11,165.12,99.619,63.274,143.58,-1,-1,-1,-1 +15,1,469.26,88.544,102.77,233.2,-1,-1,-1,-1 +15,3,377.98,83.9,102.38,232.32,-1,-1,-1,-1 +15,4,-0.2482,104.42,97.005,220.13,-1,-1,-1,-1 +15,5,236.77,107.76,89.718,203.59,-1,-1,-1,-1 +15,6,547.42,74.626,84.202,191.07,-1,-1,-1,-1 +15,11,166.02,100.8,61.936,140.55,-1,-1,-1,-1 +16,1,473.28,88.486,102.61,232.84,-1,-1,-1,-1 +16,3,380.58,83.797,102.68,233.01,-1,-1,-1,-1 +16,4,-3.9267,110.16,94.559,214.58,-1,-1,-1,-1 +16,5,240.66,106.73,89.557,203.23,-1,-1,-1,-1 +16,6,547.68,72.256,84.023,190.67,-1,-1,-1,-1 +16,11,166.61,100.84,61.167,138.8,-1,-1,-1,-1 +17,1,477.41,88.306,102.43,232.43,-1,-1,-1,-1 +17,3,383.22,83.824,102.97,233.66,-1,-1,-1,-1 +17,4,-7.2591,116.72,91.629,207.93,-1,-1,-1,-1 +17,5,244.43,105.7,89.433,202.95,-1,-1,-1,-1 +17,6,548.14,69.75,83.844,190.26,-1,-1,-1,-1 +17,11,166.93,100.07,60.863,138.11,-1,-1,-1,-1 +18,1,481.66,87.972,102.24,232,-1,-1,-1,-1 +18,3,385.96,83.926,103.22,234.24,-1,-1,-1,-1 +18,4,-10.217,124.08,88.213,200.18,-1,-1,-1,-1 +18,5,248.11,104.77,89.329,202.71,-1,-1,-1,-1 +18,6,548.71,67.217,83.665,189.86,-1,-1,-1,-1 +18,11,167.05,98.737,60.933,138.27,-1,-1,-1,-1 +19,1,485.91,87.493,102.06,231.6,-1,-1,-1,-1 +19,3,388.79,84.058,103.44,234.73,-1,-1,-1,-1 +19,4,-12.816,132.29,84.312,191.33,-1,-1,-1,-1 +19,5,251.73,103.97,89.232,202.49,-1,-1,-1,-1 +19,11,166.99,97.06,61.295,139.09,-1,-1,-1,-1 +20,1,490.02,86.905,101.91,231.26,-1,-1,-1,-1 +20,3,391.73,84.168,103.6,235.1,-1,-1,-1,-1 +20,4,-15.096,141.49,79.927,181.37,-1,-1,-1,-1 +20,5,255.33,103.34,89.128,202.26,-1,-1,-1,-1 +20,11,166.79,95.19,61.875,140.41,-1,-1,-1,-1 +21,1,493.91,86.241,101.78,230.97,-1,-1,-1,-1 +21,3,394.75,84.212,103.71,235.34,-1,-1,-1,-1 +21,4,-17.098,151.75,75.056,170.32,-1,-1,-1,-1 +21,5,258.93,102.9,89.011,201.99,-1,-1,-1,-1 +21,11,166.51,93.316,62.609,142.07,-1,-1,-1,-1 +22,1,497.58,85.544,101.69,230.75,-1,-1,-1,-1 +22,3,397.78,84.197,103.75,235.44,-1,-1,-1,-1 +22,4,-18.857,163.12,69.7,158.17,-1,-1,-1,-1 +22,5,262.49,102.71,88.872,201.68,-1,-1,-1,-1 +22,11,166.16,91.566,63.443,143.97,-1,-1,-1,-1 +23,1,501.02,84.877,101.61,230.59,-1,-1,-1,-1 +23,3,400.84,84.132,103.72,235.38,-1,-1,-1,-1 +23,4,-20.357,175.63,63.86,144.91,-1,-1,-1,-1 +23,5,266.02,102.74,88.708,201.3,-1,-1,-1,-1 +23,11,165.76,90,64.329,145.98,-1,-1,-1,-1 +24,1,504.22,84.315,101.56,230.47,-1,-1,-1,-1 +24,3,403.86,84.034,103.63,235.15,-1,-1,-1,-1 +24,4,-21.602,189.27,57.534,130.56,-1,-1,-1,-1 +24,5,269.55,102.97,88.515,200.86,-1,-1,-1,-1 +24,11,165.33,88.665,65.227,148.02,-1,-1,-1,-1 +25,1,507.13,83.943,101.52,230.37,-1,-1,-1,-1 +25,3,406.85,83.938,103.45,234.75,-1,-1,-1,-1 +25,5,273.08,103.36,88.294,200.36,-1,-1,-1,-1 +25,11,164.88,87.584,66.105,150.01,-1,-1,-1,-1 +26,1,509.79,83.796,101.48,230.27,-1,-1,-1,-1 +26,3,409.82,83.857,103.2,234.18,-1,-1,-1,-1 +26,5,276.64,103.84,88.045,199.8,-1,-1,-1,-1 +26,11,164.46,86.759,66.936,151.89,-1,-1,-1,-1 +27,1,512.25,83.831,101.42,230.15,-1,-1,-1,-1 +27,3,412.79,83.815,102.87,233.43,-1,-1,-1,-1 +27,5,280.26,104.34,87.772,199.18,-1,-1,-1,-1 +27,11,164.08,86.205,67.7,153.63,-1,-1,-1,-1 +28,1,514.63,83.961,101.35,229.98,-1,-1,-1,-1 +28,3,415.81,83.828,102.46,232.51,-1,-1,-1,-1 +28,5,283.94,104.76,87.48,198.51,-1,-1,-1,-1 +28,11,163.75,85.964,68.381,155.17,-1,-1,-1,-1 +29,1,517.06,84.126,101.24,229.73,-1,-1,-1,-1 +29,3,418.9,83.932,101.98,231.42,-1,-1,-1,-1 +29,5,287.71,105.08,87.172,197.82,-1,-1,-1,-1 +29,11,163.46,86.014,68.97,156.51,-1,-1,-1,-1 +30,1,519.62,84.297,101.09,229.4,-1,-1,-1,-1 +30,3,422.06,84.171,101.43,230.18,-1,-1,-1,-1 +30,5,291.55,105.31,86.855,197.1,-1,-1,-1,-1 +30,11,163.22,86.342,69.46,157.62,-1,-1,-1,-1 +31,1,522.35,84.456,100.89,228.95,-1,-1,-1,-1 +31,3,425.28,84.583,100.82,228.78,-1,-1,-1,-1 +31,5,295.47,105.45,86.536,196.37,-1,-1,-1,-1 +31,11,163.05,86.852,69.849,158.5,-1,-1,-1,-1 +32,1,525.22,84.6,100.65,228.39,-1,-1,-1,-1 +32,3,428.54,85.218,100.14,227.25,-1,-1,-1,-1 +32,5,299.45,105.55,86.221,195.66,-1,-1,-1,-1 +32,11,162.94,87.494,70.138,159.16,-1,-1,-1,-1 +33,1,528.15,84.733,100.34,227.7,-1,-1,-1,-1 +33,3,431.75,86.059,99.414,225.6,-1,-1,-1,-1 +33,5,303.5,105.53,85.918,194.97,-1,-1,-1,-1 +33,11,162.91,88.27,70.329,159.59,-1,-1,-1,-1 +34,1,531.06,84.878,99.982,226.89,-1,-1,-1,-1 +34,3,434.89,87.004,98.643,223.85,-1,-1,-1,-1 +34,5,307.63,105.39,85.631,194.32,-1,-1,-1,-1 +34,11,162.92,89.195,70.429,159.82,-1,-1,-1,-1 +35,1,533.87,85.094,99.57,225.95,-1,-1,-1,-1 +35,3,437.91,88.01,97.84,222.02,-1,-1,-1,-1 +35,5,311.87,105.12,85.369,193.72,-1,-1,-1,-1 +35,11,162.96,90.252,70.445,159.86,-1,-1,-1,-1 +36,1,536.54,85.473,99.107,224.9,-1,-1,-1,-1 +36,3,440.85,89.03,97.016,220.15,-1,-1,-1,-1 +36,5,316.17,104.74,85.135,193.19,-1,-1,-1,-1 +36,11,163.02,91.419,70.386,159.72,-1,-1,-1,-1 +37,1,539,86.055,98.602,223.75,-1,-1,-1,-1 +37,3,443.69,90.029,96.183,218.26,-1,-1,-1,-1 +37,5,320.51,104.18,84.934,192.74,-1,-1,-1,-1 +37,11,163.07,92.642,70.262,159.44,-1,-1,-1,-1 +38,1,541.15,86.826,98.06,222.52,-1,-1,-1,-1 +38,3,446.38,91.004,95.356,216.39,-1,-1,-1,-1 +38,5,324.86,103.46,84.769,192.36,-1,-1,-1,-1 +38,11,163.09,93.875,70.083,159.03,-1,-1,-1,-1 +39,1,542.92,87.761,97.492,221.23,-1,-1,-1,-1 +39,3,448.91,91.901,94.551,214.56,-1,-1,-1,-1 +39,5,329.24,102.69,84.644,192.08,-1,-1,-1,-1 +39,11,163.14,95.037,69.86,158.53,-1,-1,-1,-1 +40,1,544.26,88.8,96.907,219.91,-1,-1,-1,-1 +40,3,451.32,92.677,93.785,212.82,-1,-1,-1,-1 +40,5,333.66,102.01,84.559,191.89,-1,-1,-1,-1 +40,11,163.2,96.048,69.605,157.95,-1,-1,-1,-1 +41,1,545.13,89.944,96.317,218.57,-1,-1,-1,-1 +41,3,453.58,93.321,93.076,211.22,-1,-1,-1,-1 +41,5,338.11,101.44,84.514,191.78,-1,-1,-1,-1 +41,11,163.31,96.877,69.327,157.32,-1,-1,-1,-1 +42,1,545.58,91.159,95.731,217.24,-1,-1,-1,-1 +42,3,455.66,93.867,92.445,209.78,-1,-1,-1,-1 +42,5,342.57,101.02,84.507,191.77,-1,-1,-1,-1 +42,11,163.44,97.508,69.039,156.67,-1,-1,-1,-1 +43,1,545.62,92.383,95.162,215.95,-1,-1,-1,-1 +43,3,457.47,94.398,91.913,208.58,-1,-1,-1,-1 +43,5,347.01,100.71,84.537,191.84,-1,-1,-1,-1 +43,11,163.58,97.945,68.749,156.01,-1,-1,-1,-1 +44,1,545.19,93.536,94.618,214.71,-1,-1,-1,-1 +44,3,458.98,94.946,91.503,207.65,-1,-1,-1,-1 +44,5,351.46,100.47,84.598,191.98,-1,-1,-1,-1 +44,11,163.69,98.215,68.467,155.37,-1,-1,-1,-1 +45,1,544.33,94.606,94.109,213.56,-1,-1,-1,-1 +45,3,460.25,95.449,91.239,207.05,-1,-1,-1,-1 +45,5,355.89,100.22,84.687,192.18,-1,-1,-1,-1 +45,11,163.83,98.263,68.202,154.77,-1,-1,-1,-1 +46,1,542.95,95.544,93.643,212.5,-1,-1,-1,-1 +46,3,461.28,95.828,91.147,206.84,-1,-1,-1,-1 +46,5,360.33,99.957,84.798,192.43,-1,-1,-1,-1 +46,11,164,98.093,67.961,154.22,-1,-1,-1,-1 +47,1,541.11,96.292,93.227,211.56,-1,-1,-1,-1 +47,3,462.05,95.994,91.254,207.08,-1,-1,-1,-1 +47,5,364.75,99.618,84.922,192.71,-1,-1,-1,-1 +47,11,164.22,97.741,67.751,153.74,-1,-1,-1,-1 +48,1,538.87,96.774,92.865,210.74,-1,-1,-1,-1 +48,3,462.59,95.84,91.59,207.84,-1,-1,-1,-1 +48,5,369.16,99.167,85.053,193.01,-1,-1,-1,-1 +48,11,164.48,97.283,67.577,153.35,-1,-1,-1,-1 +49,1,536.24,96.94,92.559,210.04,-1,-1,-1,-1 +49,3,462.88,95.254,92.185,209.19,-1,-1,-1,-1 +49,5,373.61,98.612,85.183,193.3,-1,-1,-1,-1 +49,11,164.77,96.828,67.443,153.04,-1,-1,-1,-1 +50,1,533.3,96.808,92.312,209.48,-1,-1,-1,-1 +50,3,462.94,94.13,93.07,211.2,-1,-1,-1,-1 +50,5,378.07,98.005,85.302,193.57,-1,-1,-1,-1 +50,11,165.07,96.501,67.353,152.84,-1,-1,-1,-1 +51,1,530.14,96.432,92.121,209.05,-1,-1,-1,-1 +51,3,462.75,92.362,94.28,213.95,-1,-1,-1,-1 +51,5,382.47,97.398,85.403,193.8,-1,-1,-1,-1 +51,11,165.34,96.351,67.309,152.74,-1,-1,-1,-1 +52,1,526.94,95.899,91.984,208.74,-1,-1,-1,-1 +52,3,462.35,89.807,95.849,217.51,-1,-1,-1,-1 +52,5,386.71,96.853,85.477,193.97,-1,-1,-1,-1 +52,11,165.53,96.365,67.312,152.75,-1,-1,-1,-1 +53,1,523.89,95.285,91.895,208.54,-1,-1,-1,-1 +53,3,461.75,86.352,97.813,221.97,-1,-1,-1,-1 +53,5,390.72,96.409,85.515,194.06,-1,-1,-1,-1 +53,11,165.59,96.499,67.362,152.86,-1,-1,-1,-1 +54,1,521.19,94.597,91.848,208.43,-1,-1,-1,-1 +54,5,394.41,96.1,85.51,194.04,-1,-1,-1,-1 +54,11,165.51,96.758,67.458,153.08,-1,-1,-1,-1 +55,1,519.13,93.843,91.835,208.4,-1,-1,-1,-1 +55,5,397.72,95.895,85.456,193.92,-1,-1,-1,-1 +55,11,165.29,97.105,67.599,153.4,-1,-1,-1,-1 +56,1,517.92,93.036,91.846,208.42,-1,-1,-1,-1 +56,5,400.63,95.732,85.347,193.67,-1,-1,-1,-1 +56,11,164.99,97.407,67.782,153.81,-1,-1,-1,-1 +57,1,517.58,92.206,91.87,208.48,-1,-1,-1,-1 +57,5,403.19,95.539,85.179,193.29,-1,-1,-1,-1 +57,11,164.67,97.58,68.004,154.32,-1,-1,-1,-1 +58,1,518.06,91.393,91.896,208.54,-1,-1,-1,-1 +58,5,405.5,95.302,84.949,192.77,-1,-1,-1,-1 +58,11,164.34,97.598,68.26,154.9,-1,-1,-1,-1 +59,1,519.27,90.605,91.912,208.58,-1,-1,-1,-1 +59,5,407.68,95.068,84.657,192.11,-1,-1,-1,-1 +59,11,164,97.459,68.546,155.55,-1,-1,-1,-1 +60,1,521.08,89.857,91.908,208.57,-1,-1,-1,-1 +60,5,409.89,94.881,84.303,191.3,-1,-1,-1,-1 +60,11,163.67,97.191,68.857,156.25,-1,-1,-1,-1 +61,1,523.43,89.13,91.872,208.48,-1,-1,-1,-1 +61,5,412.25,94.747,83.891,190.37,-1,-1,-1,-1 +61,11,163.32,96.843,69.187,157,-1,-1,-1,-1 +62,1,526.18,88.444,91.793,208.3,-1,-1,-1,-1 +62,5,414.89,94.782,83.426,189.31,-1,-1,-1,-1 +62,11,162.99,96.36,69.532,157.78,-1,-1,-1,-1 +63,1,529.2,87.856,91.662,208.01,-1,-1,-1,-1 +63,5,417.88,95.002,82.915,188.16,-1,-1,-1,-1 +63,11,162.71,95.726,69.884,158.58,-1,-1,-1,-1 +64,1,532.35,87.382,91.471,207.57,-1,-1,-1,-1 +64,5,421.24,95.412,82.369,186.92,-1,-1,-1,-1 +64,11,162.49,94.932,70.239,159.39,-1,-1,-1,-1 +65,1,535.48,87.008,91.214,206.99,-1,-1,-1,-1 +65,5,424.94,96.019,81.797,185.62,-1,-1,-1,-1 +65,11,162.34,93.98,70.591,160.19,-1,-1,-1,-1 +66,1,538.6,86.726,90.886,206.25,-1,-1,-1,-1 +66,5,428.89,96.804,81.213,184.29,-1,-1,-1,-1 +66,11,162.27,92.9,70.933,160.96,-1,-1,-1,-1 +67,1,541.65,86.511,90.486,205.34,-1,-1,-1,-1 +67,2,368.38,84.482,80.264,182.14,-1,-1,-1,-1 +67,5,432.96,97.72,80.632,182.97,-1,-1,-1,-1 +67,11,162.28,91.728,71.261,161.71,-1,-1,-1,-1 +68,1,544.59,86.383,90.013,204.26,-1,-1,-1,-1 +68,2,368.26,86.399,79.339,180.04,-1,-1,-1,-1 +68,5,436.93,98.738,80.068,181.69,-1,-1,-1,-1 +68,11,162.37,90.521,71.568,162.41,-1,-1,-1,-1 +69,1,547.24,86.422,89.469,203.03,-1,-1,-1,-1 +69,2,367.96,87.645,78.712,178.62,-1,-1,-1,-1 +69,5,440.71,99.776,79.536,180.49,-1,-1,-1,-1 +69,11,162.52,89.368,71.851,163.05,-1,-1,-1,-1 +70,1,549.56,86.701,88.86,201.65,-1,-1,-1,-1 +70,2,367.51,88.465,78.276,177.63,-1,-1,-1,-1 +70,5,444.22,100.73,79.052,179.39,-1,-1,-1,-1 +70,11,162.71,88.317,72.105,163.62,-1,-1,-1,-1 +71,1,551.52,87.251,88.191,200.13,-1,-1,-1,-1 +71,2,366.96,89.072,77.954,176.9,-1,-1,-1,-1 +71,5,447.42,101.54,78.629,178.43,-1,-1,-1,-1 +71,11,162.94,87.4,72.326,164.12,-1,-1,-1,-1 +72,1,553.15,88.112,87.472,198.5,-1,-1,-1,-1 +72,2,366.33,89.625,77.693,176.3,-1,-1,-1,-1 +72,5,450.21,102.12,78.279,177.63,-1,-1,-1,-1 +72,11,163.18,86.629,72.51,164.54,-1,-1,-1,-1 +73,1,554.48,89.225,86.714,196.78,-1,-1,-1,-1 +73,2,365.67,90.213,77.456,175.77,-1,-1,-1,-1 +73,5,452.6,102.45,78.009,177.02,-1,-1,-1,-1 +73,11,163.42,85.994,72.655,164.87,-1,-1,-1,-1 +74,1,555.42,90.529,85.929,194.99,-1,-1,-1,-1 +74,2,364.99,90.845,77.225,175.24,-1,-1,-1,-1 +74,5,454.7,102.55,77.822,176.6,-1,-1,-1,-1 +74,11,163.66,85.479,72.758,165.1,-1,-1,-1,-1 +75,1,555.99,91.897,85.131,193.18,-1,-1,-1,-1 +75,2,364.29,91.477,76.99,174.71,-1,-1,-1,-1 +75,5,456.58,102.45,77.716,176.36,-1,-1,-1,-1 +75,11,163.92,85.102,72.819,165.24,-1,-1,-1,-1 +76,1,556.2,93.232,84.335,191.38,-1,-1,-1,-1 +76,2,363.56,92.056,76.75,174.16,-1,-1,-1,-1 +76,5,458.35,102.18,77.678,176.27,-1,-1,-1,-1 +76,11,164.23,84.869,72.835,165.28,-1,-1,-1,-1 +77,1,556.03,94.479,83.556,189.61,-1,-1,-1,-1 +77,2,362.78,92.546,76.51,173.62,-1,-1,-1,-1 +77,5,460.11,101.79,77.687,176.29,-1,-1,-1,-1 +77,11,164.59,84.784,72.806,165.21,-1,-1,-1,-1 +78,1,555.56,95.595,82.81,187.92,-1,-1,-1,-1 +78,2,361.94,92.918,76.279,173.09,-1,-1,-1,-1 +78,5,461.94,101.39,77.707,176.34,-1,-1,-1,-1 +78,11,165.03,84.839,72.734,165.05,-1,-1,-1,-1 +79,1,554.77,96.534,82.111,186.33,-1,-1,-1,-1 +79,2,361.04,93.17,76.066,172.61,-1,-1,-1,-1 +79,5,463.91,101.08,77.69,176.3,-1,-1,-1,-1 +79,11,165.56,85.023,72.618,164.79,-1,-1,-1,-1 +80,1,553.66,97.272,81.473,184.88,-1,-1,-1,-1 +80,2,360.1,93.266,75.881,172.19,-1,-1,-1,-1 +80,5,466.05,101.01,77.568,176.02,-1,-1,-1,-1 +80,11,166.21,85.318,72.46,164.43,-1,-1,-1,-1 +81,1,552.21,97.822,80.909,183.6,-1,-1,-1,-1 +81,2,359.09,93.141,75.733,171.85,-1,-1,-1,-1 +81,5,468.4,101.36,77.251,175.3,-1,-1,-1,-1 +81,11,166.97,85.705,72.263,163.98,-1,-1,-1,-1 +82,1,550.37,98.252,80.429,182.51,-1,-1,-1,-1 +82,2,358,92.74,75.629,171.62,-1,-1,-1,-1 +82,5,471,102.35,76.627,173.89,-1,-1,-1,-1 +82,11,167.79,86.157,72.029,163.45,-1,-1,-1,-1 +83,1,548.07,98.533,80.041,181.63,-1,-1,-1,-1 +83,2,356.8,92.038,75.573,171.49,-1,-1,-1,-1 +83,5,473.95,104.28,75.555,171.45,-1,-1,-1,-1 +83,11,168.6,86.645,71.761,162.84,-1,-1,-1,-1 +84,1,545.27,98.668,79.749,180.97,-1,-1,-1,-1 +84,2,355.48,91.035,75.569,171.48,-1,-1,-1,-1 +84,5,477.32,107.56,73.859,167.6,-1,-1,-1,-1 +84,11,169.37,87.138,71.463,162.16,-1,-1,-1,-1 +85,1,542.03,98.653,79.556,180.53,-1,-1,-1,-1 +85,2,354.04,89.839,75.614,171.59,-1,-1,-1,-1 +85,5,481.21,112.71,71.329,161.86,-1,-1,-1,-1 +85,11,170.1,87.602,71.138,161.43,-1,-1,-1,-1 +86,1,538.59,98.508,79.461,180.32,-1,-1,-1,-1 +86,2,352.5,88.594,75.706,171.79,-1,-1,-1,-1 +86,11,170.79,88.005,70.791,160.64,-1,-1,-1,-1 +87,1,535.15,98.269,79.457,180.31,-1,-1,-1,-1 +87,2,350.89,87.523,75.836,172.09,-1,-1,-1,-1 +87,11,171.45,88.318,70.427,159.81,-1,-1,-1,-1 +88,1,531.87,97.949,79.537,180.49,-1,-1,-1,-1 +88,2,349.2,86.729,75.997,172.45,-1,-1,-1,-1 +88,11,172.08,88.517,70.05,158.96,-1,-1,-1,-1 +89,1,528.95,97.532,79.686,180.83,-1,-1,-1,-1 +89,2,347.45,86.229,76.176,172.86,-1,-1,-1,-1 +89,11,172.69,88.588,69.665,158.08,-1,-1,-1,-1 +90,1,526.5,96.947,79.891,181.29,-1,-1,-1,-1 +90,2,345.63,85.995,76.36,173.28,-1,-1,-1,-1 +90,11,173.31,88.53,69.278,157.21,-1,-1,-1,-1 +91,1,524.64,96.198,80.13,181.84,-1,-1,-1,-1 +91,2,343.72,85.992,76.536,173.68,-1,-1,-1,-1 +91,11,173.93,88.365,68.892,156.33,-1,-1,-1,-1 +92,1,523.4,95.388,80.385,182.41,-1,-1,-1,-1 +92,2,341.74,86.146,76.687,174.02,-1,-1,-1,-1 +92,11,174.53,88.14,68.514,155.47,-1,-1,-1,-1 +93,1,522.81,94.614,80.63,182.97,-1,-1,-1,-1 +93,2,339.66,86.411,76.799,174.27,-1,-1,-1,-1 +93,11,175.1,87.939,68.148,154.64,-1,-1,-1,-1 +94,1,522.9,93.942,80.842,183.45,-1,-1,-1,-1 +94,2,337.44,86.741,76.855,174.4,-1,-1,-1,-1 +94,11,175.64,87.812,67.798,153.85,-1,-1,-1,-1 +95,1,523.67,93.403,80.997,183.8,-1,-1,-1,-1 +95,2,335.06,87.126,76.843,174.37,-1,-1,-1,-1 +95,11,176.14,87.79,67.469,153.1,-1,-1,-1,-1 +96,1,525.2,92.996,81.072,183.97,-1,-1,-1,-1 +96,2,332.49,87.563,76.749,174.16,-1,-1,-1,-1 +96,11,176.6,87.882,67.165,152.41,-1,-1,-1,-1 +97,1,527.53,92.736,81.046,183.91,-1,-1,-1,-1 +97,2,329.71,88.088,76.562,173.74,-1,-1,-1,-1 +97,11,177.01,88.083,66.89,151.79,-1,-1,-1,-1 +98,1,530.65,92.625,80.903,183.59,-1,-1,-1,-1 +98,2,326.71,88.751,76.273,173.08,-1,-1,-1,-1 +98,11,177.37,88.377,66.646,151.23,-1,-1,-1,-1 +99,1,534.41,92.646,80.63,182.97,-1,-1,-1,-1 +99,2,323.52,89.595,75.876,172.18,-1,-1,-1,-1 +99,11,177.66,88.75,66.437,150.76,-1,-1,-1,-1 +100,1,538.6,92.769,80.22,182.04,-1,-1,-1,-1 +100,2,320.27,90.594,75.367,171.02,-1,-1,-1,-1 +100,11,177.85,89.182,66.265,150.37,-1,-1,-1,-1 +100,12,499.13,176.65,41.191,93.471,-1,-1,-1,-1 +101,1,543.03,92.946,79.675,180.8,-1,-1,-1,-1 +101,2,317.05,91.783,74.747,169.62,-1,-1,-1,-1 +101,11,177.92,89.647,66.131,150.07,-1,-1,-1,-1 +101,12,496.56,163.59,46.581,105.7,-1,-1,-1,-1 +102,1,547.57,93.203,79.002,179.27,-1,-1,-1,-1 +102,2,314,93.148,74.018,167.96,-1,-1,-1,-1 +102,11,177.82,90.108,66.037,149.85,-1,-1,-1,-1 +102,12,494.36,152.17,51.254,116.31,-1,-1,-1,-1 +103,1,552.03,93.619,78.219,177.5,-1,-1,-1,-1 +103,2,311.24,94.679,73.187,166.08,-1,-1,-1,-1 +103,9,399.49,172.11,27.7,62.858,-1,-1,-1,-1 +103,11,177.56,90.563,65.983,149.73,-1,-1,-1,-1 +103,12,492.54,142.38,55.232,125.33,-1,-1,-1,-1 +104,1,556.39,94.202,77.35,175.52,-1,-1,-1,-1 +104,2,308.92,96.252,72.262,163.98,-1,-1,-1,-1 +104,9,397.76,168.04,30.041,68.17,-1,-1,-1,-1 +104,11,177.22,91.032,65.97,149.7,-1,-1,-1,-1 +104,12,491.13,134.13,58.548,132.86,-1,-1,-1,-1 +105,1,560.66,94.892,76.428,173.43,-1,-1,-1,-1 +105,2,307.07,97.79,71.257,161.7,-1,-1,-1,-1 +105,9,396.04,164.02,32.382,73.483,-1,-1,-1,-1 +105,11,176.87,91.521,65.996,149.76,-1,-1,-1,-1 +105,12,490.19,127.3,61.24,138.97,-1,-1,-1,-1 +106,1,564.9,95.656,75.492,171.31,-1,-1,-1,-1 +106,2,305.67,99.224,70.188,159.27,-1,-1,-1,-1 +106,9,394.37,160.03,34.723,78.796,-1,-1,-1,-1 +106,11,176.57,92.025,66.06,149.9,-1,-1,-1,-1 +106,12,489.74,121.73,63.353,143.76,-1,-1,-1,-1 +107,1,569.04,96.444,74.584,169.25,-1,-1,-1,-1 +107,2,304.64,100.53,69.073,156.74,-1,-1,-1,-1 +107,9,392.75,156.08,37.064,84.109,-1,-1,-1,-1 +107,11,176.35,92.516,66.161,150.13,-1,-1,-1,-1 +107,12,489.84,117.28,64.934,147.35,-1,-1,-1,-1 +108,1,573.11,97.191,73.749,167.35,-1,-1,-1,-1 +108,2,303.94,101.67,67.932,154.15,-1,-1,-1,-1 +108,9,391.19,152.16,39.405,89.421,-1,-1,-1,-1 +108,11,176.23,93.016,66.296,150.44,-1,-1,-1,-1 +108,12,490.45,113.82,66.037,149.85,-1,-1,-1,-1 +109,1,577.07,97.844,73.023,165.7,-1,-1,-1,-1 +109,2,303.53,102.68,66.788,151.56,-1,-1,-1,-1 +109,9,389.65,148.27,41.746,94.734,-1,-1,-1,-1 +109,11,176.26,93.517,66.462,150.82,-1,-1,-1,-1 +109,12,491.54,111.25,66.715,151.39,-1,-1,-1,-1 +110,1,580.91,98.323,72.433,164.37,-1,-1,-1,-1 +110,2,303.32,103.58,65.666,149.01,-1,-1,-1,-1 +110,9,388.14,144.4,44.088,100.05,-1,-1,-1,-1 +110,11,176.43,93.981,66.657,151.26,-1,-1,-1,-1 +110,12,493.01,109.44,67.02,152.08,-1,-1,-1,-1 +111,1,584.56,98.561,71.985,163.35,-1,-1,-1,-1 +111,2,303.24,104.48,64.59,146.57,-1,-1,-1,-1 +111,9,386.64,140.52,46.429,105.36,-1,-1,-1,-1 +111,11,176.75,94.326,66.875,151.75,-1,-1,-1,-1 +111,12,494.73,108.28,67.007,152.05,-1,-1,-1,-1 +112,1,587.99,98.571,71.654,162.6,-1,-1,-1,-1 +112,2,303.2,105.38,63.585,144.29,-1,-1,-1,-1 +112,10,425.04,113.09,66.686,151.33,-1,-1,-1,-1 +112,11,177.21,94.5,67.113,152.29,-1,-1,-1,-1 +112,12,496.52,107.63,66.729,151.42,-1,-1,-1,-1 +113,1,591.34,98.484,71.366,161.94,-1,-1,-1,-1 +113,2,303.07,106.22,62.676,142.22,-1,-1,-1,-1 +113,10,424.74,118.84,63.69,144.53,-1,-1,-1,-1 +113,11,177.79,94.476,67.366,152.87,-1,-1,-1,-1 +113,12,498.19,107.43,66.236,150.3,-1,-1,-1,-1 +114,1,594.71,98.599,70.986,161.08,-1,-1,-1,-1 +114,2,302.78,106.92,61.886,140.43,-1,-1,-1,-1 +114,10,424.09,123.02,61.395,139.32,-1,-1,-1,-1 +114,11,178.45,94.244,67.63,153.47,-1,-1,-1,-1 +114,12,499.59,107.57,65.576,148.8,-1,-1,-1,-1 +115,1,598.25,99.411,70.293,159.51,-1,-1,-1,-1 +115,2,302.32,107.41,61.237,138.96,-1,-1,-1,-1 +115,10,423.1,125.84,59.71,135.5,-1,-1,-1,-1 +115,11,179.1,93.811,67.9,154.08,-1,-1,-1,-1 +115,12,500.66,107.99,64.794,147.03,-1,-1,-1,-1 +116,1,602.17,101.71,68.955,156.47,-1,-1,-1,-1 +116,2,301.73,107.62,60.748,137.85,-1,-1,-1,-1 +116,10,421.79,127.5,58.551,132.87,-1,-1,-1,-1 +116,11,179.71,93.198,68.169,154.69,-1,-1,-1,-1 +116,12,501.32,108.63,63.933,145.08,-1,-1,-1,-1 +117,1,606.72,106.57,66.502,150.91,-1,-1,-1,-1 +117,2,301.01,107.5,60.434,137.14,-1,-1,-1,-1 +117,10,420.2,128.23,57.841,131.25,-1,-1,-1,-1 +117,11,180.24,92.437,68.434,155.29,-1,-1,-1,-1 +117,12,501.58,109.45,63.03,143.03,-1,-1,-1,-1 +118,2,300.15,107.03,60.308,136.85,-1,-1,-1,-1 +118,10,418.35,128.22,57.51,130.5,-1,-1,-1,-1 +118,11,180.65,91.572,68.688,155.87,-1,-1,-1,-1 +118,12,501.48,110.37,62.119,140.96,-1,-1,-1,-1 +119,2,299.16,106.23,60.376,137.01,-1,-1,-1,-1 +119,10,416.33,127.64,57.494,130.47,-1,-1,-1,-1 +119,11,180.96,90.605,68.928,156.41,-1,-1,-1,-1 +119,12,501.05,111.35,61.231,138.95,-1,-1,-1,-1 +120,2,298.04,105.16,60.639,137.6,-1,-1,-1,-1 +120,10,414.26,126.69,57.733,131.01,-1,-1,-1,-1 +120,11,181.19,89.548,69.147,156.91,-1,-1,-1,-1 +120,12,500.36,112.37,60.39,137.04,-1,-1,-1,-1 +121,2,296.78,103.84,61.093,138.63,-1,-1,-1,-1 +121,10,412.17,125.43,58.175,132.01,-1,-1,-1,-1 +121,11,181.33,88.438,69.342,157.35,-1,-1,-1,-1 +121,12,499.4,113.42,59.619,135.29,-1,-1,-1,-1 +122,2,295.38,102.36,61.727,140.07,-1,-1,-1,-1 +122,10,410.11,123.95,58.772,133.37,-1,-1,-1,-1 +122,11,181.42,87.276,69.508,157.73,-1,-1,-1,-1 +122,12,498.22,114.47,58.935,133.74,-1,-1,-1,-1 +123,2,293.85,100.8,62.525,141.88,-1,-1,-1,-1 +123,10,408.14,122.35,59.482,134.98,-1,-1,-1,-1 +123,11,181.46,86.091,69.641,158.03,-1,-1,-1,-1 +123,12,496.86,115.5,58.35,132.41,-1,-1,-1,-1 +124,2,292.21,99.201,63.462,144.01,-1,-1,-1,-1 +124,10,406.25,120.64,60.265,136.75,-1,-1,-1,-1 +124,11,181.48,84.942,69.739,158.25,-1,-1,-1,-1 +124,12,495.37,116.51,57.873,131.33,-1,-1,-1,-1 +125,2,290.48,97.594,64.508,146.38,-1,-1,-1,-1 +125,10,404.46,118.87,61.089,138.62,-1,-1,-1,-1 +125,11,181.47,83.928,69.798,158.39,-1,-1,-1,-1 +125,12,493.78,117.49,57.509,130.5,-1,-1,-1,-1 +126,2,288.74,95.937,65.625,148.92,-1,-1,-1,-1 +126,10,402.76,117.12,61.925,140.52,-1,-1,-1,-1 +126,11,181.45,83.112,69.816,158.43,-1,-1,-1,-1 +126,12,492.12,118.41,57.26,129.94,-1,-1,-1,-1 +127,2,287.03,94.26,66.77,151.52,-1,-1,-1,-1 +127,10,401.15,115.46,62.747,142.39,-1,-1,-1,-1 +127,11,181.41,82.541,69.792,158.37,-1,-1,-1,-1 +127,12,490.37,119.22,57.124,129.63,-1,-1,-1,-1 +128,2,285.41,92.613,67.895,154.07,-1,-1,-1,-1 +128,10,399.58,113.94,63.533,144.17,-1,-1,-1,-1 +128,11,181.37,82.232,69.726,158.22,-1,-1,-1,-1 +128,12,488.52,119.88,57.097,129.57,-1,-1,-1,-1 +129,2,283.9,91.091,68.947,156.46,-1,-1,-1,-1 +129,10,398,112.57,64.266,145.83,-1,-1,-1,-1 +129,11,181.32,82.18,69.618,157.98,-1,-1,-1,-1 +129,12,486.63,120.34,57.17,129.73,-1,-1,-1,-1 +130,2,282.53,89.795,69.87,158.55,-1,-1,-1,-1 +130,10,396.36,111.34,64.93,147.34,-1,-1,-1,-1 +130,11,181.29,82.36,69.468,157.64,-1,-1,-1,-1 +130,12,484.75,120.56,57.334,130.11,-1,-1,-1,-1 +131,2,281.32,88.852,70.606,160.22,-1,-1,-1,-1 +131,10,394.64,110.25,65.515,148.67,-1,-1,-1,-1 +131,11,181.28,82.738,69.279,157.21,-1,-1,-1,-1 +131,12,482.89,120.54,57.578,130.66,-1,-1,-1,-1 +132,2,280.28,88.385,71.1,161.34,-1,-1,-1,-1 +132,10,392.86,109.33,66.01,149.79,-1,-1,-1,-1 +132,11,181.3,83.272,69.052,156.69,-1,-1,-1,-1 +132,12,481.04,120.32,57.888,131.36,-1,-1,-1,-1 +133,2,279.39,88.524,71.299,161.79,-1,-1,-1,-1 +133,10,391.06,108.6,66.411,150.7,-1,-1,-1,-1 +133,11,181.34,83.977,68.792,156.1,-1,-1,-1,-1 +133,12,479.21,119.91,58.25,132.18,-1,-1,-1,-1 +134,2,278.67,89.373,71.155,161.47,-1,-1,-1,-1 +134,10,389.29,108.09,66.712,151.38,-1,-1,-1,-1 +134,11,181.38,84.851,68.503,155.45,-1,-1,-1,-1 +134,12,477.39,119.34,58.649,133.09,-1,-1,-1,-1 +135,2,278.08,91.019,70.631,160.28,-1,-1,-1,-1 +135,10,387.61,107.84,66.913,151.84,-1,-1,-1,-1 +135,11,181.4,85.871,68.19,154.74,-1,-1,-1,-1 +135,12,475.57,118.61,59.07,134.04,-1,-1,-1,-1 +136,2,277.62,93.498,69.705,158.18,-1,-1,-1,-1 +136,10,386.04,107.87,67.013,152.07,-1,-1,-1,-1 +136,11,181.39,86.997,67.857,153.98,-1,-1,-1,-1 +136,12,473.71,117.75,59.498,135.01,-1,-1,-1,-1 +137,2,277.29,96.798,68.371,155.15,-1,-1,-1,-1 +137,10,384.58,108.19,67.015,152.07,-1,-1,-1,-1 +137,11,181.32,88.174,67.512,153.2,-1,-1,-1,-1 +137,12,471.8,116.8,59.918,135.97,-1,-1,-1,-1 +138,2,277.08,100.88,66.648,151.24,-1,-1,-1,-1 +138,10,383.2,108.73,66.922,151.86,-1,-1,-1,-1 +138,11,181.18,89.33,67.161,152.4,-1,-1,-1,-1 +138,12,469.84,115.81,60.316,136.87,-1,-1,-1,-1 +139,2,276.99,105.68,64.585,146.56,-1,-1,-1,-1 +139,8,-27.108,101.78,79.487,180.38,-1,-1,-1,-1 +139,10,381.84,109.45,66.741,151.45,-1,-1,-1,-1 +139,11,180.96,90.379,66.811,151.61,-1,-1,-1,-1 +139,12,467.84,114.84,60.681,137.7,-1,-1,-1,-1 +140,2,276.96,111.01,62.266,141.3,-1,-1,-1,-1 +140,8,-21.33,103.29,78.943,179.14,-1,-1,-1,-1 +140,10,380.46,110.28,66.476,150.85,-1,-1,-1,-1 +140,11,180.64,91.281,66.469,150.83,-1,-1,-1,-1 +140,12,465.85,114.01,61.001,138.42,-1,-1,-1,-1 +141,2,276.88,116.59,59.82,135.74,-1,-1,-1,-1 +141,8,-15.54,104.98,78.346,177.79,-1,-1,-1,-1 +141,10,379.03,111.16,66.135,150.08,-1,-1,-1,-1 +141,11,180.21,92.007,66.142,150.09,-1,-1,-1,-1 +141,12,463.9,113.38,61.267,139.03,-1,-1,-1,-1 +142,2,276.61,122.01,57.427,130.32,-1,-1,-1,-1 +142,8,-9.727,106.83,77.703,176.33,-1,-1,-1,-1 +142,10,377.47,112.04,65.728,149.15,-1,-1,-1,-1 +142,11,179.66,92.578,65.838,149.4,-1,-1,-1,-1 +142,12,462.03,112.97,61.474,139.5,-1,-1,-1,-1 +143,2,276.01,126.71,55.329,125.55,-1,-1,-1,-1 +143,8,-3.8728,108.78,77.019,174.77,-1,-1,-1,-1 +143,10,375.75,112.82,65.263,148.1,-1,-1,-1,-1 +143,11,179.03,93.022,65.564,148.78,-1,-1,-1,-1 +143,12,460.2,112.78,61.615,139.82,-1,-1,-1,-1 +144,2,274.88,129.99,53.838,122.17,-1,-1,-1,-1 +144,8,2.0073,110.76,76.298,173.14,-1,-1,-1,-1 +144,10,373.87,113.53,64.749,146.93,-1,-1,-1,-1 +144,11,178.38,93.38,65.326,148.24,-1,-1,-1,-1 +144,12,458.41,112.75,61.689,139.99,-1,-1,-1,-1 +145,2,273.05,130.94,53.348,121.06,-1,-1,-1,-1 +145,8,7.8413,112.73,75.546,171.43,-1,-1,-1,-1 +145,10,371.79,114.2,64.198,145.68,-1,-1,-1,-1 +145,11,177.81,93.673,65.131,147.8,-1,-1,-1,-1 +145,12,456.62,112.81,61.698,140.01,-1,-1,-1,-1 +146,2,270.3,128.46,54.349,123.33,-1,-1,-1,-1 +146,8,13.564,114.74,74.768,169.67,-1,-1,-1,-1 +146,10,369.49,114.87,63.619,144.36,-1,-1,-1,-1 +146,11,177.39,93.894,64.984,147.46,-1,-1,-1,-1 +146,12,454.84,112.88,61.644,139.88,-1,-1,-1,-1 +147,2,266.38,121.22,57.437,130.34,-1,-1,-1,-1 +147,8,19.139,116.73,73.969,167.85,-1,-1,-1,-1 +147,10,366.97,115.58,63.023,143.01,-1,-1,-1,-1 +147,11,177.16,94.012,64.888,147.24,-1,-1,-1,-1 +147,12,453.06,112.96,61.534,139.63,-1,-1,-1,-1 +148,2,261.02,107.61,63.329,143.71,-1,-1,-1,-1 +148,8,24.565,118.67,73.154,166,-1,-1,-1,-1 +148,10,364.28,116.31,62.42,141.64,-1,-1,-1,-1 +148,11,177.17,93.968,64.848,147.15,-1,-1,-1,-1 +148,12,451.26,113.04,61.377,139.28,-1,-1,-1,-1 +149,2,253.83,85.685,72.88,165.38,-1,-1,-1,-1 +149,8,29.841,120.52,72.328,164.13,-1,-1,-1,-1 +149,10,361.48,117.06,61.821,140.29,-1,-1,-1,-1 +149,11,177.4,93.756,64.865,147.19,-1,-1,-1,-1 +149,12,449.43,113.18,61.184,138.84,-1,-1,-1,-1 +150,8,34.933,122.31,71.496,162.24,-1,-1,-1,-1 +150,10,358.65,117.83,61.236,138.96,-1,-1,-1,-1 +150,11,177.81,93.422,64.939,147.36,-1,-1,-1,-1 +150,12,447.6,113.49,60.969,138.35,-1,-1,-1,-1 +151,8,39.846,124.06,70.664,160.35,-1,-1,-1,-1 +151,10,355.86,118.57,60.675,137.69,-1,-1,-1,-1 +151,11,178.31,92.984,65.069,147.65,-1,-1,-1,-1 +151,12,445.75,114.05,60.748,137.85,-1,-1,-1,-1 +152,8,44.606,125.75,69.835,158.47,-1,-1,-1,-1 +152,10,353.13,119.27,60.148,136.49,-1,-1,-1,-1 +152,11,178.85,92.446,65.252,148.07,-1,-1,-1,-1 +152,12,443.89,114.87,60.539,137.38,-1,-1,-1,-1 +153,8,49.262,127.39,69.017,156.61,-1,-1,-1,-1 +153,10,350.49,119.9,59.662,135.39,-1,-1,-1,-1 +153,11,179.37,91.805,65.482,148.59,-1,-1,-1,-1 +153,12,442.05,115.92,60.36,136.97,-1,-1,-1,-1 +154,8,53.861,128.98,68.213,154.79,-1,-1,-1,-1 +154,10,347.96,120.45,59.226,134.4,-1,-1,-1,-1 +154,11,179.86,91.055,65.754,149.21,-1,-1,-1,-1 +154,12,440.22,117.05,60.231,136.68,-1,-1,-1,-1 +155,8,58.411,130.53,67.429,153.01,-1,-1,-1,-1 +155,10,345.55,120.92,58.846,133.54,-1,-1,-1,-1 +155,11,180.3,90.185,66.059,149.9,-1,-1,-1,-1 +155,12,438.44,118.1,60.172,136.54,-1,-1,-1,-1 +156,8,62.974,132.05,66.669,151.29,-1,-1,-1,-1 +156,10,343.32,121.34,58.53,132.82,-1,-1,-1,-1 +156,11,180.68,89.244,66.385,150.64,-1,-1,-1,-1 +156,12,436.7,118.94,60.201,136.61,-1,-1,-1,-1 +157,8,67.594,133.56,65.94,149.63,-1,-1,-1,-1 +157,10,341.28,121.66,58.282,132.25,-1,-1,-1,-1 +157,11,181.01,88.281,66.721,151.4,-1,-1,-1,-1 +157,12,435.02,119.48,60.336,136.91,-1,-1,-1,-1 +158,8,72.286,135.02,65.245,148.06,-1,-1,-1,-1 +158,10,339.41,121.85,58.106,131.86,-1,-1,-1,-1 +158,11,181.29,87.341,67.053,152.16,-1,-1,-1,-1 +158,12,433.4,119.69,60.59,137.49,-1,-1,-1,-1 +159,8,77.009,136.37,64.591,146.57,-1,-1,-1,-1 +159,10,337.71,121.88,58.005,131.63,-1,-1,-1,-1 +159,11,181.53,86.459,67.366,152.87,-1,-1,-1,-1 +159,12,431.78,119.54,60.976,138.37,-1,-1,-1,-1 +160,8,81.693,137.57,63.981,145.19,-1,-1,-1,-1 +160,10,336.19,121.73,57.982,131.57,-1,-1,-1,-1 +160,11,181.77,85.669,67.644,153.5,-1,-1,-1,-1 +160,12,430.1,119,61.498,139.55,-1,-1,-1,-1 +161,8,86.286,138.6,63.422,143.92,-1,-1,-1,-1 +161,10,334.81,121.36,58.035,131.69,-1,-1,-1,-1 +161,11,182.01,84.995,67.873,154.02,-1,-1,-1,-1 +161,12,428.33,118.11,62.157,141.05,-1,-1,-1,-1 +162,8,90.719,139.46,62.919,142.78,-1,-1,-1,-1 +162,10,333.55,120.7,58.164,131.99,-1,-1,-1,-1 +162,11,182.28,84.456,68.036,154.39,-1,-1,-1,-1 +162,12,426.41,116.89,62.943,142.83,-1,-1,-1,-1 +163,8,94.986,140.13,62.476,141.77,-1,-1,-1,-1 +163,10,332.38,119.73,58.368,132.45,-1,-1,-1,-1 +163,11,182.57,84.066,68.121,154.58,-1,-1,-1,-1 +163,12,424.36,115.37,63.84,144.87,-1,-1,-1,-1 +164,8,99.075,140.6,62.098,140.91,-1,-1,-1,-1 +164,10,331.27,118.48,58.64,133.07,-1,-1,-1,-1 +164,11,182.87,83.827,68.116,154.57,-1,-1,-1,-1 +164,12,422.22,113.6,64.818,147.09,-1,-1,-1,-1 +165,8,102.95,140.86,61.791,140.22,-1,-1,-1,-1 +165,10,330.18,116.99,58.977,133.83,-1,-1,-1,-1 +165,11,183.21,83.786,68.013,154.34,-1,-1,-1,-1 +165,12,420.07,111.65,65.835,149.39,-1,-1,-1,-1 +166,8,106.54,140.92,61.56,139.69,-1,-1,-1,-1 +166,10,329.11,115.36,59.37,134.72,-1,-1,-1,-1 +166,11,183.64,83.953,67.812,153.88,-1,-1,-1,-1 +166,12,417.96,109.61,66.832,151.66,-1,-1,-1,-1 +167,8,109.84,140.81,61.41,139.35,-1,-1,-1,-1 +167,10,328.04,113.68,59.811,135.73,-1,-1,-1,-1 +167,11,184.19,84.33,67.517,153.21,-1,-1,-1,-1 +167,12,415.96,107.63,67.736,153.71,-1,-1,-1,-1 +168,8,112.87,140.51,61.346,139.21,-1,-1,-1,-1 +168,10,327,112.04,60.29,136.81,-1,-1,-1,-1 +168,11,184.87,84.888,67.141,152.36,-1,-1,-1,-1 +168,12,414.11,105.99,68.451,155.33,-1,-1,-1,-1 +169,8,115.68,140.05,61.372,139.27,-1,-1,-1,-1 +169,10,326.03,110.48,60.794,137.95,-1,-1,-1,-1 +169,11,185.68,85.569,66.711,151.38,-1,-1,-1,-1 +169,12,412.46,104.97,68.859,156.26,-1,-1,-1,-1 +170,8,118.31,139.43,61.495,139.55,-1,-1,-1,-1 +170,10,325.18,109.06,61.309,139.12,-1,-1,-1,-1 +170,11,186.58,86.275,66.265,150.37,-1,-1,-1,-1 +170,12,411.06,104.91,68.816,156.16,-1,-1,-1,-1 +171,8,120.8,138.65,61.719,140.05,-1,-1,-1,-1 +171,10,324.48,107.79,61.819,140.28,-1,-1,-1,-1 +171,11,187.54,86.865,65.86,149.45,-1,-1,-1,-1 +171,12,409.97,106.23,68.152,154.65,-1,-1,-1,-1 +172,8,123.17,137.71,62.05,140.8,-1,-1,-1,-1 +172,10,323.92,106.73,62.308,141.39,-1,-1,-1,-1 +172,11,188.48,87.148,65.574,148.8,-1,-1,-1,-1 +172,12,409.31,109.41,66.664,151.28,-1,-1,-1,-1 +173,7,430.33,141.89,48.719,110.55,-1,-1,-1,-1 +173,8,125.5,136.61,62.492,141.81,-1,-1,-1,-1 +173,10,323.46,105.93,62.755,142.41,-1,-1,-1,-1 +173,11,189.37,86.928,65.506,148.65,-1,-1,-1,-1 +174,7,425.77,134.94,52.855,119.94,-1,-1,-1,-1 +174,8,127.81,135.36,63.05,143.07,-1,-1,-1,-1 +174,10,323.1,105.43,63.141,143.28,-1,-1,-1,-1 +174,11,190.17,85.936,65.788,149.29,-1,-1,-1,-1 +175,7,421.19,127.97,56.992,129.33,-1,-1,-1,-1 +175,8,130.09,133.96,63.73,144.62,-1,-1,-1,-1 +175,10,322.85,105.28,63.441,143.96,-1,-1,-1,-1 +175,11,190.8,83.813,66.582,151.09,-1,-1,-1,-1 +176,7,416.57,120.95,61.128,138.71,-1,-1,-1,-1 +176,8,132.35,132.37,64.537,146.45,-1,-1,-1,-1 +176,10,322.7,105.51,63.632,144.39,-1,-1,-1,-1 +176,11,191.2,80.103,68.09,154.51,-1,-1,-1,-1 +177,7,411.88,113.97,65.264,148.1,-1,-1,-1,-1 +177,8,134.57,130.56,65.475,148.58,-1,-1,-1,-1 +177,10,322.65,106.16,63.687,144.52,-1,-1,-1,-1 +177,11,191.25,74.239,70.561,160.12,-1,-1,-1,-1 +178,7,407.12,107.07,69.4,157.49,-1,-1,-1,-1 +178,8,136.75,128.46,66.551,151.02,-1,-1,-1,-1 +178,10,322.69,107.27,63.578,144.27,-1,-1,-1,-1 +178,11,190.75,65.546,74.291,168.58,-1,-1,-1,-1 +179,7,402.35,100.18,73.536,166.87,-1,-1,-1,-1 +179,8,138.9,126.05,67.769,153.78,-1,-1,-1,-1 +179,10,322.82,108.83,63.275,143.58,-1,-1,-1,-1 +179,11,189.49,53.203,79.64,180.72,-1,-1,-1,-1 diff --git a/examples/motmetrics_eval/data/iotest/detrac.mat b/examples/motmetrics_eval/data/iotest/detrac.mat new file mode 100644 index 0000000..fc5c2a6 Binary files /dev/null and b/examples/motmetrics_eval/data/iotest/detrac.mat differ diff --git a/examples/motmetrics_eval/data/iotest/detrac.xml b/examples/motmetrics_eval/data/iotest/detrac.xml new file mode 100644 index 0000000..f649e8f --- /dev/null +++ b/examples/motmetrics_eval/data/iotest/detrac.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/motmetrics_eval/data/iotest/motchallenge.txt b/examples/motmetrics_eval/data/iotest/motchallenge.txt new file mode 100644 index 0000000..72363e7 --- /dev/null +++ b/examples/motmetrics_eval/data/iotest/motchallenge.txt @@ -0,0 +1,5 @@ +1,1,399,182,121,229,1,-1,-1,-1 +1,2,282,201,92,184,1,-1,-1,-1 +2,2,269,202,87,182,1,-1,-1,-1 +2,3,71,151,100,284,1,-1,-1,-1 +2,4,200,206,55,137,1,-1,-1,-1 \ No newline at end of file diff --git a/examples/motmetrics_eval/data/iotest/vatic.txt b/examples/motmetrics_eval/data/iotest/vatic.txt new file mode 100644 index 0000000..1ae447f --- /dev/null +++ b/examples/motmetrics_eval/data/iotest/vatic.txt @@ -0,0 +1,4 @@ +0 412 0 842 124 0 0 0 0 "worker" +0 412 10 842 124 1 0 0 1 "pc" "attr1" "attr3" +1 412 0 842 124 1 0 0 1 "pc" "attr2" +2 412 0 842 124 2 0 0 1 "worker" "attr4" "attr1" "attr2" diff --git a/examples/motmetrics_eval/motmeterics.py b/examples/motmetrics_eval/motmeterics.py new file mode 100644 index 0000000..314e7fd --- /dev/null +++ b/examples/motmetrics_eval/motmeterics.py @@ -0,0 +1,29 @@ +import os +import motmetrics as mm + + +def compute_motchallenge(dname): + df_gt = mm.io.loadtxt(os.path.join(dname, 'gt.txt')) + df_test = mm.io.loadtxt(os.path.join(dname, 'test.txt')) + return mm.utils.compare_to_groundtruth(df_gt, df_test, 'iou', distth=0.5) + + +def metrics_motchallenge_files(data_dir='data'): + """ + Metric evaluation for sequences TUD-Campus and TUD-Stadtmitte for MOTChallenge. + """ + + dnames = ['TUD-Campus', 'TUD-Stadtmitte'] + + # accumulators for two datasets TUD-Campus and TUD-Stadtmitte. + accs = [compute_motchallenge(os.path.join(data_dir, d)) for d in dnames] + + mh = mm.metrics.create() + summary = mh.compute_many(accs, metrics=mm.metrics.motchallenge_metrics, names=dnames, generate_overall=True) + + print() + print(mm.io.render_summary(summary, namemap=mm.io.motchallenge_metric_names, formatters=mh.formatters)) + + +if __name__ == '__main__': + metrics_motchallenge_files(data_dir='data') diff --git a/examples/motmetrics_eval/readme.md b/examples/motmetrics_eval/readme.md new file mode 100644 index 0000000..2f847f9 --- /dev/null +++ b/examples/motmetrics_eval/readme.md @@ -0,0 +1,13 @@ +### MOT Challenge file format + +[[GitHub](https://github.com/adipandas/multi-object-tracker)] +[[Home](https://adipandas.github.io/multi-object-tracker/)] + +The file format should be the same as the ground truth file, which is a CSV text-file containing one object instance per line. + +``` +, , , , , , , , , +``` + +#### Reference +1. https://motchallenge.net/instructions/ diff --git a/examples/pretrained_models/caffemodel_weights/get_caffemodel.sh b/examples/pretrained_models/caffemodel_weights/get_caffemodel.sh new file mode 100755 index 0000000..b9b5517 --- /dev/null +++ b/examples/pretrained_models/caffemodel_weights/get_caffemodel.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +# MobileNet-SSD model reference https://github.com/chuanqi305/MobileNet-SSD/ + +wget --no-check-certificate "https://drive.google.com/u/0/uc?id=0B3gersZ2cHIxRm5PMWRoTkdHdHc&export=download" -O 'MobileNetSSD_deploy.caffemodel' +wget "https://raw.githubusercontent.com/chuanqi305/MobileNet-SSD/daef68a6c2f5fbb8c88404266aa28180646d17e0/MobileNetSSD_deploy.prototxt" -O "MobileNetSSD_deploy.prototxt" diff --git a/examples/pretrained_models/caffemodel_weights/ssd_mobilenet_caffe_names.json b/examples/pretrained_models/caffemodel_weights/ssd_mobilenet_caffe_names.json new file mode 100644 index 0000000..bd9f257 --- /dev/null +++ b/examples/pretrained_models/caffemodel_weights/ssd_mobilenet_caffe_names.json @@ -0,0 +1 @@ +{"0": "background", "1": "aeroplane", "2": "bicycle", "3": "bird", "4": "boat", "5": "bottle", "6": "bus", "7": "car", "8": "cat", "9": "chair", "10": "cow", "11": "diningtable", "12": "dog", "13": "horse", "14": "motorbike", "15": "person", "16": "pottedplant", "17": "sheep", "18": "sofa", "19": "train", "20": "tvmonitor"} \ No newline at end of file diff --git a/tensorflow_model_dir/get_ssd_model.sh b/examples/pretrained_models/tensorflow_weights/get_ssd_model.sh similarity index 100% rename from tensorflow_model_dir/get_ssd_model.sh rename to examples/pretrained_models/tensorflow_weights/get_ssd_model.sh diff --git a/examples/pretrained_models/tensorflow_weights/ssd_mobilenet_v2_coco_names.json b/examples/pretrained_models/tensorflow_weights/ssd_mobilenet_v2_coco_names.json new file mode 100644 index 0000000..dbb7db9 --- /dev/null +++ b/examples/pretrained_models/tensorflow_weights/ssd_mobilenet_v2_coco_names.json @@ -0,0 +1,11 @@ +{"0": "background", "1": "person", "2": "bicycle", "3": "car", "4": "motorcycle", "5": "airplane", "6": "bus", "7": "train", + "8": "truck", "9": "boat", "10": "traffic light", "11": "fire hydrant", "13": "stop sign", "14": "parking meter", "15": "bench", + "16": "bird", "17": "cat", "18": "dog", "19": "horse", "20": "sheep", "21": "cow", "22": "elephant", "23": "bear", "24": "zebra", + "25": "giraffe", "27": "backpack", "28": "umbrella", "31": "handbag", "32": "tie", "33": "suitcase", "34": "frisbee", "35": "skis", + "36": "snowboard", "37": "sports ball", "38": "kite", "39": "baseball bat", "40": "baseball glove", "41": "skateboard", "42": "surfboard", + "43": "tennis racket", "44": "bottle", "46": "wine glass", "47": "cup", "48": "fork", "49": "knife", "50": "spoon", "51": "bowl", "52": "banana", + "53": "apple", "54": "sandwich", "55": "orange", "56": "broccoli", "57": "carrot", "58": "hot dog", "59": "pizza", "60": "donut", "61": "cake", + "62": "chair", "63": "couch", "64": "potted plant", "65": "bed", "67": "dining table", "70": "toilet", "72": "tv", "73": "laptop", "74": "mouse", + "75": "remote", "76": "keyboard", "77": "cell phone", "78": "microwave", "79": "oven", "80": "toaster", "81": "sink", "82": "refrigerator", + "84": "book", "85": "clock", "86": "vase", "87": "scissors", "88": "teddy bear", "89": "hair drier", "90": "toothbrush" +} diff --git a/examples/pretrained_models/yolo_weights/coco_names.json b/examples/pretrained_models/yolo_weights/coco_names.json new file mode 100644 index 0000000..3b8b1d9 --- /dev/null +++ b/examples/pretrained_models/yolo_weights/coco_names.json @@ -0,0 +1,12 @@ +{"0": "person", "1": "bicycle", "2": "car", "3": "motorbike", "4": "aeroplane", "5": "bus", "6": "train", "7": "truck", "8": "boat", + "9": "traffic light", "10": "fire hydrant", "11": "stop sign", "12": "parking meter", "13": "bench", "14": "bird", "15": "cat", + "16": "dog", "17": "horse", "18": "sheep", "19": "cow", "20": "elephant", "21": "bear", "22": "zebra", "23": "giraffe", "24": "backpack", + "25": "umbrella", "26": "handbag", "27": "tie", "28": "suitcase", "29": "frisbee", "30": "skis", "31": "snowboard", "32": "sports ball", + "33": "kite", "34": "baseball bat", "35": "baseball glove", "36": "skateboard", "37": "surfboard", "38": "tennis racket", "39": "bottle", + "40": "wine glass", "41": "cup", "42": "fork", "43": "knife", "44": "spoon", "45": "bowl", "46": "banana", "47": "apple", "48": "sandwich", + "49": "orange", "50": "broccoli", + "51": "carrot", "52": "hot dog", "53": "pizza", "54": "donut", "55": "cake", "56": "chair", "57": "sofa", + "58": "pottedplant", "59": "bed", "60": "diningtable", "61": "toilet", "62": "tvmonitor", "63": "laptop", + "64": "mouse", "65": "remote", "66": "keyboard", "67": "cell phone", "68": "microwave", "69": "oven", "70": "toaster", + "71": "sink", "72": "refrigerator", "73": "book", "74": "clock", "75": "vase", "76": "scissors", "77": "teddy bear", "78": "hair drier", + "79": "toothbrush"} diff --git a/yolo_dir/get_yolo.sh b/examples/pretrained_models/yolo_weights/get_yolo.sh similarity index 100% rename from yolo_dir/get_yolo.sh rename to examples/pretrained_models/yolo_weights/get_yolo.sh diff --git a/examples/readme.md b/examples/readme.md new file mode 100644 index 0000000..322da39 --- /dev/null +++ b/examples/readme.md @@ -0,0 +1,13 @@ +# multi-object-tracker examples + +[[Webpage](https://adipandas.github.io/multi-object-tracker/)] +[[GitHub](https://github.com/adipandas/multi-object-tracker)] + + +This folder contains various examples. + +Note: Before using these examples, you will have to download the network models. Please refer [these instructions](../DOWNLOAD_WEIGHTS.md) for downloading. + +1. [Example jupyter-notebooks](https://github.com/adipandas/multi-object-tracker/tree/master/examples/example_notebooks) +2. [Example scripts](https://github.com/adipandas/multi-object-tracker/tree/master/examples/example_scripts) +3. [Evaluations based on py-motmetrics](https://github.com/adipandas/multi-object-tracker/tree/master/examples/motmetrics_eval) diff --git a/examples/video_data/readme.md b/examples/video_data/readme.md new file mode 100644 index 0000000..471376a --- /dev/null +++ b/examples/video_data/readme.md @@ -0,0 +1,7 @@ +## Data for examples. + +To run the provided examples you can use the videos provided from the following links. + +* cars: https://flic.kr/p/L6qyxj +* cows: https://flic.kr/p/26WeEWy +* people: https://flic.kr/p/7gWofV diff --git a/motrackers/__init__.py b/motrackers/__init__.py new file mode 100644 index 0000000..4a96d44 --- /dev/null +++ b/motrackers/__init__.py @@ -0,0 +1,12 @@ +""" +Multi-object Trackers in Python: + - GitHub link: https://github.com/adipandas/multi-object-tracker + - Author: Aditya M. Deshpande + - Blog: http://adipandas.github.io/ +""" + + +from motrackers.tracker import Tracker as CentroidTracker +from motrackers.centroid_kf_tracker import CentroidKF_Tracker +from motrackers.sort_tracker import SORT +from motrackers.iou_tracker import IOUTracker diff --git a/motrackers/centroid_kf_tracker.py b/motrackers/centroid_kf_tracker.py new file mode 100644 index 0000000..3f8217f --- /dev/null +++ b/motrackers/centroid_kf_tracker.py @@ -0,0 +1,159 @@ +from collections import OrderedDict +import numpy as np +from scipy.spatial import distance +from scipy.optimize import linear_sum_assignment +from motrackers.tracker import Tracker +from motrackers.track import KFTrackCentroid +from motrackers.utils.misc import get_centroid + + +def assign_tracks2detection_centroid_distances(bbox_tracks, bbox_detections, distance_threshold=10.): + """ + Assigns detected bounding boxes to tracked bounding boxes using IoU as a distance metric. + + Args: + bbox_tracks (numpy.ndarray): Tracked bounding boxes with shape `(n, 4)` + and each row as `(xmin, ymin, width, height)`. + bbox_detections (numpy.ndarray): detection bounding boxes with shape `(m, 4)` and + each row as `(xmin, ymin, width, height)`. + distance_threshold (float): Minimum distance between the tracked object + and new detection to consider for assignment. + + Returns: + tuple: Tuple containing the following elements: + - matches (numpy.ndarray): Array of shape `(n, 2)` where `n` is number of pairs formed after matching tracks to detections. This is an array of tuples with each element as matched pair of indices`(track_index, detection_index)`. + - unmatched_detections (numpy.ndarray): Array of shape `(m,)` where `m` is number of unmatched detections. + - unmatched_tracks (numpy.ndarray): Array of shape `(k,)` where `k` is the number of unmatched tracks. + + """ + + if (bbox_tracks.size == 0) or (bbox_detections.size == 0): + return np.empty((0, 2), dtype=int), np.arange(len(bbox_detections), dtype=int), np.empty((0,), dtype=int) + + if len(bbox_tracks.shape) == 1: + bbox_tracks = bbox_tracks[None, :] + + if len(bbox_detections.shape) == 1: + bbox_detections = bbox_detections[None, :] + + estimated_track_centroids = get_centroid(bbox_tracks) + detection_centroids = get_centroid(bbox_detections) + centroid_distances = distance.cdist(estimated_track_centroids, detection_centroids) + + assigned_tracks, assigned_detections = linear_sum_assignment(centroid_distances) + + unmatched_detections, unmatched_tracks = [], [] + + for d in range(bbox_detections.shape[0]): + if d not in assigned_detections: + unmatched_detections.append(d) + + for t in range(bbox_tracks.shape[0]): + if t not in assigned_tracks: + unmatched_tracks.append(t) + + # filter out matched with high distance between centroids + matches = [] + for t, d in zip(assigned_tracks, assigned_detections): + if centroid_distances[t, d] > distance_threshold: + unmatched_detections.append(d) + unmatched_tracks.append(t) + else: + matches.append((t, d)) + + if len(matches): + matches = np.array(matches) + else: + matches = np.empty((0, 2), dtype=int) + + return matches, np.array(unmatched_detections), np.array(unmatched_tracks) + + +class CentroidKF_Tracker(Tracker): + """ + Kalman filter based tracking of multiple detected objects. + + Args: + max_lost (int): Maximum number of consecutive frames object was not detected. + tracker_output_format (str): Output format of the tracker. + process_noise_scale (float or numpy.ndarray): Process noise covariance matrix of shape (3, 3) or + covariance magnitude as scalar value. + measurement_noise_scale (float or numpy.ndarray): Measurement noise covariance matrix of shape (1,) + or covariance magnitude as scalar value. + time_step (int or float): Time step for Kalman Filter. + """ + + def __init__( + self, + max_lost=1, + centroid_distance_threshold=30., + tracker_output_format='mot_challenge', + process_noise_scale=1.0, + measurement_noise_scale=1.0, + time_step=1 + ): + self.time_step = time_step + self.process_noise_scale = process_noise_scale + self.measurement_noise_scale = measurement_noise_scale + self.centroid_distance_threshold = centroid_distance_threshold + self.kalman_trackers = OrderedDict() + super().__init__(max_lost, tracker_output_format) + + def _add_track(self, frame_id, bbox, detection_confidence, class_id, **kwargs): + self.tracks[self.next_track_id] = KFTrackCentroid( + self.next_track_id, frame_id, bbox, detection_confidence, class_id=class_id, + data_output_format=self.tracker_output_format, process_noise_scale=self.process_noise_scale, + measurement_noise_scale=self.measurement_noise_scale, **kwargs + ) + self.next_track_id += 1 + + def update(self, bboxes, detection_scores, class_ids): + self.frame_count += 1 + bbox_detections = np.array(bboxes, dtype='int') + + track_ids = list(self.tracks.keys()) + bbox_tracks = [] + for track_id in track_ids: + bbox_tracks.append(self.tracks[track_id].predict()) + bbox_tracks = np.array(bbox_tracks) + + if len(bboxes) == 0: + for i in range(len(bbox_tracks)): + track_id = track_ids[i] + bbox = bbox_tracks[i, :] + confidence = self.tracks[track_id].detection_confidence + cid = self.tracks[track_id].class_id + self._update_track(track_id, self.frame_count, bbox, detection_confidence=confidence, class_id=cid, lost=1) + if self.tracks[track_id].lost > self.max_lost: + self._remove_track(track_id) + else: + matches, unmatched_detections, unmatched_tracks = assign_tracks2detection_centroid_distances( + bbox_tracks, bbox_detections, distance_threshold=self.centroid_distance_threshold + ) + + for i in range(matches.shape[0]): + t, d = matches[i, :] + track_id = track_ids[t] + bbox = bboxes[d, :] + cid = class_ids[d] + confidence = detection_scores[d] + self._update_track(track_id, self.frame_count, bbox, confidence, cid, lost=0) + + for d in unmatched_detections: + bbox = bboxes[d, :] + cid = class_ids[d] + confidence = detection_scores[d] + self._add_track(self.frame_count, bbox, confidence, cid) + + for t in unmatched_tracks: + track_id = track_ids[t] + bbox = bbox_tracks[t, :] + confidence = self.tracks[track_id].detection_confidence + cid = self.tracks[track_id].class_id + self._update_track(track_id, self.frame_count, bbox, confidence, cid, lost=1) + + if self.tracks[track_id].lost > self.max_lost: + self._remove_track(track_id) + + outputs = self._get_tracks(self.tracks) + return outputs diff --git a/motrackers/detectors/__init__.py b/motrackers/detectors/__init__.py new file mode 100644 index 0000000..eacd013 --- /dev/null +++ b/motrackers/detectors/__init__.py @@ -0,0 +1,3 @@ +from motrackers.detectors.tf import TF_SSDMobileNetV2 +from motrackers.detectors.caffe import Caffe_SSDMobileNet +from motrackers.detectors.yolo import YOLOv3 diff --git a/motrackers/detectors/caffe.py b/motrackers/detectors/caffe.py new file mode 100644 index 0000000..e5aedcd --- /dev/null +++ b/motrackers/detectors/caffe.py @@ -0,0 +1,42 @@ +import cv2 as cv +from motrackers.detectors.detector import Detector +from motrackers.utils.misc import load_labelsjson + + +class Caffe_SSDMobileNet(Detector): + """ + Caffe SSD MobileNet model for Object Detection. + + Args: + weights_path (str): path to network weights file. + configfile_path (str): path to network configuration file. + labels_path (str): path to data labels json file. + confidence_threshold (float): confidence threshold to select the detected object. + nms_threshold (float): Non-maximum suppression threshold. + draw_bboxes (bool): If True, assign colors for drawing bounding boxes on the image. + use_gpu (bool): If True, try to load the model on GPU. + """ + + def __init__(self, weights_path, configfile_path, labels_path, + confidence_threshold=0.5, nms_threshold=0.2, draw_bboxes=True, use_gpu=False): + + object_names = load_labelsjson(labels_path) + + self.pixel_mean = 127.5 + self.pixel_std = 1/127.5 + self.image_size = (300, 300) + + self.net = cv.dnn.readNetFromCaffe(configfile_path, weights_path) + + if use_gpu: + self.net.setPreferableBackend(cv.dnn.DNN_BACKEND_CUDA) + self.net.setPreferableTarget(cv.dnn.DNN_TARGET_CUDA) + + super().__init__(object_names, confidence_threshold, nms_threshold, draw_bboxes) + + def forward(self, image): + blob = cv.dnn.blobFromImage(image, scalefactor=self.pixel_std, size=self.image_size, + mean=(self.pixel_mean, self.pixel_mean, self.pixel_mean), swapRB=True, crop=False) + self.net.setInput(blob) + detections = self.net.forward() + return detections diff --git a/motrackers/detectors/detector.py b/motrackers/detectors/detector.py new file mode 100644 index 0000000..af7eabb --- /dev/null +++ b/motrackers/detectors/detector.py @@ -0,0 +1,103 @@ +import numpy as np +import cv2 as cv +from motrackers.utils.misc import xyxy2xywh + + +class Detector: + """ + Abstract class for detector. + + Args: + object_names (dict): Dictionary containing (key, value) as (class_id, class_name) for object detector. + confidence_threshold (float): Confidence threshold for object detection. + nms_threshold (float): Threshold for non-maximal suppression. + draw_bboxes (bool): If true, draw bounding boxes on the image is possible. + """ + + def __init__(self, object_names, confidence_threshold, nms_threshold, draw_bboxes=True): + self.object_names = object_names + self.confidence_threshold = confidence_threshold + self.nms_threshold = nms_threshold + self.height = None + self.width = None + + np.random.seed(12345) + if draw_bboxes: + self.bbox_colors = {key: np.random.randint(0, 255, size=(3,)).tolist() for key in self.object_names.keys()} + + def forward(self, image): + """ + Forward pass for the detector with input image. + + Args: + image (numpy.ndarray): Input image. + + Returns: + numpy.ndarray: detections + """ + raise NotImplemented + + def detect(self, image): + """ + Detect objects in the input image. + + Args: + image (numpy.ndarray): Input image. + + Returns: + tuple: Tuple containing the following elements: + - bboxes (numpy.ndarray): Bounding boxes with shape (n, 4) containing detected objects with each row as `(xmin, ymin, width, height)`. + - confidences (numpy.ndarray): Confidence or detection probabilities if the detected objects with shape (n,). + - class_ids (numpy.ndarray): Class_ids or label_ids of detected objects with shape (n, 4) + + """ + if self.width is None or self.height is None: + (self.height, self.width) = image.shape[:2] + + detections = self.forward(image).squeeze(axis=0).squeeze(axis=0) + + bboxes, confidences, class_ids = [], [], [] + + for i in range(detections.shape[0]): + detection = detections[i, :] + class_id = detection[1] + confidence = detection[2] + + if confidence > self.confidence_threshold: + bbox = detection[3:7] * np.array([self.width, self.height, self.width, self.height]) + bboxes.append(bbox.astype("int")) + confidences.append(float(confidence)) + class_ids.append(int(class_id)) + + if len(bboxes): + bboxes = xyxy2xywh(np.array(bboxes)).tolist() + class_ids = np.array(class_ids).astype('int') + indices = cv.dnn.NMSBoxes(bboxes, confidences, self.confidence_threshold, self.nms_threshold).flatten() + return np.array(bboxes)[indices, :], np.array(confidences)[indices], class_ids[indices] + else: + return np.array([]), np.array([]), np.array([]) + + def draw_bboxes(self, image, bboxes, confidences, class_ids): + """ + Draw the bounding boxes about detected objects in the image. + + Args: + image (numpy.ndarray): Image or video frame. + bboxes (numpy.ndarray): Bounding boxes pixel coordinates as (xmin, ymin, width, height) + confidences (numpy.ndarray): Detection confidence or detection probability. + class_ids (numpy.ndarray): Array containing class ids (aka label ids) of each detected object. + + Returns: + numpy.ndarray: image with the bounding boxes drawn on it. + """ + + for bb, conf, cid in zip(bboxes, confidences, class_ids): + clr = [int(c) for c in self.bbox_colors[cid]] + cv.rectangle(image, (bb[0], bb[1]), (bb[0] + bb[2], bb[1] + bb[3]), clr, 2) + label = "{}:{:.4f}".format(self.object_names[cid], conf) + (label_width, label_height), baseLine = cv.getTextSize(label, cv.FONT_HERSHEY_SIMPLEX, 0.5, 2) + y_label = max(bb[1], label_height) + cv.rectangle(image, (bb[0], y_label - label_height), (bb[0] + label_width, y_label + baseLine), + (255, 255, 255), cv.FILLED) + cv.putText(image, label, (bb[0], y_label), cv.FONT_HERSHEY_SIMPLEX, 0.5, clr, 2) + return image diff --git a/motrackers/detectors/tf.py b/motrackers/detectors/tf.py new file mode 100644 index 0000000..54d1eec --- /dev/null +++ b/motrackers/detectors/tf.py @@ -0,0 +1,36 @@ +import cv2 as cv +from motrackers.detectors.detector import Detector +from motrackers.utils.misc import load_labelsjson + + +class TF_SSDMobileNetV2(Detector): + """ + Tensorflow SSD MobileNetv2 model for Object Detection. + + Args: + weights_path (str): path to network weights file. + configfile_path (str): path to network configuration file. + labels_path (str): path to data labels json file. + confidence_threshold (float): confidence threshold to select the detected object. + nms_threshold (float): Non-maximum suppression threshold. + draw_bboxes (bool): If True, assign colors for drawing bounding boxes on the image. + use_gpu (bool): If True, try to load the model on GPU. + """ + + def __init__(self, weights_path, configfile_path, labels_path, confidence_threshold=0.5, nms_threshold=0.4, draw_bboxes=True, use_gpu=False): + self.image_size = (300, 300) + self.net = cv.dnn.readNetFromTensorflow(weights_path, configfile_path) + + if use_gpu: + self.net.setPreferableBackend(cv.dnn.DNN_BACKEND_CUDA) + self.net.setPreferableTarget(cv.dnn.DNN_TARGET_CUDA) + + object_names = load_labelsjson(labels_path) + + super().__init__(object_names, confidence_threshold, nms_threshold, draw_bboxes) + + def forward(self, image): + blob = cv.dnn.blobFromImage(image, size=self.image_size, swapRB=True, crop=False) + self.net.setInput(blob) + detections = self.net.forward() + return detections diff --git a/motrackers/detectors/yolo.py b/motrackers/detectors/yolo.py new file mode 100644 index 0000000..ee169ec --- /dev/null +++ b/motrackers/detectors/yolo.py @@ -0,0 +1,70 @@ +import numpy as np +import cv2 as cv +from motrackers.detectors.detector import Detector +from motrackers.utils.misc import load_labelsjson + + +class YOLOv3(Detector): + """ + YOLOv3 Object Detector Module. + + Args: + weights_path (str): path to network weights file. + configfile_path (str): path to network configuration file. + labels_path (str): path to data labels json file. + confidence_threshold (float): confidence threshold to select the detected object. + nms_threshold (float): Non-maximum suppression threshold. + draw_bboxes (bool): If True, assign colors for drawing bounding boxes on the image. + use_gpu (bool): If True, try to load the model on GPU. + """ + + def __init__(self, weights_path, configfile_path, labels_path, confidence_threshold=0.5, nms_threshold=0.2, draw_bboxes=True, use_gpu=False): + self.net = cv.dnn.readNetFromDarknet(configfile_path, weights_path) + object_names = load_labelsjson(labels_path) + + layer_names = self.net.getLayerNames() + if cv.__version__ >= '4.6.0': + self.layer_names = [layer_names[i - 1] for i in self.net.getUnconnectedOutLayers()] + else: + self.layer_names = [layer_names[i[0] - 1] for i in self.net.getUnconnectedOutLayers()] + + self.scale_factor = 1/255.0 + self.image_size = (416, 416) + + self.net = cv.dnn.readNetFromDarknet(configfile_path, weights_path) + if use_gpu: + self.net.setPreferableBackend(cv.dnn.DNN_BACKEND_CUDA) + self.net.setPreferableTarget(cv.dnn.DNN_TARGET_CUDA) + + super().__init__(object_names, confidence_threshold, nms_threshold, draw_bboxes) + + def forward(self, image): + blob = cv.dnn.blobFromImage(image, self.scale_factor, self.image_size, swapRB=True, crop=False) + self.net.setInput(blob) + detections = self.net.forward(self.layer_names) # detect objects using object detection model + return detections + + def detect(self, image): + if self.width is None or self.height is None: + (self.height, self.width) = image.shape[:2] + + detections = self.forward(image) + + bboxes, confidences, class_ids = [], [], [] + + for output in detections: + for detect in output: + scores = detect[5:] + class_id = np.argmax(scores) + confidence = scores[class_id] + if confidence > self.confidence_threshold: + xmid, ymid, w, h = detect[0:4] * np.array([self.width, self.height, self.width, self.height]) + x, y = int(xmid - 0.5*w), int(ymid - 0.5*h) + bboxes.append([x, y, w, h]) + confidences.append(float(confidence)) + class_ids.append(class_id) + + indices = cv.dnn.NMSBoxes(bboxes, confidences, self.confidence_threshold, self.nms_threshold).flatten() + class_ids = np.array(class_ids).astype('int') + output = np.array(bboxes)[indices, :].astype('int'), np.array(confidences)[indices], class_ids[indices] + return output diff --git a/motrackers/iou_tracker.py b/motrackers/iou_tracker.py new file mode 100644 index 0000000..c03ac91 --- /dev/null +++ b/motrackers/iou_tracker.py @@ -0,0 +1,61 @@ +from motrackers.utils.misc import iou_xywh as iou +from motrackers.tracker import Tracker + + +class IOUTracker(Tracker): + """ + Intersection over Union Tracker. + + References + ---------- + * Implementation of this algorithm is heavily based on https://github.com/bochinski/iou-tracker + + Args: + max_lost (int): Maximum number of consecutive frames object was not detected. + tracker_output_format (str): Output format of the tracker. + min_detection_confidence (float): Threshold for minimum detection confidence. + max_detection_confidence (float): Threshold for max. detection confidence. + iou_threshold (float): Intersection over union minimum value. + """ + + def __init__( + self, + max_lost=2, + iou_threshold=0.5, + min_detection_confidence=0.4, + max_detection_confidence=0.7, + tracker_output_format='mot_challenge' + ): + self.iou_threshold = iou_threshold + self.max_detection_confidence = max_detection_confidence + self.min_detection_confidence = min_detection_confidence + + super(IOUTracker, self).__init__(max_lost=max_lost, tracker_output_format=tracker_output_format) + + def update(self, bboxes, detection_scores, class_ids): + detections = Tracker.preprocess_input(bboxes, class_ids, detection_scores) + self.frame_count += 1 + track_ids = list(self.tracks.keys()) + + updated_tracks = [] + for track_id in track_ids: + if len(detections) > 0: + idx, best_match = max(enumerate(detections), key=lambda x: iou(self.tracks[track_id].bbox, x[1][0])) + (bb, cid, scr) = best_match + + if iou(self.tracks[track_id].bbox, bb) > self.iou_threshold: + self._update_track(track_id, self.frame_count, bb, scr, class_id=cid, + iou_score=iou(self.tracks[track_id].bbox, bb)) + updated_tracks.append(track_id) + del detections[idx] + + if len(updated_tracks) == 0 or track_id is not updated_tracks[-1]: + self.tracks[track_id].lost += 1 + if self.tracks[track_id].lost > self.max_lost: + self._remove_track(track_id) + + for bb, cid, scr in detections: + self._add_track(self.frame_count, bb, scr, class_id=cid) + + outputs = self._get_tracks(self.tracks) + return outputs diff --git a/motrackers/kalman_tracker.py b/motrackers/kalman_tracker.py new file mode 100644 index 0000000..56ec8db --- /dev/null +++ b/motrackers/kalman_tracker.py @@ -0,0 +1,331 @@ +import numpy as np + + +class KalmanFilter: + """ + Kalman Filter Implementation. + + Args: + transition_matrix (numpy.ndarray): Transition matrix of shape ``(n, n)``. + measurement_matrix (numpy.ndarray): Measurement matrix of shape ``(m, n)``. + control_matrix (numpy.ndarray): Control matrix of shape ``(m, n)``. + process_noise_covariance (numpy.ndarray): Covariance matrix of shape ``(n, n)``. + measurement_noise_covariance (numpy.ndarray): Covariance matrix of shape ``(m, m)``. + prediction_covariance (numpy.ndarray): Predicted (a priori) estimate covariance of shape ``(n, n)``. + initial_state (numpy.ndarray): Initial state of shape ``(n,)``. + + """ + + def __init__( + self, + transition_matrix, + measurement_matrix, + control_matrix=None, + process_noise_covariance=None, + measurement_noise_covariance=None, + prediction_covariance=None, + initial_state=None + ): + self.state_size = transition_matrix.shape[1] + self.observation_size = measurement_matrix.shape[1] + + self.transition_matrix = transition_matrix + self.measurement_matrix = measurement_matrix + + self.control_matrix = 0 if control_matrix is None else control_matrix + + self.process_covariance = np.eye(self.state_size) \ + if process_noise_covariance is None else process_noise_covariance + + self.measurement_covariance = np.eye(self.observation_size) \ + if measurement_noise_covariance is None else measurement_noise_covariance + + self.prediction_covariance = np.eye(self.state_size) if prediction_covariance is None else prediction_covariance + + self.x = np.zeros((self.state_size, 1)) if initial_state is None else initial_state + + def predict(self, u=0): + """ + Prediction step of Kalman Filter. + + Args: + u (float or int or numpy.ndarray): Control input. Default is `0`. + + Returns: + numpy.ndarray : State vector of shape `(n,)`. + + """ + self.x = np.dot(self.transition_matrix, self.x) + np.dot(self.control_matrix, u) + + self.prediction_covariance = np.dot( + np.dot(self.transition_matrix, self.prediction_covariance), self.transition_matrix.T + ) + self.process_covariance + + return self.x + + def update(self, z): + """ + Measurement update of Kalman Filter. + + Args: + z (numpy.ndarray): Measurement vector of the system with shape ``(m,)``. + """ + y = z - np.dot(self.measurement_matrix, self.x) + + innovation_covariance = np.dot( + self.measurement_matrix, np.dot(self.prediction_covariance, self.measurement_matrix.T) + ) + self.measurement_covariance + + optimal_kalman_gain = np.dot( + np.dot(self.prediction_covariance, self.measurement_matrix.T), + np.linalg.inv(innovation_covariance) + ) + + self.x = self.x + np.dot(optimal_kalman_gain, y) + eye = np.eye(self.state_size) + _t1 = eye - np.dot(optimal_kalman_gain, self.measurement_matrix) + t1 = np.dot(np.dot(_t1, self.prediction_covariance), _t1.T) + t2 = np.dot(np.dot(optimal_kalman_gain, self.measurement_covariance), optimal_kalman_gain.T) + self.prediction_covariance = t1 + t2 + + +def get_process_covariance_matrix(dt): + """ + Generates a process noise covariance matrix for constant acceleration motion. + + Args: + dt (float): Timestep. + + Returns: + numpy.ndarray: Process covariance matrix of shape `(3, 3)`. + """ + # a = np.array([ + # [0.25 * dt ** 4, 0.5 * dt ** 3, 0.5 * dt ** 2], + # [0.5 * dt ** 3, dt ** 2, dt], + # [0.5 * dt ** 2, dt, 1] + # ]) + + a = np.array([ + [dt ** 6 / 36., dt ** 5 / 24., dt ** 4 / 6.], + [dt ** 5 / 24., 0.25 * dt ** 4, 0.5 * dt ** 3], + [dt ** 4 / 6., 0.5 * dt ** 3, dt ** 2] + ]) + return a + + +def get_transition_matrix(dt): + """ + Generate the transition matrix for constant acceleration motion. + + Args: + dt (float): Timestep. + + Returns: + numpy.ndarray: Transition matrix of shape ``(3, 3)``. + + """ + return np.array([[1., dt, dt * dt * 0.5], [0., 1., dt], [0., 0., 1.]]) + + +class KFTrackerConstantAcceleration(KalmanFilter): + """ + Kalman Filter with constant acceleration kinematic model. + + Args: + initial_measurement (numpy.ndarray): Initial state of the tracker. + time_step (float) : Time step. + process_noise_scale (float): Process noise covariance scale. + or covariance magnitude as scalar value. + measurement_noise_scale (float): Measurement noise covariance scale. + or covariance magnitude as scalar value. + """ + + def __init__(self, initial_measurement, time_step=1, process_noise_scale=1.0, + measurement_noise_scale=1.0): + self.time_step = time_step + + measurement_size = initial_measurement.shape[0] + transition_matrix = np.zeros((3 * measurement_size, 3 * measurement_size)) + measurement_matrix = np.zeros((measurement_size, 3 * measurement_size)) + process_noise_covariance = np.zeros((3 * measurement_size, 3 * measurement_size)) + measurement_noise_covariance = np.eye(measurement_size) + initial_state = np.zeros((3 * measurement_size,)) + + a = get_transition_matrix(self.time_step) + q = get_process_covariance_matrix(self.time_step) + for i in range(measurement_size): + transition_matrix[3 * i:3 * i + 3, 3 * i:3 * i + 3] = a + measurement_matrix[i, 3 * i] = 1. + process_noise_covariance[3 * i:3 * i + 3, 3 * i:3 * i + 3] = process_noise_scale * q + measurement_noise_covariance[i, i] = measurement_noise_scale + initial_state[i * 3] = initial_measurement[i] + + prediction_noise_covariance = np.ones((3*measurement_size, 3*measurement_size)) + + super().__init__(transition_matrix=transition_matrix, measurement_matrix=measurement_matrix, + process_noise_covariance=process_noise_covariance, + measurement_noise_covariance=measurement_noise_covariance, + prediction_covariance=prediction_noise_covariance, initial_state=initial_state) + + +class KFTracker1D(KFTrackerConstantAcceleration): + def __init__(self, initial_measurement=np.array([0.]), time_step=1, process_noise_scale=1.0, + measurement_noise_scale=1.0): + assert initial_measurement.shape[0] == 1, initial_measurement.shape + + super().__init__( + initial_measurement=initial_measurement, time_step=time_step, process_noise_scale=process_noise_scale, + measurement_noise_scale=measurement_noise_scale + ) + + +class KFTracker2D(KFTrackerConstantAcceleration): + def __init__(self, initial_measurement=np.array([0., 0.]), time_step=1, process_noise_scale=1.0, + measurement_noise_scale=1.0): + assert initial_measurement.shape[0] == 2, initial_measurement.shape + super().__init__( + initial_measurement=initial_measurement, time_step=time_step, process_noise_scale=process_noise_scale, + measurement_noise_scale=measurement_noise_scale + ) + + +class KFTracker4D(KFTrackerConstantAcceleration): + def __init__(self, initial_measurement=np.array([0., 0., 0., 0.]), time_step=1, process_noise_scale=1.0, + measurement_noise_scale=1.0): + assert initial_measurement.shape[0] == 4, initial_measurement.shape + super().__init__( + initial_measurement=initial_measurement, time_step=time_step, process_noise_scale=process_noise_scale, + measurement_noise_scale=measurement_noise_scale + ) + + +class KFTrackerSORT(KalmanFilter): + """ + Kalman filter for ``SORT``. + + Args: + bbox (numpy.ndarray): Bounding box coordinates as ``(xmid, ymid, area, aspect_ratio)``. + time_step (float or int): Time step. + process_noise_scale (float): Scale (a.k.a covariance) of the process noise. + measurement_noise_scale (float): Scale (a.k.a. covariance) of the measurement noise. + """ + def __init__(self, bbox, process_noise_scale=1.0, measurement_noise_scale=1.0, time_step=1): + assert bbox.shape[0] == 4, bbox.shape + + t = time_step + + transition_matrix = np.array([ + [1., 0, 0, 0, t, 0, 0], + [0, 1, 0, 0, 0, t, 0], + [0, 0, 1, 0, 0, 0, t], + [0, 0, 0, 1, 0, 0, 0], + [0, 0, 0, 0, 1, 0, 0], + [0, 0, 0, 0, 0, 1, 0], + [0, 0, 0, 0, 0, 0, 1]]) + + measurement_matrix = np.array([ + [1., 0, 0, 0, 0, 0, 0], + [0, 1, 0, 0, 0, 0, 0], + [0, 0, 1, 0, 0, 0, 0], + [0, 0, 0, 1, 0, 0, 0]]) + + process_noise_covariance = np.array([ + [1, 0, 0, 0, 1, 0, 0], + [0, 1, 0, 0, 0, 1, 0], + [0, 0, 1, 0, 0, 0, 1], + [0, 0, 0, 1, 0, 0, 0], + [1, 0, 0, 0, 1, 0, 0], + [0, 1, 0, 0, 0, 1, 0], + [0, 0, 1, 0, 0, 0, 1]]) * process_noise_scale + + process_noise_covariance[-1, -1] *= 0.01 + process_noise_covariance[4:, 4:] *= 0.01 + + measurement_noise_covariance = np.eye(4) * measurement_noise_scale + measurement_noise_covariance[2:, 2:] *= 0.01 + + prediction_covariance = np.ones_like(transition_matrix) * 10. + prediction_covariance[4:, 4:] *= 100. + + initial_state = np.array([bbox[0], bbox[1], bbox[2], bbox[3], 0., 0., 0.]) + + super().__init__(transition_matrix, measurement_matrix, process_noise_covariance=process_noise_covariance, + measurement_noise_covariance=measurement_noise_covariance, + prediction_covariance=prediction_covariance, initial_state=initial_state) + + +def test_KFTracker1D(): + import matplotlib.pyplot as plt + + def create_data(t=1000, prediction_noise=1, measurement_noise=1, non_linear_input=True, velocity_scale=1 / 200.): + x = np.zeros((t,)) + if non_linear_input: + vel = np.array([np.sin(i * np.pi * velocity_scale) for i in range(t)]) + else: + vel = np.array([0.001 * i for i in range(t)]) + vel_noise = vel + np.random.randn(t) * prediction_noise + x_noise = np.zeros((t,)) + x_measure_noise = np.random.randn(t) * measurement_noise + x_noise[0] = 0. + x_measure_noise[0] += x_noise[0] + + for i in range(t): + x[i] = x[i - 1] + vel[i - 1] + x_noise[i] = x[i - 1] + vel_noise[i - 1] + x_measure_noise[i] += x_noise[i] + + return x, vel, x_noise, vel_noise, x_measure_noise + + t = 1000 + x, vel, x_noise, vel_noise, x_measure_noise = create_data(t=t) + + kf = KFTracker1D( + initial_measurement=np.array([x_measure_noise[0]]), process_noise_scale=1, measurement_noise_scale=1) + + x_prediction = [np.array([x_measure_noise[0], 0, 0])] + for i in range(1, t): + x_prediction.append(kf.predict()) + kf.update(x_measure_noise[i]) + + x_prediction = np.array(x_prediction) + + time = np.arange(t) + a = [time, x, '-', time, x_measure_noise, '--', time, x_prediction[:, 0], '-.'] + plt.plot(*a) + plt.legend(['true', 'noise', 'kf']) + plt.xlim([0, t]) + plt.grid(True) + plt.show() + + +def test_KFTracker2D(): + kf = KFTracker2D(time_step=1) + print('measurement matrix:') + print(kf.measurement_matrix) + print() + print('process cov:') + print(kf.process_covariance) + print() + print('transition matrix:') + print(kf.transition_matrix) + print() + print('measurement cov:') + print(kf.measurement_covariance) + print() + print('state:') + print(kf.x) + print() + print('predicted measurement:') + print(np.dot(kf.measurement_matrix, kf.x)) + print() + print('prediction:') + print(kf.predict()) + print() + kf.update(np.array([1.5, 1.5])) + print('prediction2:') + print(kf.predict()) + + +if __name__ == '__main__': + test_KFTracker1D() + test_KFTracker2D() diff --git a/motrackers/sort_tracker.py b/motrackers/sort_tracker.py new file mode 100644 index 0000000..0a3519d --- /dev/null +++ b/motrackers/sort_tracker.py @@ -0,0 +1,169 @@ +import numpy as np +from scipy.optimize import linear_sum_assignment +from motrackers.utils.misc import iou_xywh as iou +from motrackers.track import KFTrackSORT, KFTrack4DSORT +from motrackers.centroid_kf_tracker import CentroidKF_Tracker + + +def assign_tracks2detection_iou(bbox_tracks, bbox_detections, iou_threshold=0.3): + """ + Assigns detected bounding boxes to tracked bounding boxes using IoU as a distance metric. + + Args: + bbox_tracks (numpy.ndarray): Bounding boxes of shape `(N, 4)` where `N` is number of objects already being tracked. + bbox_detections (numpy.ndarray): Bounding boxes of shape `(M, 4)` where `M` is number of objects that are newly detected. + iou_threshold (float): IOU threashold. + + Returns: + tuple: Tuple contains the following elements in the given order: + - matches (numpy.ndarray): Array of shape `(n, 2)` where `n` is number of pairs formed after matching tracks to detections. This is an array of tuples with each element as matched pair of indices`(track_index, detection_index)`. + - unmatched_detections (numpy.ndarray): Array of shape `(m,)` where `m` is number of unmatched detections. + - unmatched_tracks (numpy.ndarray): Array of shape `(k,)` where `k` is the number of unmatched tracks. + """ + + if (bbox_tracks.size == 0) or (bbox_detections.size == 0): + return np.empty((0, 2), dtype=int), np.arange(len(bbox_detections), dtype=int), np.empty((0,), dtype=int) + + if len(bbox_tracks.shape) == 1: + bbox_tracks = bbox_tracks[None, :] + + if len(bbox_detections.shape) == 1: + bbox_detections = bbox_detections[None, :] + + iou_matrix = np.zeros((bbox_tracks.shape[0], bbox_detections.shape[0]), dtype=np.float32) + for t in range(bbox_tracks.shape[0]): + for d in range(bbox_detections.shape[0]): + iou_matrix[t, d] = iou(bbox_tracks[t, :], bbox_detections[d, :]) + assigned_tracks, assigned_detections = linear_sum_assignment(-iou_matrix) + unmatched_detections, unmatched_tracks = [], [] + + for d in range(bbox_detections.shape[0]): + if d not in assigned_detections: + unmatched_detections.append(d) + + for t in range(bbox_tracks.shape[0]): + if t not in assigned_tracks: + unmatched_tracks.append(t) + + # filter out matched with low IOU + matches = [] + for t, d in zip(assigned_tracks, assigned_detections): + if iou_matrix[t, d] < iou_threshold: + unmatched_detections.append(d) + unmatched_tracks.append(t) + else: + matches.append((t, d)) + + if len(matches): + matches = np.array(matches) + else: + matches = np.empty((0, 2), dtype=int) + + return matches, np.array(unmatched_detections), np.array(unmatched_tracks) + + +class SORT(CentroidKF_Tracker): + """ + SORT - Multi object tracker. + + Args: + max_lost (int): Max. number of times a object is lost while tracking. + tracker_output_format (str): Output format of the tracker. + iou_threshold (float): Intersection over union minimum value. + process_noise_scale (float or numpy.ndarray): Process noise covariance matrix of shape (3, 3) + or covariance magnitude as scalar value. + measurement_noise_scale (float or numpy.ndarray): Measurement noise covariance matrix of shape (1,) + or covariance magnitude as scalar value. + time_step (int or float): Time step for Kalman Filter. + """ + + def __init__( + self, max_lost=0, + tracker_output_format='mot_challenge', + iou_threshold=0.3, + process_noise_scale=1.0, + measurement_noise_scale=1.0, + time_step=1 + ): + self.iou_threshold = iou_threshold + + super().__init__( + max_lost=max_lost, tracker_output_format=tracker_output_format, + process_noise_scale=process_noise_scale, + measurement_noise_scale=measurement_noise_scale, time_step=time_step + ) + + def _add_track(self, frame_id, bbox, detection_confidence, class_id, **kwargs): + # self.tracks[self.next_track_id] = KFTrackSORT( + # self.next_track_id, frame_id, bbox, detection_confidence, class_id=class_id, + # data_output_format=self.tracker_output_format, process_noise_scale=self.process_noise_scale, + # measurement_noise_scale=self.measurement_noise_scale, **kwargs + # ) + self.tracks[self.next_track_id] = KFTrack4DSORT( + self.next_track_id, frame_id, bbox, detection_confidence, class_id=class_id, + data_output_format=self.tracker_output_format, process_noise_scale=self.process_noise_scale, + measurement_noise_scale=self.measurement_noise_scale, kf_time_step=1, **kwargs) + self.next_track_id += 1 + + def update(self, bboxes, detection_scores, class_ids): + self.frame_count += 1 + + bbox_detections = np.array(bboxes, dtype='int') + + # track_ids_all = list(self.tracks.keys()) + # bbox_tracks = [] + # track_ids = [] + # for track_id in track_ids_all: + # bb = self.tracks[track_id].predict() + # if np.any(np.isnan(bb)): + # self._remove_track(track_id) + # else: + # track_ids.append(track_id) + # bbox_tracks.append(bb) + + track_ids = list(self.tracks.keys()) + bbox_tracks = [] + for track_id in track_ids: + bb = self.tracks[track_id].predict() + bbox_tracks.append(bb) + + bbox_tracks = np.array(bbox_tracks) + + if len(bboxes) == 0: + for i in range(len(bbox_tracks)): + track_id = track_ids[i] + bbox = bbox_tracks[i, :] + confidence = self.tracks[track_id].detection_confidence + cid = self.tracks[track_id].class_id + self._update_track(track_id, self.frame_count, bbox, detection_confidence=confidence, class_id=cid, lost=1) + if self.tracks[track_id].lost > self.max_lost: + self._remove_track(track_id) + else: + matches, unmatched_detections, unmatched_tracks = assign_tracks2detection_iou( + bbox_tracks, bbox_detections, iou_threshold=self.iou_threshold) + + for i in range(matches.shape[0]): + t, d = matches[i, :] + track_id = track_ids[t] + bbox = bboxes[d, :] + cid = class_ids[d] + confidence = detection_scores[d] + self._update_track(track_id, self.frame_count, bbox, confidence, cid, lost=0) + + for d in unmatched_detections: + bbox = bboxes[d, :] + cid = class_ids[d] + confidence = detection_scores[d] + self._add_track(self.frame_count, bbox, confidence, cid) + + for t in unmatched_tracks: + track_id = track_ids[t] + bbox = bbox_tracks[t, :] + confidence = self.tracks[track_id].detection_confidence + cid = self.tracks[track_id].class_id + self._update_track(track_id, self.frame_count, bbox, detection_confidence=confidence, class_id=cid, lost=1) + if self.tracks[track_id].lost > self.max_lost: + self._remove_track(track_id) + + outputs = self._get_tracks(self.tracks) + return outputs diff --git a/motrackers/track.py b/motrackers/track.py new file mode 100644 index 0000000..ec53ebe --- /dev/null +++ b/motrackers/track.py @@ -0,0 +1,287 @@ +import numpy as np +from motrackers.kalman_tracker import KFTracker2D, KFTrackerSORT, KFTracker4D + + +class Track: + """ + Track containing attributes to track various objects. + + Args: + frame_id (int): Camera frame id. + track_id (int): Track Id + bbox (numpy.ndarray): Bounding box pixel coordinates as (xmin, ymin, width, height) of the track. + detection_confidence (float): Detection confidence of the object (probability). + class_id (str or int): Class label id. + lost (int): Number of times the object or track was not tracked by tracker in consecutive frames. + iou_score (float): Intersection over union score. + data_output_format (str): Output format for data in tracker. + Options include ``['mot_challenge', 'visdrone_challenge']``. Default is ``mot_challenge``. + kwargs (dict): Additional key word arguments. + + """ + + count = 0 + + metadata = dict( + data_output_formats=['mot_challenge', 'visdrone_challenge'] + ) + + def __init__( + self, + track_id, + frame_id, + bbox, + detection_confidence, + class_id=None, + lost=0, + iou_score=0., + data_output_format='mot_challenge', + **kwargs + ): + assert data_output_format in Track.metadata['data_output_formats'] + Track.count += 1 + self.id = track_id + + self.detection_confidence_max = 0. + self.lost = 0 + self.age = 0 + + self.update(frame_id, bbox, detection_confidence, class_id=class_id, lost=lost, iou_score=iou_score, **kwargs) + + if data_output_format == 'mot_challenge': + self.output = self.get_mot_challenge_format + elif data_output_format == 'visdrone_challenge': + self.output = self.get_vis_drone_format + else: + raise NotImplementedError + + def update(self, frame_id, bbox, detection_confidence, class_id=None, lost=0, iou_score=0., **kwargs): + """ + Update the track. + + Args: + frame_id (int): Camera frame id. + bbox (numpy.ndarray): Bounding box pixel coordinates as (xmin, ymin, width, height) of the track. + detection_confidence (float): Detection confidence of the object (probability). + class_id (int or str): Class label id. + lost (int): Number of times the object or track was not tracked by tracker in consecutive frames. + iou_score (float): Intersection over union score. + kwargs (dict): Additional key word arguments. + """ + self.class_id = class_id + self.bbox = np.array(bbox) + self.detection_confidence = detection_confidence + self.frame_id = frame_id + self.iou_score = iou_score + + if lost == 0: + self.lost = 0 + else: + self.lost += lost + + for k, v in kwargs.items(): + setattr(self, k, v) + + self.detection_confidence_max = max(self.detection_confidence_max, detection_confidence) + + self.age += 1 + + @property + def centroid(self): + """ + Return the centroid of the bounding box. + + Returns: + numpy.ndarray: Centroid (x, y) of bounding box. + + """ + return np.array((self.bbox[0]+0.5*self.bbox[2], self.bbox[1]+0.5*self.bbox[3])) + + def get_mot_challenge_format(self): + """ + Get the tracker data in MOT challenge format as a tuple of elements containing + `(frame, id, bb_left, bb_top, bb_width, bb_height, conf, x, y, z)` + + References: + - Website : https://motchallenge.net/ + + Returns: + tuple: Tuple of 10 elements representing `(frame, id, bb_left, bb_top, bb_width, bb_height, conf, x, y, z)`. + + """ + mot_tuple = ( + self.frame_id, self.id, self.bbox[0], self.bbox[1], self.bbox[2], self.bbox[3], self.detection_confidence, + -1, -1, -1 + ) + return mot_tuple + + def get_vis_drone_format(self): + """ + Track data output in VISDRONE Challenge format with tuple as + `(frame_index, target_id, bbox_left, bbox_top, bbox_width, bbox_height, score, object_category, + truncation, occlusion)`. + + References: + - Website : http://aiskyeye.com/ + - Paper : https://arxiv.org/abs/2001.06303 + - GitHub : https://github.com/VisDrone/VisDrone2018-MOT-toolkit + - GitHub : https://github.com/VisDrone/ + + Returns: + tuple: Tuple containing the elements as `(frame_index, target_id, bbox_left, bbox_top, bbox_width, bbox_height, + score, object_category, truncation, occlusion)`. + """ + mot_tuple = ( + self.frame_id, self.id, self.bbox[0], self.bbox[1], self.bbox[2], self.bbox[3], + self.detection_confidence, self.class_id, -1, -1 + ) + return mot_tuple + + def predict(self): + """ + Implement to prediction the next estimate of track. + """ + raise NotImplemented + + @staticmethod + def print_all_track_output_formats(): + print(Track.metadata['data_output_formats']) + + +class KFTrackSORT(Track): + """ + Track based on Kalman filter tracker used for SORT MOT-Algorithm. + + Args: + track_id (int): Track Id + frame_id (int): Camera frame id. + bbox (numpy.ndarray): Bounding box pixel coordinates as (xmin, ymin, width, height) of the track. + detection_confidence (float): Detection confidence of the object (probability). + class_id (str or int): Class label id. + lost (int): Number of times the object or track was not tracked by tracker in consecutive frames. + iou_score (float): Intersection over union score. + data_output_format (str): Output format for data in tracker. + Options ``['mot_challenge', 'visdrone_challenge']``. Default is ``mot_challenge``. + process_noise_scale (float): Process noise covariance scale or covariance magnitude as scalar value. + measurement_noise_scale (float): Measurement noise covariance scale or covariance magnitude as scalar value. + kwargs (dict): Additional key word arguments. + """ + def __init__(self, track_id, frame_id, bbox, detection_confidence, class_id=None, lost=0, iou_score=0., + data_output_format='mot_challenge', process_noise_scale=1.0, measurement_noise_scale=1.0, **kwargs): + bbz = np.array([bbox[0]+0.5*bbox[2], bbox[1]+0.5*bbox[3], bbox[2]*bbox[3], bbox[2]/float(bbox[3])]) + self.kf = KFTrackerSORT( + bbz, process_noise_scale=process_noise_scale, measurement_noise_scale=measurement_noise_scale) + super().__init__(track_id, frame_id, bbox, detection_confidence, class_id=class_id, lost=lost, + iou_score=iou_score, data_output_format=data_output_format, **kwargs) + + def predict(self): + """ + Predicts the next estimate of the bounding box of the track. + + Returns: + numpy.ndarray: Bounding box pixel coordinates as (xmin, ymin, width, height) of the track. + + """ + if (self.kf.x[6] + self.kf.x[2]) <= 0: + self.kf.x[6] *= 0.0 + + x = self.kf.predict() + + if x[2] * x[3] < 0: + return np.array([np.nan, np.nan, np.nan, np.nan]) + + w = np.sqrt(x[2] * x[3]) + h = x[2] / float(w) + bb = np.array([x[0]-0.5*w, x[1]-0.5*h, w, h]) + return bb + + def update(self, frame_id, bbox, detection_confidence, class_id=None, lost=0, iou_score=0., **kwargs): + super().update( + frame_id, bbox, detection_confidence, class_id=class_id, lost=lost, iou_score=iou_score, **kwargs) + z = np.array([bbox[0]+0.5*bbox[2], bbox[1]+0.5*bbox[3], bbox[2]*bbox[3], bbox[2]/float(bbox[3])]) + self.kf.update(z) + + +class KFTrack4DSORT(Track): + """ + Track based on Kalman filter tracker used for SORT MOT-Algorithm. + + Args: + track_id (int): Track Id + frame_id (int): Camera frame id. + bbox (numpy.ndarray): Bounding box pixel coordinates as (xmin, ymin, width, height) of the track. + detection_confidence (float): Detection confidence of the object (probability). + class_id (str or int): Class label id. + lost (int): Number of times the object or track was not tracked by tracker in consecutive frames. + iou_score (float): Intersection over union score. + data_output_format (str): Output format for data in tracker. + Options ``['mot_challenge', 'visdrone_challenge']``. Default is ``mot_challenge``. + process_noise_scale (float): Process noise covariance scale or covariance magnitude as scalar value. + measurement_noise_scale (float): Measurement noise covariance scale or covariance magnitude as scalar value. + kwargs (dict): Additional key word arguments. + + """ + def __init__(self, track_id, frame_id, bbox, detection_confidence, class_id=None, lost=0, iou_score=0., + data_output_format='mot_challenge', process_noise_scale=1.0, measurement_noise_scale=1.0, + kf_time_step=1, **kwargs): + self.kf = KFTracker4D( + bbox.copy(), process_noise_scale=process_noise_scale, measurement_noise_scale=measurement_noise_scale, + time_step=kf_time_step) + super().__init__(track_id, frame_id, bbox, detection_confidence, class_id=class_id, lost=lost, + iou_score=iou_score, data_output_format=data_output_format, **kwargs) + + def predict(self): + x = self.kf.predict() + bb = np.array([x[0], x[3], x[6], x[9]]) + return bb + + def update(self, frame_id, bbox, detection_confidence, class_id=None, lost=0, iou_score=0., **kwargs): + super().update( + frame_id, bbox, detection_confidence, class_id=class_id, lost=lost, iou_score=iou_score, **kwargs) + self.kf.update(bbox.copy()) + + +class KFTrackCentroid(Track): + """ + Track based on Kalman filter used for Centroid Tracking of bounding box in MOT. + + Args: + track_id (int): Track Id + frame_id (int): Camera frame id. + bbox (numpy.ndarray): Bounding box pixel coordinates as (xmin, ymin, width, height) of the track. + detection_confidence (float): Detection confidence of the object (probability). + class_id (str or int): Class label id. + lost (int): Number of times the object or track was not tracked by tracker in consecutive frames. + iou_score (float): Intersection over union score. + data_output_format (str): Output format for data in tracker. + Options ``['mot_challenge', 'visdrone_challenge']``. Default is ``mot_challenge``. + process_noise_scale (float): Process noise covariance scale or covariance magnitude as scalar value. + measurement_noise_scale (float): Measurement noise covariance scale or covariance magnitude as scalar value. + kwargs (dict): Additional key word arguments. + """ + def __init__(self, track_id, frame_id, bbox, detection_confidence, class_id=None, lost=0, iou_score=0., + data_output_format='mot_challenge', process_noise_scale=1.0, measurement_noise_scale=1.0, **kwargs): + c = np.array((bbox[0]+0.5*bbox[2], bbox[1]+0.5*bbox[3])) + self.kf = KFTracker2D(c, process_noise_scale=process_noise_scale, measurement_noise_scale=measurement_noise_scale) + super().__init__(track_id, frame_id, bbox, detection_confidence, class_id=class_id, lost=lost, + iou_score=iou_score, data_output_format=data_output_format, **kwargs) + + def predict(self): + """ + Predicts the next estimate of the bounding box of the track. + + Returns: + numpy.ndarray: Bounding box pixel coordinates as (xmin, ymin, width, height) of the track. + + """ + s = self.kf.predict() + xmid, ymid = s[0], s[3] + w, h = self.bbox[2], self.bbox[3] + xmin = xmid - 0.5*w + ymin = ymid - 0.5*h + return np.array([xmin, ymin, w, h]).astype(int) + + def update(self, frame_id, bbox, detection_confidence, class_id=None, lost=0, iou_score=0., **kwargs): + super().update( + frame_id, bbox, detection_confidence, class_id=class_id, lost=lost, iou_score=iou_score, **kwargs) + self.kf.update(self.centroid) diff --git a/motrackers/tracker.py b/motrackers/tracker.py new file mode 100644 index 0000000..cbbff58 --- /dev/null +++ b/motrackers/tracker.py @@ -0,0 +1,177 @@ +from collections import OrderedDict +import numpy as np +from scipy.spatial import distance +from motrackers.utils.misc import get_centroid +from motrackers.track import Track + + +class Tracker: + """ + Greedy Tracker with tracking based on ``centroid`` location of the bounding box of the object. + This tracker is also referred as ``CentroidTracker`` in this repository. + + Args: + max_lost (int): Maximum number of consecutive frames object was not detected. + tracker_output_format (str): Output format of the tracker. + """ + + def __init__(self, max_lost=5, tracker_output_format='mot_challenge'): + self.next_track_id = 0 + self.tracks = OrderedDict() + self.max_lost = max_lost + self.frame_count = 0 + self.tracker_output_format = tracker_output_format + + def _add_track(self, frame_id, bbox, detection_confidence, class_id, **kwargs): + """ + Add a newly detected object to the queue. + + Args: + frame_id (int): Camera frame id. + bbox (numpy.ndarray): Bounding box pixel coordinates as (xmin, ymin, xmax, ymax) of the track. + detection_confidence (float): Detection confidence of the object (probability). + class_id (str or int): Class label id. + kwargs (dict): Additional key word arguments. + """ + + self.tracks[self.next_track_id] = Track( + self.next_track_id, frame_id, bbox, detection_confidence, class_id=class_id, + data_output_format=self.tracker_output_format, + **kwargs + ) + self.next_track_id += 1 + + def _remove_track(self, track_id): + """ + Remove tracker data after object is lost. + + Args: + track_id (int): track_id of the track lost while tracking. + """ + + del self.tracks[track_id] + + def _update_track(self, track_id, frame_id, bbox, detection_confidence, class_id, lost=0, iou_score=0., **kwargs): + """ + Update track state. + + Args: + track_id (int): ID of the track. + frame_id (int): Frame count. + bbox (numpy.ndarray or list): Bounding box coordinates as `(xmin, ymin, width, height)`. + detection_confidence (float): Detection confidence (a.k.a. detection probability). + class_id (int): ID of the class (aka label) of the object being tracked. + lost (int): Number of frames the object was lost while tracking. + iou_score (float): Intersection over union. + kwargs (dict): Additional keyword arguments. + """ + + self.tracks[track_id].update( + frame_id, bbox, detection_confidence, class_id=class_id, lost=lost, iou_score=iou_score, **kwargs + ) + + @staticmethod + def _get_tracks(tracks): + """ + Output the information of tracks. + + Args: + tracks (OrderedDict): Tracks dictionary with (key, value) as (track_id, corresponding `Track` objects). + + Returns: + list: List of tracks being currently tracked by the tracker. + """ + + outputs = [] + for _, track in tracks.items(): + # if not track.lost: + # outputs.append(track.output()) + outputs.append(track.output()) + return outputs + + @staticmethod + def preprocess_input(bboxes, class_ids, detection_scores): + """ + Preprocess the input data. + + Args: + bboxes (list or numpy.ndarray): Array of bounding boxes with each bbox as a tuple containing `(xmin, ymin, width, height)`. + class_ids (list or numpy.ndarray): Array of Class ID or label ID. + detection_scores (list or numpy.ndarray): Array of detection scores (a.k.a. detection probabilities). + + Returns: + detections (list[Tuple]): Data for detections as list of tuples containing `(bbox, class_id, detection_score)`. + """ + + new_bboxes = np.array(bboxes, dtype='float') + new_class_ids = np.array(class_ids, dtype='int') + new_detection_scores = np.array(detection_scores) + + new_detections = list(zip(new_bboxes, new_class_ids, new_detection_scores)) + return new_detections + + def update(self, bboxes, detection_scores, class_ids): + """ + Update the tracker based on the new bounding boxes. + + Args: + bboxes (numpy.ndarray or list): List of bounding boxes detected in the current frame. Each element of the list represent + coordinates of bounding box as tuple `(top-left-x, top-left-y, width, height)`. + detection_scores(numpy.ndarray or list): List of detection scores (probability) of each detected object. + class_ids (numpy.ndarray or list): List of class_ids (int) corresponding to labels of the detected object. Default is `None`. + + Returns: + list: List of tracks being currently tracked by the tracker. Each track is represented by the tuple with elements `(frame_id, track_id, bb_left, bb_top, bb_width, bb_height, conf, x, y, z)`. + """ + + self.frame_count += 1 + + if len(bboxes) == 0: + lost_ids = list(self.tracks.keys()) + + for track_id in lost_ids: + self.tracks[track_id].lost += 1 + if self.tracks[track_id].lost > self.max_lost: + self._remove_track(track_id) + + outputs = self._get_tracks(self.tracks) + return outputs + + detections = Tracker.preprocess_input(bboxes, class_ids, detection_scores) + + track_ids = list(self.tracks.keys()) + + updated_tracks, updated_detections = [], [] + + if len(track_ids): + track_centroids = np.array([self.tracks[tid].centroid for tid in track_ids]) + detection_centroids = get_centroid(np.asarray(bboxes)) + + centroid_distances = distance.cdist(track_centroids, detection_centroids) + + track_indices = np.amin(centroid_distances, axis=1).argsort() + + for idx in track_indices: + track_id = track_ids[idx] + + remaining_detections = [ + (i, d) for (i, d) in enumerate(centroid_distances[idx, :]) if i not in updated_detections] + + if len(remaining_detections): + detection_idx, detection_distance = min(remaining_detections, key=lambda x: x[1]) + bbox, class_id, confidence = detections[detection_idx] + self._update_track(track_id, self.frame_count, bbox, confidence, class_id=class_id) + updated_detections.append(detection_idx) + updated_tracks.append(track_id) + + if len(updated_tracks) == 0 or track_id is not updated_tracks[-1]: + self.tracks[track_id].lost += 1 + if self.tracks[track_id].lost > self.max_lost: + self._remove_track(track_id) + + for i, (bbox, class_id, confidence) in enumerate(detections): + if i not in updated_detections: + self._add_track(self.frame_count, bbox, confidence, class_id=class_id) + + outputs = self._get_tracks(self.tracks) + return outputs diff --git a/motrackers/tracker_img.py b/motrackers/tracker_img.py new file mode 100644 index 0000000..b08b478 --- /dev/null +++ b/motrackers/tracker_img.py @@ -0,0 +1,63 @@ +import argparse +import time +import cv2 + + +ap = argparse.ArgumentParser() +ap.add_argument("-v", "--video", type=str, default='../examples/video_data/cars.mp4', help="path to input video file") +ap.add_argument("-t", "--tracker", type=str, default="kcf", help="OpenCV object tracker type") +args = vars(ap.parse_args()) + +OPENCV_OBJECT_TRACKERS = { + "csrt": cv2.TrackerCSRT_create, + "kcf": cv2.TrackerKCF_create, + "boosting": cv2.TrackerBoosting_create, + "mil": cv2.TrackerMIL_create, + "tld": cv2.TrackerTLD_create, + "medianflow": cv2.TrackerMedianFlow_create, + "mosse": cv2.TrackerMOSSE_create +} + +trackers = cv2.MultiTracker_create() + +vs = cv2.VideoCapture(args["video"]) + +while True: + ok, frame = vs.read() + if not ok: + break + + # resize the frame (so we can process it faster) + frame = cv2.resize(frame, (600, 400)) + + (success, boxes) = trackers.update(frame) + print(success) + + for box in boxes: + (x, y, w, h) = [int(v) for v in box] + cv2.rectangle(frame, (x, y), (x + w, y + h), (0, 255, 0), 2) + + cv2.imshow("Frame", frame) + key = cv2.waitKey(1) & 0xFF + + # if the 's' key is selected, we are going to "select" a bounding + # box to tracks + if key == ord("s"): + # select the bounding box of the object we want to track (make + # sure you press ENTER or SPACE after selecting the ROI) + box = cv2.selectROI("Frame", frame, fromCenter=False, showCrosshair=True) + + # create a new object tracker for the bounding box and add it to our multi-object tracker + tracker = OPENCV_OBJECT_TRACKERS[args["tracker"]]() + trackers.add(tracker, frame, box) + + elif key == ord("q"): # if the `q` key was pressed, break from the loop + break + + time.sleep(0.1) + +# if we are using a webcam, release the pointer +vs.release() + +# close all windows +cv2.destroyAllWindows() diff --git a/motrackers/utils/__init__.py b/motrackers/utils/__init__.py new file mode 100644 index 0000000..fa1bb85 --- /dev/null +++ b/motrackers/utils/__init__.py @@ -0,0 +1,7 @@ +from .filechooser_utils import select_caffemodel +from .filechooser_utils import select_videofile +from .filechooser_utils import select_yolo_model +from .filechooser_utils import select_tfmobilenet +from .misc import iou +from .misc import get_centroid +from .misc import draw_tracks diff --git a/motrackers/utils/filechooser_utils.py b/motrackers/utils/filechooser_utils.py new file mode 100644 index 0000000..eef639d --- /dev/null +++ b/motrackers/utils/filechooser_utils.py @@ -0,0 +1,91 @@ +from ipyfilechooser import FileChooser + + +def create_filechooser(default_path="~/", html_title="Select File", use_dir_icons=True): + fc = FileChooser(default_path) + fc.title = html_title + fc.use_dir_icons = use_dir_icons + return fc + + +def select_caffemodel_prototxt(default_path="~/", use_dir_icons=True): + html_title = 'Select .prototxt file for the caffemodel:' + fc = create_filechooser(default_path=default_path, + html_title=html_title, + use_dir_icons=use_dir_icons) + return fc + + +def select_caffemodel_weights(default_path="~/", use_dir_icons=True): + html_title = 'Select caffemodel weights (file with extention .caffemodel):' + fc = create_filechooser(default_path=default_path, + html_title=html_title, + use_dir_icons=use_dir_icons) + return fc + + +def select_caffemodel(default_path="~/", use_dir_icons=True): + prototxt = select_caffemodel_prototxt(default_path=default_path, use_dir_icons=use_dir_icons) + weights = select_caffemodel_weights(default_path=default_path, use_dir_icons=use_dir_icons) + return prototxt, weights + + +def select_videofile(default_path="~/", use_dir_icons=True): + html_title = 'Select video file:' + fc = create_filechooser(default_path=default_path, + html_title=html_title, + use_dir_icons=use_dir_icons) + return fc + + +def select_yolo_weights(default_path="~/", use_dir_icons=True): + html_title = 'Select YOLO weights (.weights file):' + fc = create_filechooser(default_path=default_path, + html_title=html_title, + use_dir_icons=use_dir_icons) + return fc + + +def select_coco_labels(default_path="~/", use_dir_icons=True): + html_title = 'Select coco labels file (.name file):' + fc = create_filechooser(default_path=default_path, + html_title=html_title, + use_dir_icons=use_dir_icons) + return fc + + +def select_yolo_config(default_path="~/", use_dir_icons=True): + html_title = 'Choose YOLO config file (.cfg file):' + fc = create_filechooser(default_path=default_path, + html_title=html_title, + use_dir_icons=use_dir_icons) + return fc + + +def select_yolo_model(default_path="~/", use_dir_icons=True): + yolo_weights = select_yolo_weights(default_path, use_dir_icons) + yolo_config = select_yolo_config(default_path, use_dir_icons) + coco_names = select_coco_labels(default_path, use_dir_icons) + return yolo_weights, yolo_config, coco_names + + +def select_pbtxt(default_path="~/", use_dir_icons=True): + html_title = 'Select .pbtxt file:' + fc = create_filechooser(default_path=default_path, + html_title=html_title, + use_dir_icons=use_dir_icons) + return fc + + +def select_tfmobilenet_weights(default_path="~/", use_dir_icons=True): + html_title = 'Select tf-frozen graph of mobilenet (.pb file):' + fc = create_filechooser(default_path=default_path, + html_title=html_title, + use_dir_icons=use_dir_icons) + return fc + + +def select_tfmobilenet(default_path="~/", use_dir_icons=True): + prototxt = select_pbtxt(default_path, use_dir_icons) + tfweights = select_tfmobilenet_weights(default_path, use_dir_icons) + return prototxt, tfweights diff --git a/motrackers/utils/misc.py b/motrackers/utils/misc.py new file mode 100644 index 0000000..bb82a87 --- /dev/null +++ b/motrackers/utils/misc.py @@ -0,0 +1,305 @@ +import numpy as np +import cv2 as cv + + +def get_centroid(bboxes): + """ + Calculate centroids for multiple bounding boxes. + + Args: + bboxes (numpy.ndarray): Array of shape `(n, 4)` or of shape `(4,)` where + each row contains `(xmin, ymin, width, height)`. + + Returns: + numpy.ndarray: Centroid (x, y) coordinates of shape `(n, 2)` or `(2,)`. + + """ + + one_bbox = False + if len(bboxes.shape) == 1: + one_bbox = True + bboxes = bboxes[None, :] + + xmin = bboxes[:, 0] + ymin = bboxes[:, 1] + w, h = bboxes[:, 2], bboxes[:, 3] + + xc = xmin + 0.5*w + yc = ymin + 0.5*h + + x = np.hstack([xc[:, None], yc[:, None]]) + + if one_bbox: + x = x.flatten() + return x + + +def iou(bbox1, bbox2): + """ + Calculates the intersection-over-union of two bounding boxes. + Source: https://github.com/bochinski/iou-tracker/blob/master/util.py + + Args: + bbox1 (numpy.array or list[floats]): Bounding box of length 4 containing + ``(x-top-left, y-top-left, x-bottom-right, y-bottom-right)``. + bbox2 (numpy.array or list[floats]): Bounding box of length 4 containing + ``(x-top-left, y-top-left, x-bottom-right, y-bottom-right)``. + + Returns: + float: intersection-over-onion of bbox1, bbox2. + """ + + bbox1 = [float(x) for x in bbox1] + bbox2 = [float(x) for x in bbox2] + + (x0_1, y0_1, x1_1, y1_1), (x0_2, y0_2, x1_2, y1_2) = bbox1, bbox2 + + # get the overlap rectangle + overlap_x0 = max(x0_1, x0_2) + overlap_y0 = max(y0_1, y0_2) + overlap_x1 = min(x1_1, x1_2) + overlap_y1 = min(y1_1, y1_2) + + # check if there is an overlap + if overlap_x1 - overlap_x0 <= 0 or overlap_y1 - overlap_y0 <= 0: + return 0.0 + + # if yes, calculate the ratio of the overlap to each ROI size and the unified size + size_1 = (x1_1 - x0_1) * (y1_1 - y0_1) + size_2 = (x1_2 - x0_2) * (y1_2 - y0_2) + size_intersection = (overlap_x1 - overlap_x0) * (overlap_y1 - overlap_y0) + size_union = size_1 + size_2 - size_intersection + + iou_ = size_intersection / size_union + + return iou_ + + +def iou_xywh(bbox1, bbox2): + """ + Calculates the intersection-over-union of two bounding boxes. + Source: https://github.com/bochinski/iou-tracker/blob/master/util.py + + Args: + bbox1 (numpy.array or list[floats]): bounding box of length 4 containing ``(x-top-left, y-top-left, width, height)``. + bbox2 (numpy.array or list[floats]): bounding box of length 4 containing ``(x-top-left, y-top-left, width, height)``. + + Returns: + float: intersection-over-onion of bbox1, bbox2. + """ + bbox1 = bbox1[0], bbox1[1], bbox1[0]+bbox1[2], bbox1[1]+bbox1[3] + bbox2 = bbox2[0], bbox2[1], bbox2[0]+bbox2[2], bbox2[1]+bbox2[3] + + iou_ = iou(bbox1, bbox2) + + return iou_ + + +def xyxy2xywh(xyxy): + """ + Convert bounding box coordinates from (xmin, ymin, xmax, ymax) format to (xmin, ymin, width, height). + + Args: + xyxy (numpy.ndarray): + + Returns: + numpy.ndarray: Bounding box coordinates (xmin, ymin, width, height). + + """ + + if len(xyxy.shape) == 2: + w, h = xyxy[:, 2] - xyxy[:, 0] + 1, xyxy[:, 3] - xyxy[:, 1] + 1 + xywh = np.concatenate((xyxy[:, 0:2], w[:, None], h[:, None]), axis=1) + return xywh.astype("int") + elif len(xyxy.shape) == 1: + (left, top, right, bottom) = xyxy + width = right - left + 1 + height = bottom - top + 1 + return np.array([left, top, width, height]).astype('int') + else: + raise ValueError("Input shape not compatible.") + + +def xywh2xyxy(xywh): + """ + Convert bounding box coordinates from (xmin, ymin, width, height) to (xmin, ymin, xmax, ymax) format. + + Args: + xywh (numpy.ndarray): Bounding box coordinates as `(xmin, ymin, width, height)`. + + Returns: + numpy.ndarray : Bounding box coordinates as `(xmin, ymin, xmax, ymax)`. + + """ + + if len(xywh.shape) == 2: + x = xywh[:, 0] + xywh[:, 2] + y = xywh[:, 1] + xywh[:, 3] + xyxy = np.concatenate((xywh[:, 0:2], x[:, None], y[:, None]), axis=1).astype('int') + return xyxy + if len(xywh.shape) == 1: + x, y, w, h = xywh + xr = x + w + yb = y + h + return np.array([x, y, xr, yb]).astype('int') + + +def midwh2xywh(midwh): + """ + Convert bounding box coordinates from (xmid, ymid, width, height) to (xmin, ymin, width, height) format. + + Args: + midwh (numpy.ndarray): Bounding box coordinates (xmid, ymid, width, height). + + Returns: + numpy.ndarray: Bounding box coordinates (xmin, ymin, width, height). + """ + + if len(midwh.shape) == 2: + xymin = midwh[:, 0:2] - midwh[:, 2:] * 0.5 + wh = midwh[:, 2:] + xywh = np.concatenate([xymin, wh], axis=1).astype('int') + return xywh + if len(midwh.shape) == 1: + xmid, ymid, w, h = midwh + xywh = np.array([xmid-w*0.5, ymid-h*0.5, w, h]).astype('int') + return xywh + + +def intersection_complement_indices(big_set_indices, small_set_indices): + """ + Get the complement of intersection of two sets of indices. + + Args: + big_set_indices (numpy.ndarray): Indices of big set. + small_set_indices (numpy.ndarray): Indices of small set. + + Returns: + numpy.ndarray: Indices of set which is complementary to intersection of two input sets. + """ + assert big_set_indices.shape[0] >= small_set_indices.shape[1] + n = len(big_set_indices) + mask = np.ones((n,), dtype=bool) + mask[small_set_indices] = False + intersection_complement = big_set_indices[mask] + return intersection_complement + + +def nms(boxes, scores, overlapThresh, classes=None): + """ + Non-maximum suppression. based on Malisiewicz et al. + + Args: + boxes (numpy.ndarray): Boxes to process (xmin, ymin, xmax, ymax) + scores (numpy.ndarray): Corresponding scores for each box + overlapThresh (float): Overlap threshold for boxes to merge + classes (numpy.ndarray, optional): Class ids for each box. + + Returns: + tuple: a tuple containing: + - boxes (list): nms boxes + - scores (list): nms scores + - classes (list, optional): nms classes if specified + + """ + + if boxes.dtype.kind == "i": + boxes = boxes.astype("float") + + if scores.dtype.kind == "i": + scores = scores.astype("float") + + pick = [] + + x1 = boxes[:, 0] + y1 = boxes[:, 1] + x2 = boxes[:, 2] + y2 = boxes[:, 3] + area = (x2 - x1 + 1) * (y2 - y1 + 1) + + idxs = np.argsort(scores) + + while len(idxs) > 0: + last = len(idxs) - 1 + i = idxs[last] + pick.append(i) + + xx1 = np.maximum(x1[i], x1[idxs[:last]]) + yy1 = np.maximum(y1[i], y1[idxs[:last]]) + xx2 = np.minimum(x2[i], x2[idxs[:last]]) + yy2 = np.minimum(y2[i], y2[idxs[:last]]) + + w = np.maximum(0, xx2 - xx1 + 1) + h = np.maximum(0, yy2 - yy1 + 1) + + overlap = (w * h) / area[idxs[:last]] + + # delete all indexes from the index list that have + idxs = np.delete(idxs, np.concatenate(([last], np.where(overlap > overlapThresh)[0]))) + + if classes is not None: + return boxes[pick], scores[pick], classes[pick] + else: + return boxes[pick], scores[pick] + + +def draw_tracks(image, tracks): + """ + Draw on input image. + + Args: + image (numpy.ndarray): image + tracks (list): list of tracks to be drawn on the image. + + Returns: + numpy.ndarray: image with the track-ids drawn on it. + """ + + for trk in tracks: + + trk_id = trk[1] + xmin = trk[2] + ymin = trk[3] + width = trk[4] + height = trk[5] + + xcentroid, ycentroid = int(xmin + 0.5*width), int(ymin + 0.5*height) + + text = "ID {}".format(trk_id) + + cv.putText(image, text, (xcentroid - 10, ycentroid - 10), cv.FONT_HERSHEY_SIMPLEX, 0.5, (0, 255, 0), 2) + cv.circle(image, (xcentroid, ycentroid), 4, (0, 255, 0), -1) + + return image + + +def load_labelsjson(json_file): + import json + with open(json_file) as file: + data = json.load(file) + labels = {int(k): v for k, v in data.items()} + return labels + + +def dict2jsonfile(dict_data, json_file_path): + import json + with open(json_file_path, 'w') as outfile: + json.dump(dict_data, outfile) + + +if __name__ == '__main__': + bb = np.random.random_integers(0, 100, size=(20,)).reshape((5, 4)) + c = get_centroid(bb) + print(bb, c) + + bb2 = np.array([1, 2, 3, 4]) + c2 = get_centroid(bb2) + print(bb2, c2) + + data = { + 0: 'background', 1: 'aeroplane', 2: 'bicycle', 3: 'bird', 4: 'boat', 5: 'bottle', 6: 'bus', + 7: 'car', 8: 'cat', 9: 'chair', 10: 'cow', 11: 'diningtable', 12: 'dog', 13: 'horse', 14: 'motorbike', + 15: 'person', 16: 'pottedplant', 17: 'sheep', 18: 'sofa', 19: 'train', 20: 'tvmonitor' + } + dict2jsonfile(data, '../../examples/pretrained_models/caffemodel_weights/ssd_mobilenet_caffe_names.json') + diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..6ce1ac0 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,49 @@ +[project] +name = "motrackers" +version = "0.0.2" +description = "Multi-object trackers in Python" +authors = [ + {name = "Aditya M. Deshpande", email = "adityadeshpande2010@gmail.com"} +] +license = {file = "LICENSE.txt"} +readme = "README.md" +requires-python = ">3.6" + +keywords = ["tracking", "object", "multi-object", "python"] + +classifiers = [ +"Programming Language :: Python :: 3" +] + +dependencies = [ +"numpy", +"scipy", +"matplotlib", +"opencv-python", +"pandas", +"motmetrics", +"setuptools", +"ipyfilechooser" +] + +[project.optional-dependencies] +docs = [ + 'sphinx', + 'm2r2' +] + +[project.urls] +homepath = "https://adipandas.github.io/multi-object-tracker" +repository = "https://github.com/adipandas/multi-object-tracker" + +[build-system] +requires = ["setuptools", "wheel"] +build-backend = "setuptools.build_meta" + +# [https://setuptools.pypa.io/en/stable/userguide/datafiles.html](https://setuptools.pypa.io/en/stable/userguide/datafiles.html) + +[tool.setuptools] +include-package-data = true + +[tool.setuptools.packages.find] +where = ["."] diff --git a/tracking-caffe-model.ipynb b/tracking-caffe-model.ipynb deleted file mode 100644 index f26fef2..0000000 --- a/tracking-caffe-model.ipynb +++ /dev/null @@ -1,278 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "import cv2 as cv\n", - "from scipy.spatial import distance\n", - "import numpy as np\n", - "from collections import OrderedDict" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##### Object Tracking Class" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "class Tracker:\n", - " def __init__(self, maxLost = 30): # maxLost: maximum object lost counted when the object is being tracked\n", - " self.nextObjectID = 0 # ID of next object\n", - " self.objects = OrderedDict() # stores ID:Locations\n", - " self.lost = OrderedDict() # stores ID:Lost_count\n", - " \n", - " self.maxLost = maxLost # maximum number of frames object was not detected.\n", - " \n", - " def addObject(self, new_object_location):\n", - " self.objects[self.nextObjectID] = new_object_location # store new object location\n", - " self.lost[self.nextObjectID] = 0 # initialize frame_counts for when new object is undetected\n", - " \n", - " self.nextObjectID += 1\n", - " \n", - " def removeObject(self, objectID): # remove tracker data after object is lost\n", - " del self.objects[objectID]\n", - " del self.lost[objectID]\n", - " \n", - " @staticmethod\n", - " def getLocation(bounding_box):\n", - " xlt, ylt, xrb, yrb = bounding_box\n", - " return (int((xlt + xrb) / 2.0), int((ylt + yrb) / 2.0))\n", - " \n", - " def update(self, detections):\n", - " \n", - " if len(detections) == 0: # if no object detected in the frame\n", - " lost_ids = list(self.lost.keys())\n", - " for objectID in lost_ids:\n", - " self.lost[objectID] +=1\n", - " if self.lost[objectID] > self.maxLost: self.removeObject(objectID)\n", - " \n", - " return self.objects\n", - " \n", - " new_object_locations = np.zeros((len(detections), 2), dtype=\"int\") # current object locations\n", - " \n", - " for (i, detection) in enumerate(detections): new_object_locations[i] = self.getLocation(detection)\n", - " \n", - " if len(self.objects)==0:\n", - " for i in range(0, len(detections)): self.addObject(new_object_locations[i])\n", - " else:\n", - " objectIDs = list(self.objects.keys())\n", - " previous_object_locations = np.array(list(self.objects.values()))\n", - " \n", - " D = distance.cdist(previous_object_locations, new_object_locations) # pairwise distance between previous and current\n", - " \n", - " row_idx = D.min(axis=1).argsort() # (minimum distance of previous from current).sort_as_per_index\n", - " \n", - " cols_idx = D.argmin(axis=1)[row_idx] # index of minimum distance of previous from current\n", - " \n", - " assignedRows, assignedCols = set(), set()\n", - " \n", - " for (row, col) in zip(row_idx, cols_idx):\n", - " \n", - " if row in assignedRows or col in assignedCols:\n", - " continue\n", - " \n", - " objectID = objectIDs[row]\n", - " self.objects[objectID] = new_object_locations[col]\n", - " self.lost[objectID] = 0\n", - " \n", - " assignedRows.add(row)\n", - " assignedCols.add(col)\n", - " \n", - " unassignedRows = set(range(0, D.shape[0])).difference(assignedRows)\n", - " unassignedCols = set(range(0, D.shape[1])).difference(assignedCols)\n", - " \n", - " \n", - " if D.shape[0]>=D.shape[1]:\n", - " for row in unassignedRows:\n", - " objectID = objectIDs[row]\n", - " self.lost[objectID] += 1\n", - " \n", - " if self.lost[objectID] > self.maxLost:\n", - " self.removeObject(objectID)\n", - " \n", - " else:\n", - " for col in unassignedCols:\n", - " self.addObject(new_object_locations[col])\n", - " \n", - " return self.objects\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Loading Object Detector Model" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##### Face Detection and Tracking\n", - "\n", - "Here, the Face Detection Caffe Model is used.\n", - "\n", - "The files are taken from the following link:\n", - "https://github.com/opencv/opencv_3rdparty/tree/dnn_samples_face_detector_20170830" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "caffemodel = {\"prototxt\":\"./caffemodel_dir/deploy.prototxt\",\n", - " \"model\":\"./caffemodel_dir/res10_300x300_ssd_iter_140000.caffemodel\",\n", - " \"acc_threshold\":0.50 # neglected detections with probability less than acc_threshold value\n", - " }\n", - "\n", - "net = cv.dnn.readNetFromCaffe(caffemodel[\"prototxt\"], caffemodel[\"model\"])" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##### Instantiate the Tracker Class" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [], - "source": [ - "maxLost = 60 # maximum number of object losts counted when the object is being tracked\n", - "tracker = Tracker(maxLost = maxLost)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##### Initiate opencv video capture object\n", - "\n", - "The `video_src` can take two values:\n", - "1. If `video_src=0`: OpenCV accesses the camera connected through USB\n", - "2. If `video_src='video_file_path'`: OpenCV will access the video file at the given path (can be MP4, AVI, etc format)" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "video_src = 0\n", - "cap = cv.VideoCapture(video_src) " - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##### Start object detection and tracking" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "(H, W) = (None, None) # input image height and width for the network\n", - "\n", - "while(True):\n", - " \n", - " ok, image = cap.read()\n", - " \n", - " if not ok:\n", - " print(\"Cannot read the video feed.\")\n", - " break\n", - " \n", - " image = cv.resize(image, (400, 400), interpolation = cv.INTER_AREA)\n", - " \n", - " if W is None or H is None: (H, W) = image.shape[:2]\n", - " \n", - " blob = cv.dnn.blobFromImage(image, 1.0, (W, H), (104.0, 177.0, 123.0))\n", - " \n", - " net.setInput(blob)\n", - " detections = net.forward() # detect objects using object detection model\n", - " \n", - " detections_bbox = [] # bounding box for detections\n", - " \n", - " for i in range(0, detections.shape[2]):\n", - " if detections[0, 0, i, 2] > caffemodel[\"acc_threshold\"]:\n", - " box = detections[0, 0, i, 3:7] * np.array([W, H, W, H])\n", - " detections_bbox.append(box.astype(\"int\"))\n", - " \n", - " # draw a bounding box surrounding the object so we can visualize it\n", - " (startX, startY, endX, endY) = box.astype(\"int\")\n", - " cv.rectangle(image, (startX, startY), (endX, endY), (0, 255, 0), 2) \n", - " \n", - " objects = tracker.update(detections_bbox) # update tracker based on the newly detected objects\n", - " \n", - " for (objectID, centroid) in objects.items():\n", - " text = \"ID {}\".format(objectID)\n", - " cv.putText(image, text, (centroid[0] - 10, centroid[1] - 10), cv.FONT_HERSHEY_SIMPLEX, 0.5, (0, 255, 0), 2)\n", - " cv.circle(image, (centroid[0], centroid[1]), 4, (0, 255, 0), -1)\n", - " \n", - " cv.imshow(\"image\", image)\n", - " \n", - " if cv.waitKey(1) & 0xFF == ord('q'):\n", - " break\n", - " \n", - "cap.release()\n", - "cv.destroyWindow(\"image\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/tracking-tensorflow-ssd_mobilenet_v2_coco_2018_03_29.ipynb b/tracking-tensorflow-ssd_mobilenet_v2_coco_2018_03_29.ipynb deleted file mode 100644 index d0f6d99..0000000 --- a/tracking-tensorflow-ssd_mobilenet_v2_coco_2018_03_29.ipynb +++ /dev/null @@ -1,341 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "import cv2 as cv\n", - "from scipy.spatial import distance\n", - "import numpy as np\n", - "from collections import OrderedDict" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##### Object Tracking Class" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "class Tracker:\n", - " def __init__(self, maxLost = 30): # maxLost: maximum object lost counted when the object is being tracked\n", - " self.nextObjectID = 0 # ID of next object\n", - " self.objects = OrderedDict() # stores ID:Locations\n", - " self.lost = OrderedDict() # stores ID:Lost_count\n", - " \n", - " self.maxLost = maxLost # maximum number of frames object was not detected.\n", - " \n", - " def addObject(self, new_object_location):\n", - " self.objects[self.nextObjectID] = new_object_location # store new object location\n", - " self.lost[self.nextObjectID] = 0 # initialize frame_counts for when new object is undetected\n", - " \n", - " self.nextObjectID += 1\n", - " \n", - " def removeObject(self, objectID): # remove tracker data after object is lost\n", - " del self.objects[objectID]\n", - " del self.lost[objectID]\n", - " \n", - " @staticmethod\n", - " def getLocation(bounding_box):\n", - " xlt, ylt, xrb, yrb = bounding_box\n", - " return (int((xlt + xrb) / 2.0), int((ylt + yrb) / 2.0))\n", - " \n", - " def update(self, detections):\n", - " \n", - " if len(detections) == 0: # if no object detected in the frame\n", - " lost_ids = list(self.lost.keys())\n", - " for objectID in lost_ids:\n", - " self.lost[objectID] +=1\n", - " if self.lost[objectID] > self.maxLost: self.removeObject(objectID)\n", - " \n", - " return self.objects\n", - " \n", - " new_object_locations = np.zeros((len(detections), 2), dtype=\"int\") # current object locations\n", - " \n", - " for (i, detection) in enumerate(detections): new_object_locations[i] = self.getLocation(detection)\n", - " \n", - " if len(self.objects)==0:\n", - " for i in range(0, len(detections)): self.addObject(new_object_locations[i])\n", - " else:\n", - " objectIDs = list(self.objects.keys())\n", - " previous_object_locations = np.array(list(self.objects.values()))\n", - " \n", - " D = distance.cdist(previous_object_locations, new_object_locations) # pairwise distance between previous and current\n", - " \n", - " row_idx = D.min(axis=1).argsort() # (minimum distance of previous from current).sort_as_per_index\n", - " \n", - " cols_idx = D.argmin(axis=1)[row_idx] # index of minimum distance of previous from current\n", - " \n", - " assignedRows, assignedCols = set(), set()\n", - " \n", - " for (row, col) in zip(row_idx, cols_idx):\n", - " \n", - " if row in assignedRows or col in assignedCols:\n", - " continue\n", - " \n", - " objectID = objectIDs[row]\n", - " self.objects[objectID] = new_object_locations[col]\n", - " self.lost[objectID] = 0\n", - " \n", - " assignedRows.add(row)\n", - " assignedCols.add(col)\n", - " \n", - " unassignedRows = set(range(0, D.shape[0])).difference(assignedRows)\n", - " unassignedCols = set(range(0, D.shape[1])).difference(assignedCols)\n", - " \n", - " \n", - " if D.shape[0]>=D.shape[1]:\n", - " for row in unassignedRows:\n", - " objectID = objectIDs[row]\n", - " self.lost[objectID] += 1\n", - " \n", - " if self.lost[objectID] > self.maxLost:\n", - " self.removeObject(objectID)\n", - " \n", - " else:\n", - " for col in unassignedCols:\n", - " self.addObject(new_object_locations[col])\n", - " \n", - " return self.objects\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Loading Object Detector Model" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##### Tensorflow model for Object Detection and Tracking\n", - "\n", - "Here, the SSD Object Detection Model is used.\n", - "\n", - "For more details about single shot detection (SSD), refer the following:\n", - " - **Liu, W., Anguelov, D., Erhan, D., Szegedy, C., Reed, S., Fu, C. Y., & Berg, A. C. (2016, October). Ssd: Single shot multibox detector. In European conference on computer vision (pp. 21-37). Springer, Cham.**\n", - " - Research paper link: https://arxiv.org/abs/1512.02325\n", - " - The pretrained model: https://github.com/opencv/opencv/wiki/TensorFlow-Object-Detection-API#use-existing-config-file-for-your-model" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "model_info = {\"config_path\":\"./tensorflow_model_dir/ssd_mobilenet_v2_coco_2018_03_29.pbtxt\",\n", - " \"model_weights_path\":\"./tensorflow_model_dir/ssd_mobilenet_v2_coco_2018_03_29/frozen_inference_graph.pb\",\n", - " \"object_names\": {0: 'background',\n", - " 1: 'person', 2: 'bicycle', 3: 'car', 4: 'motorcycle', 5: 'airplane', 6: 'bus',\n", - " 7: 'train', 8: 'truck', 9: 'boat', 10: 'traffic light', 11: 'fire hydrant',\n", - " 13: 'stop sign', 14: 'parking meter', 15: 'bench', 16: 'bird', 17: 'cat',\n", - " 18: 'dog', 19: 'horse', 20: 'sheep', 21: 'cow', 22: 'elephant', 23: 'bear',\n", - " 24: 'zebra', 25: 'giraffe', 27: 'backpack', 28: 'umbrella', 31: 'handbag',\n", - " 32: 'tie', 33: 'suitcase', 34: 'frisbee', 35: 'skis', 36: 'snowboard',\n", - " 37: 'sports ball', 38: 'kite', 39: 'baseball bat', 40: 'baseball glove',\n", - " 41: 'skateboard', 42: 'surfboard', 43: 'tennis racket', 44: 'bottle',\n", - " 46: 'wine glass', 47: 'cup', 48: 'fork', 49: 'knife', 50: 'spoon',\n", - " 51: 'bowl', 52: 'banana', 53: 'apple', 54: 'sandwich', 55: 'orange',\n", - " 56: 'broccoli', 57: 'carrot', 58: 'hot dog', 59: 'pizza', 60: 'donut',\n", - " 61: 'cake', 62: 'chair', 63: 'couch', 64: 'potted plant', 65: 'bed',\n", - " 67: 'dining table', 70: 'toilet', 72: 'tv', 73: 'laptop', 74: 'mouse',\n", - " 75: 'remote', 76: 'keyboard', 77: 'cell phone', 78: 'microwave', 79: 'oven',\n", - " 80: 'toaster', 81: 'sink', 82: 'refrigerator', 84: 'book', 85: 'clock',\n", - " 86: 'vase', 87: 'scissors', 88: 'teddy bear', 89: 'hair drier', 90: 'toothbrush'},\n", - " \"confidence_threshold\": 0.5,\n", - " \"threshold\": 0.4\n", - " }\n", - "\n", - "net = cv.dnn.readNetFromTensorflow(model_info[\"model_weights_path\"], model_info[\"config_path\"])" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "np.random.seed(12345)\n", - "\n", - "bbox_colors = {key: np.random.randint(0, 255, size=(3,)).tolist() for key in model_info['object_names'].keys()}" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##### Instantiate the Tracker Class" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "maxLost = 5 # maximum number of object losts counted when the object is being tracked\n", - "tracker = Tracker(maxLost = maxLost)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##### Initiate opencv video capture object\n", - "\n", - "The `video_src` can take two values:\n", - "1. If `video_src=0`: OpenCV accesses the camera connected through USB\n", - "2. If `video_src='video_file_path'`: OpenCV will access the video file at the given path (can be MP4, AVI, etc format)" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "video_src = \"./data/video_test5.mp4\"#0\n", - "cap = cv.VideoCapture(video_src)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##### Start object detection and tracking" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Cannot read the video feed.\n" - ] - } - ], - "source": [ - "(H, W) = (None, None) # input image height and width for the network\n", - "writer = None\n", - "while(True):\n", - " \n", - " ok, image = cap.read()\n", - " \n", - " if not ok:\n", - " print(\"Cannot read the video feed.\")\n", - " break\n", - " \n", - " if W is None or H is None: (H, W) = image.shape[:2]\n", - " \n", - " blob = cv.dnn.blobFromImage(image, size=(300, 300), swapRB=True, crop=False)\n", - " net.setInput(blob)\n", - " detections = net.forward()\n", - " \n", - " detections_bbox = [] # bounding box for detections\n", - " \n", - " boxes, confidences, classIDs = [], [], []\n", - " \n", - " for detection in detections[0, 0, :, :]:\n", - " classID = detection[1]\n", - " confidence = detection[2]\n", - "\n", - " if confidence > model_info['confidence_threshold']:\n", - " box = detection[3:7] * np.array([W, H, W, H])\n", - " \n", - " (left, top, right, bottom) = box.astype(\"int\")\n", - " width = right - left + 1\n", - " height = bottom - top + 1\n", - "\n", - " boxes.append([int(left), int(top), int(width), int(height)])\n", - " confidences.append(float(confidence))\n", - " classIDs.append(int(classID))\n", - " \n", - " indices = cv.dnn.NMSBoxes(boxes, confidences, model_info[\"confidence_threshold\"], model_info[\"threshold\"])\n", - " \n", - " if len(indices)>0:\n", - " for i in indices.flatten():\n", - " x, y, w, h = boxes[i][0], boxes[i][1], boxes[i][2], boxes[i][3]\n", - " \n", - " detections_bbox.append((x, y, x+w, y+h))\n", - " \n", - " clr = [int(c) for c in bbox_colors[classIDs[i]]]\n", - " cv.rectangle(image, (x, y), (x+w, y+h), clr, 2)\n", - " \n", - " label = \"{}:{:.4f}\".format(model_info[\"object_names\"][classIDs[i]], confidences[i])\n", - " (label_width, label_height), baseLine = cv.getTextSize(label, cv.FONT_HERSHEY_SIMPLEX, 0.5, 2)\n", - " y_label = max(y, label_height)\n", - " cv.rectangle(image, (x, y_label-label_height),\n", - " (x+label_width, y_label+baseLine), (255, 255, 255), cv.FILLED)\n", - " cv.putText(image, label, (x, y_label), cv.FONT_HERSHEY_SIMPLEX, 0.5, clr, 2)\n", - " \n", - " objects = tracker.update(detections_bbox) # update tracker based on the newly detected objects\n", - " \n", - " for (objectID, centroid) in objects.items():\n", - " text = \"ID {}\".format(objectID)\n", - " cv.putText(image, text, (centroid[0] - 10, centroid[1] - 10), cv.FONT_HERSHEY_SIMPLEX,\n", - " 0.5, (0, 255, 0), 2)\n", - " cv.circle(image, (centroid[0], centroid[1]), 4, (0, 255, 0), -1)\n", - " \n", - " cv.imshow(\"image\", image)\n", - " \n", - " if cv.waitKey(1) & 0xFF == ord('q'):\n", - " break\n", - " \n", - " if writer is None:\n", - " fourcc = cv.VideoWriter_fourcc(*\"MJPG\")\n", - " writer = cv.VideoWriter(\"output.avi\", fourcc, 30, (W, H), True)\n", - " writer.write(image)\n", - "writer.release()\n", - "cap.release()\n", - "cv.destroyWindow(\"image\")" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/tracking-yolo-model.ipynb b/tracking-yolo-model.ipynb deleted file mode 100644 index 68a04d3..0000000 --- a/tracking-yolo-model.ipynb +++ /dev/null @@ -1,334 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "import cv2 as cv\n", - "from scipy.spatial import distance\n", - "import numpy as np\n", - "from collections import OrderedDict" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##### Object Tracking Class" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "class Tracker:\n", - " def __init__(self, maxLost = 30): # maxLost: maximum object lost counted when the object is being tracked\n", - " self.nextObjectID = 0 # ID of next object\n", - " self.objects = OrderedDict() # stores ID:Locations\n", - " self.lost = OrderedDict() # stores ID:Lost_count\n", - " \n", - " self.maxLost = maxLost # maximum number of frames object was not detected.\n", - " \n", - " def addObject(self, new_object_location):\n", - " self.objects[self.nextObjectID] = new_object_location # store new object location\n", - " self.lost[self.nextObjectID] = 0 # initialize frame_counts for when new object is undetected\n", - " \n", - " self.nextObjectID += 1\n", - " \n", - " def removeObject(self, objectID): # remove tracker data after object is lost\n", - " del self.objects[objectID]\n", - " del self.lost[objectID]\n", - " \n", - " @staticmethod\n", - " def getLocation(bounding_box):\n", - " xlt, ylt, xrb, yrb = bounding_box\n", - " return (int((xlt + xrb) / 2.0), int((ylt + yrb) / 2.0))\n", - " \n", - " def update(self, detections):\n", - " \n", - " if len(detections) == 0: # if no object detected in the frame\n", - " lost_ids = list(self.lost.keys())\n", - " for objectID in lost_ids:\n", - " self.lost[objectID] +=1\n", - " if self.lost[objectID] > self.maxLost: self.removeObject(objectID)\n", - " \n", - " return self.objects\n", - " \n", - " new_object_locations = np.zeros((len(detections), 2), dtype=\"int\") # current object locations\n", - " \n", - " for (i, detection) in enumerate(detections): new_object_locations[i] = self.getLocation(detection)\n", - " \n", - " if len(self.objects)==0:\n", - " for i in range(0, len(detections)): self.addObject(new_object_locations[i])\n", - " else:\n", - " objectIDs = list(self.objects.keys())\n", - " previous_object_locations = np.array(list(self.objects.values()))\n", - " \n", - " D = distance.cdist(previous_object_locations, new_object_locations) # pairwise distance between previous and current\n", - " \n", - " row_idx = D.min(axis=1).argsort() # (minimum distance of previous from current).sort_as_per_index\n", - " \n", - " cols_idx = D.argmin(axis=1)[row_idx] # index of minimum distance of previous from current\n", - " \n", - " assignedRows, assignedCols = set(), set()\n", - " \n", - " for (row, col) in zip(row_idx, cols_idx):\n", - " \n", - " if row in assignedRows or col in assignedCols:\n", - " continue\n", - " \n", - " objectID = objectIDs[row]\n", - " self.objects[objectID] = new_object_locations[col]\n", - " self.lost[objectID] = 0\n", - " \n", - " assignedRows.add(row)\n", - " assignedCols.add(col)\n", - " \n", - " unassignedRows = set(range(0, D.shape[0])).difference(assignedRows)\n", - " unassignedCols = set(range(0, D.shape[1])).difference(assignedCols)\n", - " \n", - " \n", - " if D.shape[0]>=D.shape[1]:\n", - " for row in unassignedRows:\n", - " objectID = objectIDs[row]\n", - " self.lost[objectID] += 1\n", - " \n", - " if self.lost[objectID] > self.maxLost:\n", - " self.removeObject(objectID)\n", - " \n", - " else:\n", - " for col in unassignedCols:\n", - " self.addObject(new_object_locations[col])\n", - " \n", - " return self.objects\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Loading Object Detector Model" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##### YOLO Object Detection and Tracking\n", - "\n", - "Here, the YOLO Object Detection Model is used.\n", - "\n", - "The pre-trained model is from following link:\n", - " - Object detection is taken from the following work: \n", - " **Redmon, J., & Farhadi, A. (2018). Yolov3: An incremental improvement. arXiv preprint arXiv:1804.02767.**\n", - " - Research paper for YOLO object detections and its improvement can be found here: https://arxiv.org/abs/1804.02767\n", - " - Refer the following link for more details on the network: https://pjreddie.com/darknet/yolo/\n", - " - The weights and configuration files can be downloaded and stored in a folder.\n", - " - Weights: https://pjreddie.com/media/files/yolov3.weights" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "yolomodel = {\"config_path\":\"./yolo_dir/yolov3.cfg\",\n", - " \"model_weights_path\":\"./yolo_dir/yolov3.weights\",\n", - " \"coco_names\":\"./yolo_dir/coco.names\",\n", - " \"confidence_threshold\": 0.5,\n", - " \"threshold\":0.3\n", - " }\n", - "\n", - "net = cv.dnn.readNetFromDarknet(yolomodel[\"config_path\"], yolomodel[\"model_weights_path\"])\n", - "labels = open(yolomodel[\"coco_names\"]).read().strip().split(\"\\n\")" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['yolo_82', 'yolo_94', 'yolo_106']\n" - ] - } - ], - "source": [ - "np.random.seed(12345)\n", - "layer_names = net.getLayerNames()\n", - "layer_names = [layer_names[i[0]-1] for i in net.getUnconnectedOutLayers()]\n", - "print(layer_names)\n", - "\n", - "bbox_colors = np.random.randint(0, 255, size=(len(labels), 3))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##### Instantiate the Tracker Class" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "maxLost = 5 # maximum number of object losts counted when the object is being tracked\n", - "tracker = Tracker(maxLost = maxLost)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##### Initiate opencv video capture object\n", - "\n", - "The `video_src` can take two values:\n", - "1. If `video_src=0`: OpenCV accesses the camera connected through USB\n", - "2. If `video_src='video_file_path'`: OpenCV will access the video file at the given path (can be MP4, AVI, etc format)" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": {}, - "outputs": [], - "source": [ - "video_src = \"./data/video_test2.mp4\"#0\n", - "cap = cv.VideoCapture(video_src)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##### Start object detection and tracking" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Cannot read the video feed.\n" - ] - } - ], - "source": [ - "(H, W) = (None, None) # input image height and width for the network\n", - "writer = None\n", - "while(True):\n", - " \n", - " ok, image = cap.read()\n", - " \n", - " if not ok:\n", - " print(\"Cannot read the video feed.\")\n", - " break\n", - " \n", - " if W is None or H is None: (H, W) = image.shape[:2]\n", - " \n", - " blob = cv.dnn.blobFromImage(image, 1 / 255.0, (416, 416), swapRB=True, crop=False)\n", - " net.setInput(blob)\n", - " detections_layer = net.forward(layer_names) # detect objects using object detection model\n", - " \n", - " detections_bbox = [] # bounding box for detections\n", - " \n", - " boxes, confidences, classIDs = [], [], []\n", - " for out in detections_layer:\n", - " for detection in out:\n", - " scores = detection[5:]\n", - " classID = np.argmax(scores)\n", - " confidence = scores[classID]\n", - " \n", - " if confidence > yolomodel['confidence_threshold']:\n", - " box = detection[0:4] * np.array([W, H, W, H])\n", - " (centerX, centerY, width, height) = box.astype(\"int\")\n", - " x = int(centerX - (width / 2))\n", - " y = int(centerY - (height / 2))\n", - " \n", - " boxes.append([x, y, int(width), int(height)])\n", - " confidences.append(float(confidence))\n", - " classIDs.append(classID)\n", - " \n", - " idxs = cv.dnn.NMSBoxes(boxes, confidences, yolomodel[\"confidence_threshold\"], yolomodel[\"threshold\"])\n", - " \n", - " if len(idxs)>0:\n", - " for i in idxs.flatten():\n", - " (x, y) = (boxes[i][0], boxes[i][1])\n", - " (w, h) = (boxes[i][2], boxes[i][3])\n", - " detections_bbox.append((x, y, x+w, y+h))\n", - " clr = [int(c) for c in bbox_colors[classIDs[i]]]\n", - " cv.rectangle(image, (x, y), (x+w, y+h), clr, 2)\n", - " cv.putText(image, \"{}: {:.4f}\".format(labels[classIDs[i]], confidences[i]),\n", - " (x, y-5), cv.FONT_HERSHEY_SIMPLEX, 0.5, clr, 2)\n", - " \n", - " objects = tracker.update(detections_bbox) # update tracker based on the newly detected objects\n", - " \n", - " for (objectID, centroid) in objects.items():\n", - " text = \"ID {}\".format(objectID)\n", - " cv.putText(image, text, (centroid[0] - 10, centroid[1] - 10), cv.FONT_HERSHEY_SIMPLEX,\n", - " 0.5, (0, 255, 0), 2)\n", - " cv.circle(image, (centroid[0], centroid[1]), 4, (0, 255, 0), -1)\n", - " \n", - " cv.imshow(\"image\", image)\n", - " \n", - " if cv.waitKey(1) & 0xFF == ord('q'):\n", - " break\n", - " \n", - " if writer is None:\n", - " fourcc = cv.VideoWriter_fourcc(*\"MJPG\")\n", - " writer = cv.VideoWriter(\"output.avi\", fourcc, 30, (W, H), True)\n", - " writer.write(image)\n", - "writer.release()\n", - "cap.release()\n", - "cv.destroyWindow(\"image\")" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -}