{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Video summary and visual question answering" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import ammico" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Currently this module supports only video summarization, but it will be updated in the nearest future" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "video_dict = ammico.find_videos(\n", " path=str(\"/insert/your/path/here/\"), # path to the folder with images\n", " limit=-1, # -1 means no limit on the number of files, by default it is set to 20\n", ")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "model = ammico.MultimodalSummaryModel()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "vid_summary_model = ammico.VideoSummaryDetector(summary_model=model, subdict=video_dict)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "summary_dict = vid_summary_model.analyse_video()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "summary_dict[\"summary\"]" ] } ], "metadata": { "kernelspec": { "display_name": "ammico-dev", "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.11.13" } }, "nbformat": 4, "nbformat_minor": 2 }