The steps for this recipe are as follows:
-
On your compute device, download the machine learning model files for YOLO:
wget https://pjreddie.com/media/files/yolov3.weights
wget https://raw.githubusercontent.com/microshak/AI_Benchtest_Device/yolov3.txt
wget https://raw.githubusercontent.com/microshak/AI_Benchtest_Device/yolov3.cfg
- Create a CPU folder and create an __init__.py file inside it:
from flask import Flask
cpu = Flask(__name__)
from CPU.Yolo import yolo
from CPU.manifest import manifest
cpu.register_blueprint(yolo)
cpu.register_blueprint(manifest)
- Create a manifest.py file that will send the capabilities of the compute server to a centralized server:
from flask_apscheduler import APScheduler
from flask import Blueprint, request, jsonify, session
import requests
import socket
import json
import os
manifest = Blueprint('manifest','manifest',url_prefix='/manifest')
scheduler = APScheduler()
def set_manifest():
f = open("manifest_cpu...