Giter Club home page Giter Club logo

libcoral's People

Contributors

dmitriykovalev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libcoral's Issues

Building and Running libcoral examples

Description

I was successfully able to build the libcoral examples but when I try running them I get an error that one of the model files is missing. How should I go about solving this?

Click to expand!

Issue Type

Bug

Operating System

Mac OS

Coral Device

No response

Other Devices

No response

Programming Language

C++

Relevant Log Output

ERROR: Could not open 'mobilenet_v1_1.0_224_quant_edgetpu.tflite'. 
WARNING: Logging before InitGoogleLogging() is written to STDERR
F20221027 09:20:25.676702 161830400 tflite_utils.h:242] Check failed: 'tflite::FlatBufferModel::BuildFromFile(path.c_str())' Must be non NULL 
*** Check failure stack trace: ***
[1]    13657 abort      ./classify_image

How to use build artifacts from docker build

Hi,

I'm building libcoral for the xavier nx platform. Since I had no luck in building it directly on the xavier I choosed to do cross compilation on my host computer with the docker build:

make DOCKER_IMAGE=ubuntu:18.04 DOCKER_CPUS="k8 armv7a aarch64" DOCKER_TARGETS=tests docker-build

After the build finishes I would like to transfer the library libcoral to the xavier from the docker image. How do I do that and where is the library exactly ?

Thanks
Alexander

Libcoral C++ on WSL2 Debian Bullseye

Description

image
I've recently made an attempt to run the libcoral examples on C++ with no success. This is the error message I get. Am I supposed to use an older version of Bazel? I'm using Bazelisk, if that matters.

Click to expand!

Issue Type

No response

Operating System

Linux

Coral Device

USB Accelerator

Other Devices

No response

Programming Language

C++

Relevant Log Output

No response

Compile natively on ARM?

I'm wondering if this repo can support native compile on ARM system, such as Raspberry Pi? I want to use libcoral with some middleware which I'm not sure if it can be cross-compiled or not. Thank you.

Example only accepts fixed size input and not detection example?

I was trying these C++ api and examples and realized that there's no example that uses detection model? But there is one in pycoral repository.

Besides, I also noticed the example only accepts fixed size input. However, in the test framework it does accept variable size input and has a resize function. I'm wondering why those useful functions are only in the test_utils but not tflite_utils? I have created a detection example that takes bmp files by copying those resize functions to tflite_utils as well. But not sure if this is the desired implementation.

examples build error

Hi, I'm trying to build the examples from libcoral directory, on Ubuntu 20.04, Docker version 19.03.12, build 48a66213fe:
sudo make DOCKER_IMAGE=debian:stretch DOCKER_CPUS="aarch64" DOCKER_TARGETS="examples" docker-build
Fails on final step: ERROR: no such package '@libedgetpu//
Please see step 13 output below:

Step 13/13 : RUN wget -O /bazel https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh && bash /bazel && rm -f /bazel
---> Using cache
---> 42243aca8920
Successfully built 42243aca8920
Successfully tagged coral-edgetpu-debian-stretch:latest
docker run --rm -i --tty -v /home/jthoms/coral/libcoral/:/workspace
"coral-edgetpu-debian-stretch" /bin/bash -c "chmod a+w /; groupadd --gid 0 root; useradd -m -e '' -s /bin/bash --gid 0 --uid 0 root; echo 'root ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers; su root -c 'for cpu in aarch64; do make CPU=${cpu} COMPILATION_MODE=opt -C /workspace/ examples || exit 1; done'"
groupadd: group 'root' already exists
useradd: user 'root' already exists
make: Entering directory '/workspace'
bazel build --compilation_mode=opt --copt=-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION --verbose_failures --sandbox_debug --subcommands --define PY3_VER=35 --action_env PYTHON_BIN_PATH=/usr/bin/python3 --cpu=aarch64 --define darwinn_portable=1 --experimental_repo_remote_exec --crosstool_top=@crosstool//:toolchains --compiler=gcc --linkopt=-l:libusb-1.0.so --linkopt=-Wl,--strip-all --copt=-ffp-contract=off //coral/examples:two_models_one_tpu
//coral/examples:two_models_two_tpus_threaded
//coral/examples:model_pipelining
//coral/examples:classify_image
//coral/examples:backprop_last_layer
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
ERROR: no such package '@libedgetpu//': In new_local_repository rule //external:libedgetpu the 'build_file' attribute does not specify an existing file (/workspace/libedgetpu/BUILD does not exist)
INFO: Elapsed time: 4.080s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
Makefile:121: recipe for target 'examples' failed
make: *** [examples] Error 1
make: Leaving directory '/workspace'
make: *** [/home/jthoms/coral/libcoral/docker/docker.mk:40: docker-build] Error 1

