Skip to content

Commit

Permalink
Google Colab enabled notebook with demo reel
Browse files Browse the repository at this point in the history
Demos of https://github.com/OSSDC/OSSDC-VisionAI-Core project

Run this notebook in Google Colab or on your own machine it requires a GPU, see project page for more details

On your Android phone/tablet/media player run the latest OSSDC Vision AI Mobile app, download and install it from here:
https://github.com/OSSDC/OSSDC-VisionAI-Mobile/releases/
  • Loading branch information
mslavescu authored Feb 9, 2021
1 parent f4725ed commit 5ec0e55
Showing 1 changed file with 162 additions and 0 deletions.
162 changes: 162 additions & 0 deletions OSSDC_VisionAI_demo_reel.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"accelerator": "GPU",
"colab": {
"name": "OSSDC-VisionAI-demo-reel.ipynb",
"provenance": [],
"collapsed_sections": []
},
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
}
},
"cells": [
{
"cell_type": "code",
"metadata": {
"id": "OcfOp7TqM94Y"
},
"source": [
"# Demos of https://github.com/OSSDC/OSSDC-VisionAI-Core project\n",
"#\n",
"# Run this notebook in Google Colab or on your own machine it requires a GPU, see project page for more details\n",
"#\n",
"# On your Android phone/tablet/media player run the latest OSSDC Vision AI Mobile app, download and install it from here:\n",
"# https://github.com/OSSDC/OSSDC-VisionAI-Mobile/releases/"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "nrx-vaEQq1P_"
},
"source": [
"!pip install aiortc aiohttp websockets python-engineio==3.14.2 python-socketio[client]==4.6.0 uvloop youtube-dl"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "5x1c7DdmNCl8"
},
"source": [
"!git clone https://github.com/OSSDC/OSSDC-VisionAI-Core"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "sUobb3cWm2bM"
},
"source": [
"!git clone https://github.com/intel-isl/MiDaS"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "suI2LCgDm2eY"
},
"source": [
"!cd MiDaS/; wget https://github.com/intel-isl/MiDaS/releases/download/v2/model-f46da743.pt"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "d8Wkg2Spm2g7"
},
"source": [
"!cd MiDaS/; wget https://github.com/intel-isl/MiDaS/releases/download/v2_1/model-f6b98070.pt"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "qHuxjNHwm2nn"
},
"source": [
"!wget https://github.com/ultralytics/yolov5/archive/v3.1.zip"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "UAffrihVm2qf"
},
"source": [
"!unzip v3.1.zip"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "W52AEq2PzDhy"
},
"source": [
"!ln -s yolov5-3.1 yolo5"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "ZfXoNVsKM4Ta"
},
"source": [
"# Run live realtime demos\n",
"#\n",
"# Start the OSSDC Vision AI Mobile app\n",
"# Update {your-room-name} bellow with the room name you set in the app\n",
"# Run the app and Connect to the room\n",
"# Run one of the cells bellow and see the results in real time on your phone\n",
"\n",
"# Update demo-reel.sh file to run YOLO 5 or MiDaS algorithms"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "xpy9QHe7Mzy7"
},
"source": [
"!cd OSSDC-VisionAI-Core; bash demo-reel.sh {your-room-name} `youtube-dl -f 22 -g https://www.youtube.com/watch?v=dqnjHqwP68Y` #run on a YouTube video stream"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "oLRdYEVrM0E3"
},
"source": [
"!cd OSSDC-VisionAI-Core; bash demo-reel.sh {your-room-name} direct #run on your phone camera video stream"
],
"execution_count": null,
"outputs": []
}
]
}

0 comments on commit 5ec0e55

Please sign in to comment.