
Linux
令狐傻笑
图像算法工程师,主要研究方向为图像分类,目标检测
展开
-
一个可以接受POST请求的python脚本
"""依赖:pip install ai-hub flask测试用例:model为y=2*x请求数据为json:{"img":3}-----------post请求:curl localhost:8080/tccapi -X POST -d '{"img":3}'返回结果 6"""from ai_hub import inferServerimport jsonclass MyInfer(inferServer): def __init__(self, model):原创 2021-08-17 16:41:47 · 1380 阅读 · 0 评论 -
jetson TX2安装TensorRT
文章目录1. deepstream-l4t镜像1.1 拉取镜像1.2 启动镜像1.3 镜像换源2. 安装软件2.1 软件升级2.2 安装gstreamer2.3 安装opencv3. 安装TensorRT3.1TensorRT安装参考3.2 下载安装包3.3 安装cuda3.4 安装cudnn3.5 安装TensorRT4. 测试安装1. deepstream-l4t镜像1.1 拉取镜像通过以下命令拉取镜像docker pull nvcr.io/nvidia/deepstream-l4t:5.0.1原创 2021-02-05 20:09:50 · 9169 阅读 · 14 评论 -
github同步fork仓库与原作者仓库
github同步fork仓库与原作者仓库1. 查看远程仓库$ git remote -v# List the current remotesorigin https://github.com/user/repo.git (fetch)origin https://github.com/user/repo.git (push)2. 添加远程上游仓库$ git remote add upstream https://github.com/otheruser/repo.git# Set a原创 2020-10-15 19:15:06 · 426 阅读 · 0 评论 -
基于CMakeList.txt文件创建C++动态库及静态库
文章目录基于CMakeList.txt文件创建C++动态库及静态库1. CMakeList.txt文件2. C++文件2.1 MyMathFuncs.h2.2 MyMathFuncs.cpp2.3 main.cpp3.运行基于CMakeList.txt文件创建C++动态库及静态库1. CMakeList.txt文件cmake_minimum_required(VERSION 3.12)project(calculate)set(CMAKE_CXX_STANDARD 14)add_librar原创 2020-09-10 18:03:03 · 3192 阅读 · 0 评论 -
C++使用mutex对多thread进行变量保护
thread可以在C++中创建多线程调用函数,mutex可以对一些公共变量进行保护,代码如下:代码#include <iostream>#include <thread>#include <mutex>std::mutex m;//you can use std::lock_guard if you want to be exception safeint i = 0;void makeACallFromPhoneBooth(){ m.lock原创 2020-09-10 16:29:16 · 1333 阅读 · 0 评论 -
C++ boost生成uuid
C++ boost生成uuid1. CMakeLists.txt文件cmake_minimum_required(VERSION 3.12)project(UUID)set(CMAKE_CXX_STANDARD 14)find_package(Boost REQUIRED)message(STATUS "Find Boost include at ${Boost_INCLUDE_DIRS}")message(STATUS "Find Boost libraries: ${Boost_LIB原创 2020-09-08 11:14:06 · 1360 阅读 · 0 评论 -
【端口映射】配置ssh端口映射
ssh端口映射此手段用于在单向连通网络中进行双向网络打穿适用于未配端口映射的docker容器,不能反向访问的受限网络等一次反向代理在封闭网络内服务器/容器执行以下命令,结果可以使目标服务器通过访问封闭网络内服务器/容器的ssh -fgN -R <port of target machine>:localhost:<port of limited machine> root@<ip of target machine> -p <ssh port>一原创 2020-08-12 10:11:30 · 1468 阅读 · 0 评论 -
Ubuntu xrdp安装配置——使用windows mstsc远程连接
安装步骤apt-get update输入apt-get update安装xubuntu-desktop输入apt-get xubuntu-desktop安装xrdp输入apt-get xrdp输入echo xfce4-session > ~/.xsession重启xrdp服务输入service xrdp restart远程连接windows远程连接在windows系统中使用win+R,输入mstsc,输入远程连接的地址加端口号,输入用户名和密码后,即可连接。...原创 2020-07-16 15:02:01 · 1478 阅读 · 0 评论 -
Ubuntu安装向日葵
1.打开终端输入sudo apt-get install gir1.2-javascriptcoregtk-3.0 libjavascriptcoregtk-3.0-0 libwebkitgtk-3.0-0 -y2.在官网下载向日葵安装包https://sunlogin.oray.com/personal/download/3.在终端输入完成安装sudo dpkg -i SunloginClient-10.0.2.24779_amd64.deb......原创 2020-06-10 22:54:23 · 66972 阅读 · 4 评论 -
C++实现类似python os.listdir功能
#include <string>#include <dirent.h>std::vector<std::string>readFolder(const std::string &image_path){ std::vector<std::string> image_names; auto dir = opendi...原创 2020-03-20 09:57:53 · 1342 阅读 · 3 评论 -
ImportError: libSM.so.6: cannot open shared object file: No such file or directory解决办法
在终端中输入:apt-get install libsm6 libxrender1原创 2020-02-17 10:39:32 · 350 阅读 · 0 评论 -
mv 参数列表过长解决办法
使用find命令在bash中输入以下命令find foo1/ -type f -name '*.jpg' -exec mv {} foo2 \;其中foo2后面需要有空格原创 2020-01-31 14:39:49 · 3016 阅读 · 0 评论 -
Docker启动容器
在终端中输入以下命令:docker run --runtime=nvidia --name=deepstream --privileged --ipc=host -p 6666:22 -itd -v /home/lihan:/home/lihan nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04 /bin/bash或者docker run -...原创 2019-11-05 17:12:20 · 802 阅读 · 0 评论 -
Pycharm ssh远程调试报错: cannot connect to X server的解决方法
使用pycharm远程调试时,cv2.imshow()会报错:cannot connect to X server出现这种错误需要在pycharm中配置ssh远程DISPLAY环境变量。首先在终端中输入:echo $DISPLAY得到远程终端的display number,如下图中的:localhost:11.0然后在pycharm中选择Run->Edit,打开...原创 2019-09-21 09:57:15 · 7308 阅读 · 6 评论