Giter VIP home page Giter VIP logo

Comments (4)

DefTruth avatar DefTruth commented on May 28, 2024

需要在可执行文件目录下,export LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH

from lite.ai.toolkit.

DefTruth avatar DefTruth commented on May 28, 2024

重新编译一下库,编译案例的时候输出ite.ai.toolkit_LIBS_DIRS:

cmake_minimum_required(VERSION 3.10)
project(lite_yolov5)
set(CMAKE_CXX_STANDARD 17)

set(lite.ai.toolkit_DIR YOUR-PATH-TO/lite.ai.toolkit/build/install)
find_package(lite.ai.toolkit REQUIRED PATHS ${lite.ai.toolkit_DIR})
if (lite.ai.toolkit_Found)
    message(STATUS "lite.ai.toolkit_INCLUDE_DIRS: ${lite.ai.toolkit_INCLUDE_DIRS}")
    message(STATUS "        lite.ai.toolkit_LIBS: ${lite.ai.toolkit_LIBS}")
    message(STATUS "   lite.ai.toolkit_LIBS_DIRS: ${lite.ai.toolkit_LIBS_DIRS}")
endif()
add_executable(lite_yolov5 test_lite_yolov5.cpp)
target_link_libraries(lite_yolov5 ${lite.ai.toolkit_LIBS})

然后把相关的路径export一下即可

from lite.ai.toolkit.

Flamse avatar Flamse commented on May 28, 2024

感谢,模型已经成功加载并计算完成。提几个点:

  1. 模型和图片地址根据需要修改
  std::string onnx_path = "../../../../examples/hub/onnx/cv/yolov5s.onnx";
  // ...
  1. 项目对模型输入做了规范,下载项目给出的模型可以完成测试,其他资源处下载的模型可以使用Python对onnx模型文件的输入格式进行修改
terminate called after throwing an instance of 'Ort::Exception'
  what():  Unexpected input data type. Actual: (tensor(float)) , expected: (tensor(float16))
  1. 该项目支持GPU计算吗?

from lite.ai.toolkit.

DefTruth avatar DefTruth commented on May 28, 2024

GPU后续版本会继续支持。也可以通过修改依赖库和lite.ai.toolkit的源码加支持,很好改。

from lite.ai.toolkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.