{ "cells": [ { "cell_type": "code", "execution_count": null, "id": "295b7519", "metadata": { "tags": [ "remove-cell" ] }, "outputs": [], "source": [ "%matplotlib inline\n", "\n", "import IPython\n", "\n", "import openpifpaf\n", "openpifpaf.show.Canvas.show = True" ] }, { "cell_type": "markdown", "id": "507ff862", "metadata": {}, "source": [ "# Extras\n", "\n", "Testing output with backbones from the `openpifpaf-extras` package (install with `pip3 install openpifpaf-extras`)." ] }, { "cell_type": "markdown", "id": "9af39c74", "metadata": {}, "source": [ "## Prediction\n", "\n", "Here, we try the pre-trained `swin_s` model." ] }, { "cell_type": "code", "execution_count": null, "id": "c48bff6f", "metadata": {}, "outputs": [], "source": [ "%%bash\n", "python -m openpifpaf.predict coco/000000081988.jpg --checkpoint=swin_s --decoder=cifcaf:0 --image-output=coco/000000081988.jpg.swin_s.predictions.jpeg" ] }, { "cell_type": "code", "execution_count": null, "id": "9cf35743", "metadata": {}, "outputs": [], "source": [ "IPython.display.Image('coco/000000081988.jpg.swin_s.predictions.jpeg')" ] }, { "cell_type": "code", "execution_count": null, "id": "c77588ff", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.7.10" } }, "nbformat": 4, "nbformat_minor": 5 }