failed to install on Raspbian

Hi Team,

I'm trying to run libcoral on my Raspberry pi 3, but facing a problem as bellow when I run make, which shows '@crosstool//:toolchains' does not contain a toolchain for cpu 'arm' and compiler 'gcc'. Do you have any suggestions that how could I fix it?

pi@raspberrypi:~/Documents/libcoral $ make CPU=armv7a
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
bazel build --compilation_mode=opt --copt=-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION --verbose_failures --sandbox_debug --subcommands --define PY3_VER=37 --action_env PYTHON_BIN_PATH=/usr/bin/python3 --cpu=armv7a --define darwinn_portable=1 --experimental_repo_remote_exec --crosstool_top=@crosstool//:toolchains --compiler=gcc --linkopt=-l:libusb-1.0.so --linkopt=-Wl,--strip-all --copt=-ffp-contract=off //coral/tools/partitioner:utils_test //coral/tools/partitioner:profiling_partition_util_test //coral/tools/partitioner:partitioner_test //coral/tools:tflite_graph_util_test //coral/posenet:posenet_decoder_test //coral/posenet:models_test //coral/posenet:bodypix_test //coral/pipeline/internal:segment_runner_test //coral/pipeline/internal:memory_pool_allocator_test //coral/pipeline:pipelined_model_runner_test //coral/pipeline:models_test //coral/learn/backprop:test_utils_test //coral/learn/backprop:softmax_regression_model_test //coral/learn/backprop:multi_variate_normal_distribution_test //coral/learn/backprop:layers_test //coral/learn:utils_test //coral/learn:imprinting_engine_test //coral/dmabuf:model_pipelining_dmabuf_devboard_test //coral/dmabuf:dmabuf_devboard_test //coral/detection:models_test //coral/detection:adapter_test //coral/classification:classification_models_test //coral/classification:adapter_test //coral:tflite_utils_test //coral:test_utils_test //coral:segmentation_models_test //coral:multiple_tpus_inference_stress_test //coral:model_loading_stress_test //coral:inference_stress_test //coral:inference_repeatability_test //coral:error_reporter_test //coral:bbox_test
INFO: Build options --copt and --cpu have changed, discarding analysis cache.
ERROR: /home/pi/.cache/bazel/_bazel_pi/78149e2552c3429b44adc0dfc1352491/external/crosstool/BUILD:24:19: in cc_toolchain_suite rule @crosstool//:toolchains: cc_toolchain_suite '@crosstool//:toolchains' does not contain a toolchain for cpu 'arm' and compiler 'gcc'.
ERROR: Analysis of target '//coral/tools/partitioner:partitioner_test' failed; build aborted: Analysis of target '@crosstool//:toolchains' failed
INFO: Elapsed time: 21.868s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (17 packages loaded, 80 targets configured)
make: *** [Makefile:99: tests] Error 1

System information:

Operating System: Raspbian GNU/Linux 10 (buster)
Kernel: Linux 4.14.98-v7
Architecture: arm
uname -m: armv7l
openjdk version "11.0.9.1" 2020-11-04
bazel: 2.0.0, 3.1.0, 3.7.2, all failed

Before running make, I also cannot run

sudo apt-get install -y crossbuild-essential-arm64 \
                        libpython3-dev:arm64 \
                        libusb-1.0-0-dev:arm64

which shows errors:

