This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
import depth_pro | |
import cv2 | |
import torch | |
import numpy as np | |
global depth | |
def click_event(event, x, y, flags, params): | |
# checking for left mouse clicks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import numpy as np | |
import time | |
from rknnpool import rknnPoolExecutor | |
def myFunc(rknn_lite, IMG): | |
outputs = rknn_lite.inference(inputs=[IMG]) | |
return outputs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
sudo apt-get install -y python3 python3-dev python3-pip gcc | |
sudo apt-get install -y python3-opencv | |
sudo apt-get install -y python3-numpy | |
sudo apt-get install git | |
sudo apt-get install wget | |
sudo apt-get install python3-setuptools | |
wget https://github.com/rockchip-linux/rknpu2/raw/master/runtime/RK356X/Linux/librknn_api/aarch64/librknnrt.so | |
sudo mv librknnrt.so /usr/lib/librknnrt.so | |
git clone https://github.com/rockchip-linux/rknn-toolkit2.git |