Does OpenMv IDE allow the importation of these python libaries?

import requests

import base64

from PIL import Image

from io import BytesIO

project_id = “drive-drowsiness-detection”

model_version = 2

confidence = 0.5

iou_thresh = 0.5

api_key = “”

image_url = “

res =



predictions = res.json()


There’s no PIL module and BytesIO. The other modules have ports, see the documentation. See our Image module for our Image library.

You can use the to_jpeg() in our Image module to convert an image to jpeg. Image objects all have buffer access so you can pass them base64 encoding.