E: gcc-aarch64-linux-gnu (>= 4:8.3) but it is not installable or
                                       gcc:arm64 but it is not installable`
E: Unable to locate package libpython3-dev:arm64
E: Unable to locate package libusb-1.0-0-dev:arm64

I also tried Docker, but this raspbian has problems when installing Docker. So I wonder which is the better way to have libcoral on
Raspbian GNU/Linux 10 (buster) on a Raspberry pi 3?

Best,
Fan

profiling_based_partitioner doesn't divide evenly the time of the segments.

Description

The diff_threshold_ns that is profiling_based_partitioner's option is not working well.

It doesn't compare the difference (in ns) between the slowest segment (upper bound) and the fastest segment (lower bound).
But it compares last_segment_latency and target_latency.

So I was able to get the result with the slowest segment is too slow and the fastest segment is speedy.

Maybe the source code(last_segment_latency - target_latency) should be changed.

Click to expand!

Issue Type

Bug

Operating System

Mendel Linux, Linux

Coral Device

M.2 Accelerator with dual Edge TPU

Other Devices

No response

Programming Language

C++

Relevant Log Output

segment latencies
[1.4403, 1.3686, 0.354, 0.161]  # difference is bigger than 1ms
[1.2178, 1.3376, 0.9702, 0.0683, 0.1601]
[1.1891, 1.3306, 0.8717, 0.1092, 0.0511, 0.1604]
[2.9966, 6.0864]  # difference is so big!
[2.6992, 1.9771, 2.9165]
[2.5653, 1.9029, 1.7592, 1.1261]
[2.3772, 1.5753, 1.7227, 1.4968, 0.6235]

Hard coded posenet custom add functionality in MakeEdgeTpuInterpreter

When I follow the code for the classify_image example, it setups the interpreter here:
https://github.com/google-coral/libcoral/blob/master/coral/examples/classify_image.cc#L35

As far as I can see, that results in a call to tflite_utils MakeEdgeTpuInterpreter. Why does that function add custom operations related to the pose net? That shouldn't be necessary when doing image classification:
https://github.com/google-coral/libcoral/blob/master/coral/tflite_utils.cc#L72

Of course, I might have misunderstood how this is supposed to work.

libcoral C++ Build on Ubuntu 22.10

Description

Hi,
Just cloned the repo, and trying to compile libcoral. I was initially getting a complaint from Bazel 6.x.x about some errors in the build script but once I downgraded to Bazel 4.0.0, I am getting a Python error.

Please note the error message after running sudo apt install command as well. It was copy/pasted from libcoral's readme file.

Click to expand!

Issue Type

Build/Install, Documentation Bug

Operating System

Ubuntu

Coral Device

USB Accelerator

Other Devices

No response

Programming Language

C++

Relevant Log Output

iman@iman-ubuntu-vm:~/libcoral$ sudo sudo dpkg --add-architecture armhf && sudo dpkg --add-architecture arm64 && sudo apt -y install build-essential libpython3-dev libusb-1.0-0-dev crossbuild-essential-armhf libpython3-dev:armhf libusb-1.0-0-dev:armhf crossbuild-essential-arm64 libpython3-dev:arm64 libusb-1.0-0-dev:arm64
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package libpython3-dev:armhf
E: Unable to locate package libusb-1.0-0-dev:armhf
E: Couldn't find any package by glob 'libusb-1.0-0-dev'
E: Unable to locate package libpython3-dev:arm64
E: Unable to locate package libusb-1.0-0-dev:arm64
E: Couldn't find any package by glob 'libusb-1.0-0-dev'
iman@iman-ubuntu-vm:~/libcoral$ make
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
bazel build --compilation_mode=opt --cpu=k8 //coral/tools/partitioner:utils_test //coral/tools/partitioner:profiling_based_partitioner_test //coral/tools/partitioner:profiling_based_partitioner_ondevice_test //coral/tools/partitioner:parameter_count_based_partitioner_test //coral/tools:tflite_graph_util_test //coral/tools:automl_model_append_rnn_link_test //coral/pose_estimation:posenet_test //coral/pose_estimation:posenet_decoder_test //coral/pose_estimation:movenet_test //coral/pose_estimation:bodypix_test //coral/pipeline/internal:segment_runner_test //coral/pipeline/internal:memory_pool_allocator_test //coral/pipeline:pipelined_model_runner_test //coral/pipeline:models_test //coral/pipeline:detection_models_test //coral/learn/backprop:test_utils_test //coral/learn/backprop:softmax_regression_model_test //coral/learn/backprop:multi_variate_normal_distribution_test //coral/learn/backprop:layers_test //coral/learn:utils_test //coral/learn:imprinting_engine_test //coral/dmabuf:model_pipelining_dmabuf_devboard_test //coral/dmabuf:dmabuf_devboard_test //coral/detection:models_test //coral/detection:adapter_test //coral/classification:lstm_mnist_models_test //coral/classification:cocompiled_classification_models_test //coral/classification:classification_models_test //coral/classification:adapter_test //coral:tflite_utils_test //coral:test_utils_test //coral:segmentation_models_test //coral:multiple_tpus_inference_stress_test //coral:model_loading_stress_test //coral:inference_stress_test //coral:inference_repeatability_test //coral:error_reporter_test //coral:bbox_test
INFO: Repository local_execution_config_python instantiated at:
  /home/iman/libcoral/WORKSPACE:31:14: in <toplevel>
  /home/iman/.cache/bazel/_bazel_iman/cd2872ec21a7aff33f91821ecfd6c464/external/org_tensorflow/tensorflow/workspace2.bzl:1108:19: in workspace
  /home/iman/.cache/bazel/_bazel_iman/cd2872ec21a7aff33f91821ecfd6c464/external/org_tensorflow/tensorflow/workspace2.bzl:84:27: in _tf_toolchains
  /home/iman/.cache/bazel/_bazel_iman/cd2872ec21a7aff33f91821ecfd6c464/external/tf_toolchains/toolchains/remote_config/configs.bzl:6:28: in initialize_rbe_configs
  /home/iman/.cache/bazel/_bazel_iman/cd2872ec21a7aff33f91821ecfd6c464/external/tf_toolchains/toolchains/remote_config/rbe_config.bzl:158:27: in _tensorflow_local_config
Repository rule local_python_configure defined at:
  /home/iman/.cache/bazel/_bazel_iman/cd2872ec21a7aff33f91821ecfd6c464/external/org_tensorflow/third_party/py/python_configure.bzl:275:41: in <toplevel>
ERROR: An error occurred during the fetch of repository 'local_execution_config_python':
   Traceback (most recent call last):
        File "/home/iman/.cache/bazel/_bazel_iman/cd2872ec21a7aff33f91821ecfd6c464/external/org_tensorflow/third_party/py/python_configure.bzl", line 212, column 41, in _create_local_python_repository
                python_include = _get_python_include(repository_ctx, python_bin)
        File "/home/iman/.cache/bazel/_bazel_iman/cd2872ec21a7aff33f91821ecfd6c464/external/org_tensorflow/third_party/py/python_configure.bzl", line 152, column 21, in _get_python_include
                result = execute(
        File "/home/iman/.cache/bazel/_bazel_iman/cd2872ec21a7aff33f91821ecfd6c464/external/org_tensorflow/third_party/remote_config/common.bzl", line 219, column 13, in execute
                fail(
Error in fail: Problem getting python include path.
<string>:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: cannot import name 'sysconfig' from 'distutils' (/usr/lib/python3.10/distutils/__init__.py)
Is the Python binary path set up right? (See ./configure or PYTHON_BIN_PATH.) Is distutils installed?
ERROR: Error fetching repository: Traceback (most recent call last):
        File "/home/iman/.cache/bazel/_bazel_iman/cd2872ec21a7aff33f91821ecfd6c464/external/org_tensorflow/third_party/py/python_configure.bzl", line 212, column 41, in _create_local_python_repository
                python_include = _get_python_include(repository_ctx, python_bin)
        File "/home/iman/.cache/bazel/_bazel_iman/cd2872ec21a7aff33f91821ecfd6c464/external/org_tensorflow/third_party/py/python_configure.bzl", line 152, column 21, in _get_python_include
                result = execute(
        File "/home/iman/.cache/bazel/_bazel_iman/cd2872ec21a7aff33f91821ecfd6c464/external/org_tensorflow/third_party/remote_config/common.bzl", line 219, column 13, in execute
                fail(
Error in fail: Problem getting python include path.
<string>:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: cannot import name 'sysconfig' from 'distutils' (/usr/lib/python3.10/distutils/__init__.py)
Is the Python binary path set up right? (See ./configure or PYTHON_BIN_PATH.) Is distutils installed?
ERROR: Analysis of target '//coral/tools/partitioner:utils_test' failed; build aborted: Problem getting python include path.
<string>:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: cannot import name 'sysconfig' from 'distutils' (/usr/lib/python3.10/distutils/__init__.py)
Is the Python binary path set up right? (See ./configure or PYTHON_BIN_PATH.) Is distutils installed?
INFO: Elapsed time: 0.520s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded, 0 targets configured)
make: *** [Makefile:75: tests] Error 1
iman@iman-ubuntu-vm:~/libcoral$

When pipeline the model, how to parse the detection results?

Hi,

I am trying to parse the pipeline detection result using efficientdet_lite2_448_ptq.tflite.

I can not find any hint around the line 211 below,
https://github.com/google-coral/libcoral/blob/master/coral/examples/model_pipelining.cc
Which looks like just get the result and then dispose them without parsing the results. The definition of coral::PipelineTensor does not help because I do not know the underlying data structure of Buffer* buffer.

I can figure out how to parse the result for a single TPU inference, by reference the code below, after line 104:
https://github.com/google-coral/demo-manufacturing/blob/main/src/inference_wrapper.cc

Can you please give a hint or a reference code to figure out how to parse the pipeline detection results?

Thank you in advance
Tyouritsugun

Where is the linked library?

Hi

I want to use the static or dynamic library of libcoral. However, I can not find any *.a or *.so in the out directory after I built this project within the docker build. Can anyone help me find the output *.a or *.so?

Zhang

Compiling Libcoral C++ for Raspberry Bullseye x64

Description

Greetings, I am trying to build the C++ libcoral for the Bullseye OS on a Raspberry Pi 4B and the tutorial offered here: https://github.com/google-coral/libcoral seems to not be working.

When I do make examples I get the following output:

make examples
bazel build --compilation_mode=opt --cpu=k8 //coral/examples:two_models_one_tpu \
                                 //coral/examples:two_models_two_tpus_threaded \
                                 //coral/examples:model_pipelining \
                                 //coral/examples:classify_image \
                                 //coral/examples:backprop_last_layer
/bin/bash: linha 1: bazel: comando não encontrado
make: *** [Makefile:99: examples] Erro 127

I wonder if libcoral is compatible with a Bullseye x64?

Click to expand!

Issue Type

Build/Install

Operating System

Linux

Coral Device

No response

Other Devices

Rapsberry Pi 4

Programming Language

C++

Relevant Log Output

No response

Fail to build due to "missing dependency declarations"

I run into errors when trying to cross-compile libcoral with "make CPU=aarch64 all".

Hardware: Raspberry Pi 4
OS: Ubuntu 20.04.2 LTS (focal)
Architecture: 64-bit aarch64
GCC version: 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
Bazel version: 4.0.0

ERROR: /home/ubuntu/.cache/bazel/_bazel_ubuntu/5ba4c4366753ce2739652ff638356e7a/external/flatbuffers/src/BUILD:40:11: Compiling src/flatc_main.cpp [for host] failed: undeclared inclusion(s) in rule '@flatbuffers//src:flatc': this rule is missing dependency declarations for the following files included by 'src/flatc_main.cpp': '/usr/lib/gcc/aarch64-linux-gnu/9/include/stddef.h' '/usr/lib/gcc/aarch64-linux-gnu/9/include/stdarg.h' '/usr/lib/gcc/aarch64-linux-gnu/9/include/stdint.h'

The header-files mentioned does exist at the given path.

I have tried to clear Bazel with "bazel clean --expunge" and "rm -rf ~/.cache/bazel". I've also tried to add "--action_env CPLUS_INCLUDE_PATH=/usr/lib/gcc/aarch64-linux-gnu/9/include" to BAZEL_BUILD_FLAGS in the makefile.

I'm stuck. Any help would be much appreciated!

how to install the compile lib

Description

Hello,

I succeed to make inference using python on the coral TPU on my own model. However I would like use the C++ API for performance issue. The coral website give example and some indication , I compile the library on my mac and then ? There is no target make install or any indication of which files I should copy between my mac and the TPU. I need tflite (include and lib), the runtime edgtpu and maybe something else.

So does somebody could indicate me which files I should copy to the TPU ? A update of the README will be very nice too.

Thank you

Click to expand!

Issue Type

Support

Operating System

Mac OS

Coral Device

Dev Board Mini

Other Devices

No response

Programming Language

C++

Relevant Log Output

No response

"posenet_decoder" for Windows

Description

Hello.

I have been looking for the DLL version of posenet_decoder for Windows but since I couldn't find it online, I decided to build it using bazel.
Added this section to coral/pose_estimation/BUILD

cc_binary(
    name = "posenet_decoder.dll",
    srcs = ["posenet_decoder_tflite_plugin.cc"],
    linkopts = [
          "-Wl,@rpath/posenet_decoder.dll",
    ],
    linkshared = 1,
    deps = [
        ":posenet_decoder_op",
        "@org_tensorflow//tensorflow/lite:kernel_api",
        "@org_tensorflow//tensorflow/lite:util",
    ],
)

It gives me a DLL file but I cannot load it with load_delegate and getting this error:

Traceback (most recent call last):
  File ".\coral.py", line 32, in <module>
    posenet_decoder_delegate = load_delegate(posenet_shared_lib)
  File "C:\Python37\lib\site-packages\tflite_runtime\interpreter.py", line 160, in load_delegate
    delegate = Delegate(library, options)
  File "C:\Python37\lib\site-packages\tflite_runtime\interpreter.py", line 93, in __init__      
    ctypes.CFUNCTYPE(None, ctypes.c_char_p)
  File "C:\Python37\lib\ctypes\__init__.py", line 377, in __getattr__
    func = self.__getitem__(name)
  File "C:\Python37\lib\ctypes\__init__.py", line 382, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'tflite_plugin_create_delegate' not found
Exception ignored in: <function Delegate.__del__ at 0x000001BCCA7268B8>
Traceback (most recent call last):
  File "C:\Python37\lib\site-packages\tflite_runtime\interpreter.py", line 125, in __del__      
    self._library.tflite_plugin_destroy_delegate.argtypes = [ctypes.c_void_p]
  File "C:\Python37\lib\ctypes\__init__.py", line 377, in __getattr__
    func = self.__getitem__(name)
  File "C:\Python37\lib\ctypes\__init__.py", line 382, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'tflite_plugin_destroy_delegate' not found

Any idea how I could solve this issue?

Click to expand!

Issue Type

Support, Feature Request

Operating System

Windows 10

Coral Device

USB Accelerator

Other Devices

No response

Programming Language

Python 3.7

Relevant Log Output

No response

make tests error glib.h not found on Ubuntu 20.04 (Windows 10 WSL)

coral/dmabuf/model_pipelining_dmabuf_devboard_test.cc:7:10: fatal error: glib.h: No such file or directory

glib.h found in:
ibglib2.0-dev: /usr/include/glib-2.0/glib.h
libhiredis-dev: /usr/include/hiredis/adapters/glib.h
syslog-ng-dev: /usr/include/syslog-ng/compat/glib.h

make benchmarks, make examples and make tools build successfully.

Libcoral C++ for Debian Bullseye

Hi, I previously opened a separate issue with running Libcoral on WSL. This time around, I ran Libcoral on a Debian PC and I'm still getting the same error:

ERROR: Error fetching repository: java.io.IOException: The repository's path is "/usr/system_libs" (absolute: "/usr/system_libs") but this directory does not exist. INFO: Repository com_google_absl instantiated at: LBCRL_DIR/WORKSPACE:31:14: in <toplevel> BZL_DIR/e3e5f1aba83d2e2477952332a9699ae6/external/org_tensorflow/tensorflow/workspace2.bzl:1111:28: in workspace BZL_DIR/e3e5f1aba83d2e2477952332a9699ae6/external/org_tensorflow/tensorflow/workspace2.bzl:55:9: in _initialize_third_party BZL_DIR/e3e5f1aba83d2e2477952332a9699ae6/external/org_tensorflow/third_party/absl/workspace.bzl:12:20: in repo BZL_DIR/e3e5f1aba83d2e2477952332a9699ae6/external/org_tensorflow/third_party/repo.bzl:112:21: in tf_http_archive Repository rule _tf_http_archive defined at: BZL_DIR/e3e5f1aba83d2e2477952332a9699ae6/external/org_tensorflow/third_party/repo.bzl:65:35: in <toplevel> INFO: Repository flatbuffers instantiated at: LBCRL_DIR/WORKSPACE:31:14: in <toplevel> BZL_DIR/e3e5f1aba83d2e2477952332a9699ae6/external/org_tensorflow/tensorflow/workspace2.bzl:1111:28: in workspace BZL_DIR/e3e5f1aba83d2e2477952332a9699ae6/external/org_tensorflow/tensorflow/workspace2.bzl:62:16: in _initialize_third_party BZL_DIR/e3e5f1aba83d2e2477952332a9699ae6/external/org_tensorflow/third_party/flatbuffers/workspace.bzl:6:20: in repo BZL_DIR/e3e5f1aba83d2e2477952332a9699ae6/external/org_tensorflow/third_party/repo.bzl:112:21: in tf_http_archive Repository rule _tf_http_archive defined at: BZL_DIR/e3e5f1aba83d2e2477952332a9699ae6/external/org_tensorflow/third_party/repo.bzl:65:35: in <toplevel> INFO: Repository com_google_googletest instantiated at: LBCRL_DIR/WORKSPACE:31:14: in <toplevel> BZL_DIR/e3e5f1aba83d2e2477952332a9699ae6/external/org_tensorflow/tensorflow/workspace2.bzl:1118:21: in workspace BZL_DIR/e3e5f1aba83d2e2477952332a9699ae6/external/org_tensorflow/tensorflow/workspace2.bzl:590:20: in _tf_repositories BZL_DIR/e3e5f1aba83d2e2477952332a9699ae6/external/org_tensorflow/third_party/repo.bzl:112:21: in tf_http_archive Repository rule _tf_http_archive defined at: BZL_DIR/e3e5f1aba83d2e2477952332a9699ae6/external/org_tensorflow/third_party/repo.bzl:65:35: in <toplevel> ERROR: LBCRL_DIR/coral/dmabuf/BUILD:21:8: //coral/dmabuf:dmabuf_devboard_test depends on @system_linux//:gstallocators in repository @system_linux which failed to fetch. no such package '@system_linux//': The repository's path is "/usr/system_libs" (absolute: "/usr/system_libs") but this directory does not exist. ERROR: LBCRL_DIR/coral/dmabuf/BUILD:21:8: //coral/dmabuf:dmabuf_devboard_test depends on @system_linux//:gstreamer in repository @system_linux which failed to fetch. no such package '@system_linux//': The repository's path is "/usr/system_libs" (absolute: "/usr/system_libs") but this directory does not exist. ERROR: Analysis of target '//coral/dmabuf:dmabuf_devboard_test' failed; build aborted: Analysis failed INFO: Elapsed time: 27.522s INFO: 0 processes. FAILED: Build did NOT complete successfully (10 packages loaded, 101 targets configured) currently loading: @libedgetpu//tflite/public Fetching @crosstool; fetching Fetching @test_data; Restarting. Fetching @local_config_cc; Restarting. make: *** [Makefile:75: tests] Error 1

I'm running Debian Bullseye on an AMD64 machine this time.

libcoral on macOS ventura

Description

forgive me but I ask it ... how to compile this?

Click to expand!

Issue Type

Build/Install

Operating System

Mac OS

Coral Device

USB Accelerator

Other Devices

No response

Programming Language

C++

Relevant Log Output

Loading: 0 packages loaded
Loading: 0 packages loaded
bazel build --compilation_mode=opt --cpu=darwin //coral:bbox_test //coral:error_reporter_test //coral:inference_repeatability_test //coral:inference_stress_test //coral:model_loading_stress_test //coral:multiple_tpus_inference_stress_test //coral:segmentation_models_test //coral:test_utils_test //coral:tflite_utils_test //coral/classification:adapter_test //coral/classification:classification_models_test //coral/classification:cocompiled_classification_models_test //coral/classification:lstm_mnist_models_test //coral/detection:adapter_test //coral/detection:models_test //coral/learn:imprinting_engine_test //coral/learn:utils_test //coral/learn/backprop:layers_test //coral/learn/backprop:multi_variate_normal_distribution_test //coral/learn/backprop:softmax_regression_model_test //coral/learn/backprop:test_utils_test //coral/pipeline:detection_models_test //coral/pipeline:models_test //coral/pipeline:pipelined_model_runner_test //coral/pipeline/internal:memory_pool_allocator_test //coral/pipeline/internal:segment_runner_test //coral/pose_estimation:bodypix_test //coral/pose_estimation:movenet_test //coral/pose_estimation:posenet_decoder_test //coral/pose_estimation:posenet_test //coral/tools:automl_model_append_rnn_link_test //coral/tools:tflite_graph_util_test //coral/tools/partitioner:parameter_count_based_partitioner_test //coral/tools/partitioner:profiling_based_partitioner_ondevice_test //coral/tools/partitioner:profiling_based_partitioner_test //coral/tools/partitioner:utils_test
ERROR: /Users/smiril/coral/libcoral/coral/BUILD:264:8: no such package '@com_google_googletest//': The repository '@com_google_googletest' could not be resolved: Repository '@com_google_googletest' is not defined and referenced by '//coral:inference_repeatability_test'
ERROR: Analysis of target '//coral:inference_repeatability_test' failed; build aborted: Analysis failed
INFO: Elapsed time: 0,083s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets conf\
igured)
make: *** [tests] Error 1

Transfer Learning for Object Detection

Description

Hi,

I would like to ask if there is also a possibility to use transfer learning to retrain an object detection model like it is implemented for image classification?

I would appreciate if you could give me some hints.

Click to expand!

Issue Type

Support

Operating System

No response

Coral Device

USB Accelerator

Other Devices

No response

Programming Language

C++

Relevant Log Output

No response

PCIe Error

Hi Guys,

i'm trying to setup coral PCIe devices in Windows 10 and getting an error as follows:

image

I'm using a LattePanda Alpha with Windows 10 onside.
As devices i'm using one USB and two PCIe devices..
USB is running fine.

In Python all is working fine and i'm able to run all of this devices and switch between them, but in c++ i didn't have success.
Maybe someone else got this issue also?

thanks a lot

build error about bazel

Hi,
I'm trying to install and make this repository.
I following the instructions by simply git clone and do make with bazel involved internally.
However, I got this error message:

ERROR: ~/libcoral/coral/dmabuf/BUILD:7:1: //coral/dmabuf:dmabuf_devboard_test depends on
@system_linux//:gstallocators in repository @system_linux which failed to fetch. no such package
'@system_linux//': The repository's path is "/usr/system_libs" (absolute: "/usr/system_libs") but this directory does
not exist.

I'm using linux x86 CPU.
How can I address this issue? I'm not sure if minimum bazel version is required, my bazel version is 2.0.0.

CMake Support

For linux C++ systems a cmake integration would be useful.

For example, i would like to be able to find_package:

cmake_minimum_required(VERSION 3.5)
project(example_coral_cpp)

find_package(libcoral REQUIRED)

This should give access to the library and header files in my CMakeLists.txt

Transfer Learning with back propagation with tfilte model

Description

Is it possible to also retrain a pure tflite model without edgetpu using back propagation method?

Click to expand!

Issue Type

Support

Operating System

Linux

Coral Device

No response

Other Devices

No response

Programming Language

C++

Relevant Log Output

No response

Using Eigen library in the backdrop_last_layer.cc

Description

Hi,

I am running the code from coral/examples/backprop_last_layer.cc on my PC with Ubuntu 18.04 and I get "double free or corruption" error from the Eigen library. The code is stopped on the line from Eigen/src/Core/util/Memory.h in the aligned_free function: free(ptr). I am using the Eigen library from third party folder of the TensorFlow 2.6 repository.

Could you please help me fix this problem? Which Eigen library version should I use?

Click to expand!

Issue Type

Support

Operating System

Ubuntu

Coral Device

No response

Other Devices

No response

Programming Language

C++

Relevant Log Output

No response

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.