Skip to content

Commit

Permalink
Merge branch 'dev-0.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
GFallasRR committed Jun 5, 2019
2 parents 82e77e4 + 6e38260 commit aca30ba
Show file tree
Hide file tree
Showing 28 changed files with 1,820 additions and 48 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,4 @@ cscope.out
# Examples
tests/examples/classification/classification
tests/examples/detection/detection
tests/examples/embedding/embedding
32 changes: 29 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
<a href="https://developer.ridgerun.com/wiki/index.php?title=GstInference"><img src="https://developer.ridgerun.com/wiki/images/thumb/9/92/GstInference_Logo_with_name.jpeg/600px-GstInference_Logo_with_name.jpeg" height="400" width="400"></a>

# GstInference

A GStreamer deep learning inference framework.
>See the **[GstInference wiki](https://developer.ridgerun.com/wiki/index.php?title=GstInference)** for the complete documentation.
GstInference is an open-source project from Ridgerun Engineering that provides a framework for integrating deep learning inference into GStreamer. Either use one of the included elements to do out-of-the box inference using the most popular deep learning architectures, or leverage the base classes and utilities to support your own custom architecture.

This repo uses **[R²Inference](https://github.com/RidgeRun/r2inference)**, an abstraction layer in C/C++ for a variety of machine learning frameworks. With R²Inference a single C/C++ application may work with models on different frameworks. This is useful to execute inference taking advantage of different hardware resources such as CPU, GPU, or AI optimized acelerators.

GstInference provides several example elements for common applications, such as [`Inception v4`](ext/r2inference/gstinceptionv4.c) for image classification, [`TinyYOLO v2`](ext/r2inference/gsttinyyolov2.c) for object detection, and [`FaceNet`](ext/r2inference/gstfacenetv1.c) for face recognition. Examples are provided for performing inference on any GStreamer video stream.

<img src="https://developer.ridgerun.com/wiki/images/thumb/4/4f/GstInference-examples.jpeg/800px-GstInference-examples.jpeg" width="800">

## Installing GstInference

Follow the steps to get GstInference running on your platform:

* [Clone or download R²Inference](https://github.com/RidgeRun/r2inference)
* [Build R²Inference](https://developer.ridgerun.com/wiki/index.php?title=R2Inference/Getting_started/Building_the_library)
* [Clone or download GstInference](https://github.com/RidgeRun/gst-inference)
* [Build GstInference](https://developer.ridgerun.com/wiki/index.php?title=GstInference/Getting_started/Building_the_plugin)

## Examples

We provide GStreamer [example pipelines](https://developer.ridgerun.com/wiki/index.php?title=GstInference/Example_pipelines) for all our suported platforms,architectures and backends.

We also provide [example applications](https://developer.ridgerun.com/wiki/index.php?title=GstInference/Example_Applications) for classification, detection and face recognition.

Our [smart lock](tests/examples/face_detection/README.md) example can get you started with a real security camera application.

Please visit the official documentation hosted at:
> http://developer.ridgerun.com/wiki/index.php?title=GstInference
We also provide example trained models on our [model zoo](https://developer.ridgerun.com/wiki/index.php?title=GstInference/Model_Zoo)
3 changes: 2 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dnl please read gstreamer/docs/random/autotools before changing this file
dnl initialize autoconf
dnl releases only do -Wall, git and prerelease does -Werror too
dnl use a three digit version number for releases, and four for git/pre
AC_INIT([GStreamer Inference],[0.4.0.1],[https://github.com/RidgeRun/gst-inference/issues],[gst-inference])
AC_INIT([GStreamer Inference],[0.5.0.1],[https://github.com/RidgeRun/gst-inference/issues],[gst-inference])

AG_GST_INIT

Expand Down Expand Up @@ -387,6 +387,7 @@ tests/check/Makefile
tests/Makefile
tests/examples/classification/Makefile
tests/examples/detection/Makefile
tests/examples/embedding/Makefile
tests/examples/Makefile
tests/files/Makefile
)
Expand Down
10 changes: 6 additions & 4 deletions ext/opencv/gstclassificationoverlay.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ GST_DEBUG_CATEGORY_STATIC (gst_classification_overlay_debug_category);
#define GST_CAT_DEFAULT gst_classification_overlay_debug_category

/* prototypes */
static GstFlowReturn gst_classification_overlay_process_meta (GstVideoFrame *
frame, GstMeta * meta, gdouble font_scale, gint thickness,
gchar ** labels_list, gint num_labels);
static GstFlowReturn
gst_classification_overlay_process_meta (GstInferenceOverlay *
inference_overlay, GstVideoFrame * frame, GstMeta * meta,
gdouble font_scale, gint thickness, gchar ** labels_list, gint num_labels);

enum
{
Expand Down Expand Up @@ -92,7 +93,8 @@ gst_classification_overlay_init (GstClassificationOverlay *
}

static GstFlowReturn
gst_classification_overlay_process_meta (GstVideoFrame * frame, GstMeta * meta,
gst_classification_overlay_process_meta (GstInferenceOverlay *
inference_overlay, GstVideoFrame * frame, GstMeta * meta,
gdouble font_scale, gint thickness, gchar ** labels_list, gint num_labels)
{
GstClassificationMeta *class_meta;
Expand Down
10 changes: 6 additions & 4 deletions ext/opencv/gstdetectionoverlay.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ GST_DEBUG_CATEGORY_STATIC (gst_detection_overlay_debug_category);

/* prototypes */
static GstFlowReturn
gst_detection_overlay_process_meta (GstVideoFrame * frame, GstMeta * meta,
gdouble font_scale, gint thickness, gchar ** labels_list, gint num_labels);
gst_detection_overlay_process_meta (GstInferenceOverlay * inference_overlay,
GstVideoFrame * frame, GstMeta * meta, gdouble font_scale, gint thickness,
gchar ** labels_list, gint num_labels);

enum
{
Expand Down Expand Up @@ -101,8 +102,9 @@ gst_detection_overlay_init (GstDetectionOverlay * detection_overlay)
}

static GstFlowReturn
gst_detection_overlay_process_meta (GstVideoFrame * frame, GstMeta * meta,
gdouble font_scale, gint thickness, gchar ** labels_list, gint num_labels)
gst_detection_overlay_process_meta (GstInferenceOverlay * inference_overlay,
GstVideoFrame * frame, GstMeta * meta, gdouble font_scale, gint thickness,
gchar ** labels_list, gint num_labels)
{
GstDetectionMeta *detect_meta;
gint i, width, height, channels;
Expand Down
Loading

0 comments on commit aca30ba

Please sign in to comment.