Skip to content

Commit

Permalink
Update documents
Browse files Browse the repository at this point in the history
  • Loading branch information
iwatake2222 committed Jan 10, 2021
1 parent fa8c6d7 commit 05429d8
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 14 deletions.
17 changes: 15 additions & 2 deletions 00_doc/class_diagram.drawio
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<mxfile host="65bd71144e" modified="2020-12-27T09:02:34.596Z" agent="5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.46.1 Chrome/78.0.3904.130 Electron/7.3.1 Safari/537.36" etag="Ge7SQ_ebyERRGwPVspIJ" version="13.10.0" type="embed">
<mxfile host="65bd71144e" modified="2021-01-10T01:48:26.266Z" agent="5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.46.1 Chrome/78.0.3904.130 Electron/7.3.1 Safari/537.36" etag="uZrn58mdqdMWxrp378wF" version="13.10.0" type="embed">
<diagram id="2nVCpC3mRS13LhFPs2z5" name="Page-1">
<mxGraphModel dx="1877" dy="1993" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
Expand Down Expand Up @@ -119,7 +119,7 @@
</mxGeometry>
</mxCell>
<mxCell id="52" value="&lt;p style=&quot;margin: 4px 0px 0px ; text-align: center&quot;&gt;&lt;b&gt;&lt;u&gt;HELPER_TYPE&lt;/u&gt;&lt;/b&gt;&lt;br&gt;&lt;/p&gt;&lt;hr&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;TENSOR_RT,&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;TENSORFLOW_LITE,&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;TENSORFLOW_LITE_EDGETPU,&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;TENSORFLOW_LITE_GPU,&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;TENSORFLOW_LITE_XNNPACK,&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;NCNN,&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;MNN,&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;OPEN_CV,&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;OPEN_CV_GPU,&lt;/p&gt;" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;" parent="1" vertex="1">
<mxGeometry x="-110" y="100" width="210" height="170" as="geometry"/>
<mxGeometry x="-110" y="59" width="210" height="170" as="geometry"/>
</mxCell>
<mxCell id="54" value="&lt;p style=&quot;margin: 4px 0px 0px ; text-align: center&quot;&gt;&lt;b&gt;&lt;u&gt;DATA_TYPE&lt;/u&gt;&lt;/b&gt;&lt;br&gt;&lt;/p&gt;&lt;hr&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;DATA_TYPE_IMAGE,&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;DATA_TYPE_BLOB_NHWC,&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;DATA_TYPE_BLOB_NCHW,&lt;/p&gt;" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;" parent="1" vertex="1">
<mxGeometry x="470" y="448" width="210" height="80" as="geometry"/>
Expand Down Expand Up @@ -158,6 +158,19 @@
<mxPoint x="270" y="-130" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="73" value="ThirdParty/&lt;br&gt;pre-built library" style="html=1;" vertex="1" parent="1">
<mxGeometry x="100" y="448" width="110" height="50" as="geometry"/>
</mxCell>
<mxCell id="74" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;dashed=1;dashPattern=1 2;" vertex="1" parent="1">
<mxGeometry x="40" y="250" width="660" height="150" as="geometry"/>
</mxCell>
<mxCell id="76" value="link" style="endArrow=open;endFill=1;endSize=12;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.25;exitY=1;exitDx=0;exitDy=0;dashed=1;" edge="1" parent="1" source="74" target="73">
<mxGeometry x="-0.4963" y="11" width="160" relative="1" as="geometry">
<mxPoint x="660" y="144" as="sourcePoint"/>
<mxPoint x="790" y="163" as="targetPoint"/>
<mxPoint as="offset"/>
</mxGeometry>
</mxCell>
</root>
</mxGraphModel>
</diagram>
Expand Down
Binary file modified 00_doc/class_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 33 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,31 @@

## Supported frameworks
- TensorFlow Lite
- TensorFlow Lite with delegate (GPU, XNNPACK, EdgeTPU)
- TensorFlow Lite with delegate (XNNPACK, GPU, EdgeTPU)
- TensorRT
- OpenCV(dnn)
- ncnn
- MNN

## Supported targets
- Windows 10 (Visual Studio 2017 x64, Visual Studio 2019 x64)
- Linux (x64, armv7, aarch64)
- Android (armv7, aarch64)

## Tested Environment
| Framework | Windows (x64) | Linux (x64) | Linux (armv7) | Linux (aarch64) | Android (aarch64) |
|---------------------------|--------------------------|---------------|---------------|------------------|-------------------|
| OpenCV(dnn) | OK | OK | OK | OK | not tested |
| TensorFlow Lite | OK | OK | OK | OK | OK |
| TensorFlow Lite + XNNPACK | OK | OK | OK | OK | OK |
| TensorFlow Lite + GPU | not supported | OK | not tested | OK | OK |
| TensorFlow Lite + EdgeTPU | OK | not tested | OK | OK | OK |
| TensorRT | not tested | not tested | not tested | OK | not supported |
| ncnn | OK | OK | OK | OK | OK |
| MNN | OK | OK | OK | OK | OK |
| Note | Visual Studio 2017, 2019 | Xubuntu 18.04 | Raspberry Pi | Jetson Xavier NX | Pixel 4a |


## Sample project
https://github.com/iwatake2222/InferenceHelper_Sample

Expand All @@ -21,24 +40,26 @@ https://github.com/iwatake2222/InferenceHelper_Sample
- https://github.com/iwatake2222/play_with_ncnn
- https://github.com/iwatake2222/play_with_mnn

## Tested Environment
- Windows 10 (Visual Studio 2017 x64)
- Linux (Xubuntu 18.04 x64)
- Linux (Jetson Xavier NX)

# Usage
## Installation
- Add this repository into your project (Using `git submodule` is recommended)
- This class requires pre-built deep learning framework library and appropreate cmake variables need to be set
- Please see the sample project
- Download prebuilt libraries
- Download prebuilt libraries (ThirdParty.zip) from https://github.com/iwatake2222/InferenceHelper/releases/
- Extract it to `ThirdParty`

## Project settings in CMake
- CMake variables
- `THIRD_PARTY_DIR` : set the directory containing pre-built deep learning framework libraries
### (For Tensorflow Lite)
- After adding or cloning this repository, you need to download header files
```
git submodule init
git submodule update
cd ThirdParty/tensorflow
chmod +x tensorflow/lite/tools/make/download_dependencies.sh
tensorflow/lite/tools/make/download_dependencies.sh
```

## Project settings in CMake
- Add InferenceHelper and CommonHelper to your project
```cmake
set(THIRD_PARTY_DIR ${CMAKE_CURRENT_LIST_DIR}/../../third_party/)
set(INFERENCE_HELPER_DIR ${CMAKE_CURRENT_LIST_DIR}/../../InferenceHelper/)
add_subdirectory(${INFERENCE_HELPER_DIR}/CommonHelper CommonHelper)
target_include_directories(${LibraryName} PUBLIC ${INFERENCE_HELPER_DIR}/CommonHelper)
Expand Down

0 comments on commit 05429d8

Please sign in to comment.