nmap -sn 192.168.1.0/24
[......]
podman docker配置镜像
备份
cp ./registries.conf ./registries.conf.bk
配置
/etc/containers/registries.conf
unqualified-search-registries = ["docker.io"]
[[registry]]
prefix = "docker.io"
location = "docker.m.daocloud.io"
insecure = true
当前可用镜像:
- docker.m.daocl[......]
深度学习模型判断图片相似度
思路:使用模型的特征提取层,转化成向量,然后比对向量的距离(比如cos)
import torch
import torchvision.models as models
import torchvision.transforms as transforms
from PIL import Image
# load model & feature only
model = models.mobilenet_v3_small(pretrained=True)
mode[......]
MobileNetV3的oxxruntime推理(Python)
import cv2
import numpy as np
import onnxruntime as ort
def load_model(model_path):
"""加载ONNX模型"""
session = ort.InferenceSession(model_path)
return session
def preprocess_image(image_path):
image = cv2.imread(image_path)[......]
MobileNet的onnxruntime推理(C++)
#include <opencv2/opencv.hpp>
#include <onnxruntime/onnxruntime_cxx_api.h>
#include <vector>
#include <iostream>
int main() {
// load onnx model
Ort::Env env(OrtLoggingLevel::ORT_LOGGING_LEVEL_WARNING, "test"[......]