Closed DownyBehind closed 4 years ago
다음주에 돌아가는거 보여주세요~
다음주에 돌아가는거 보여주세요~
넵~!
현재 진행사항
nnstreamer with Tensorflow Object Detection App https://github.com/nnsuite/nnstreamer-example/blob/master/native/example_object_detection_tensorflow/nnstreamer_example_object_detection_tf.cc
Build 시도하였으나, 에러 발생
nnstreamer 예제 중
$ ./nnstreamer_example_object_detection_tflite # run C/C++ example 상기 명령으로 실행되는 예제에 대한 모델만 받을 수 있는 상태
_nnstreamer 예제를 빌드하기 위해서는 상기 링크의 맨 위쪽 단계를 따라 진행해야 한다. nnstreamerexample을 빌드하기 위해서는 몇 가지 dependencies가 필요한데 그 중 하나가 caffe2이다.
실행 중에 아래와 같은 에러가 발생하는데
`** (nnstreamer_example_object_detection_tflite:15863): WARNING **: 01:07:05.060: Cannot identify the given neural network framework, tensorflow-lite
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.179: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.179: gst_mini_object_ref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.179: gst_caps_can_intersect: assertion 'GST_IS_CAPS (caps1)' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.179: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.179: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.179: gst_mini_object_ref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.179: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.179: gst_mini_object_ref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.179: gst_caps_can_intersect: assertion 'GST_IS_CAPS (caps2)' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.179: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.179: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.179: gst_mini_object_ref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.179: gst_pad_template_new: assertion 'caps != NULL' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.179: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.179: gst_element_request_compatible_pad: assertion 'GST_IS_PAD_TEMPLATE (templ)' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.179: gst_object_unref: assertion 'object != NULL' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.179: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.179: gst_mini_object_ref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.179: gst_caps_can_intersect: assertion 'GST_IS_CAPS (caps2)' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.179: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.179: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.179: gst_mini_object_ref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.179: gst_pad_template_new: assertion 'caps != NULL' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.179: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.180: gst_element_request_compatible_pad: assertion 'GST_IS_PAD_TEMPLATE (templ)' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.180: gst_object_unref: assertion 'object != NULL' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.180: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.180: gst_mini_object_ref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.180: gst_caps_can_intersect: assertion 'GST_IS_CAPS (caps1)' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.180: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.180: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:15863): GStreamer-CRITICAL **: 01:07:05.180: gst_mini_object_ref: assertion 'mini_object != NULL' failed
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:src: Cannot identify device '/dev/video0'.
Additional debug info:
v4l2_calls.c(609): gst_v4l2_open (): /GstPipeline:pipeline0/GstV4l2Src:src:
system error: No such file or directory`
이 중에서 dev/video0를 찾을 수 없다는 것은 아마 현재 ubuntu를 가상 머신 위에서 돌리는 바람에 노트북에 있는 cam을 인식하지 못해서 그런 것으로 추정된다.
나머지 에러들은 추후 잡는데로 업데이트하겠다.
Complex-Yolo v3를 적용하지 않는 이유
Complex-Yolo v3를 학습시키기 위해서는 3D Point Cloud Data가 직접 필요하다. 현재 gstreamer에서는 image, video, audio streaming을 지원하고 있는데
만약에 raw 3D Point Cloud Data를 적용하려면, 그에 적합한 appsrc단을 개발해야한다. 해당하는 Data Type에 적합한 구조를 만들어야 하는데, 개발 범위가 너무 커지므로
2D Conversion을 통해 image streaming을 이용하는 방식으로 적용하고자 한다.
이슈 1 : https://github.com/nnsuite/nnstreamer-example/issues/21
위의 경우는 나오는데
위 사진과 다르게 filters가 안나오는 이슈가 있습니다. 터미널에서 gst-launch로 구동시켰을 때 안되는 이유이긴 한데 확인해 보시면 좋을 것 같아 공유합니다. (추가 필요 : sudo apt-get install nnstreamer-tensorflow)
이슈 2 : $ ./nnstreamer_example_object_detection_tflite # 를 돌리셨다고 하셨는데 텐서플로우 라이트가 아니라 텐서플로우가 맞는 것이지요?
(nnstreamer_example_object_detection_tflite:25448): GLib-CRITICAL **: 04:32:02.715: g_file_test: assertion 'filename != NULL' failed
** (nnstreamer_example_object_detection_tflite:25448): WARNING **: 04:32:02.715: Cannot identify the given neural network framework, tensorflow-lite
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.755: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.755: gst_mini_object_ref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.755: gst_caps_can_intersect: assertion 'GST_IS_CAPS (caps1)' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.755: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.755: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.755: gst_mini_object_ref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.755: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.755: gst_mini_object_ref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.755: gst_caps_can_intersect: assertion 'GST_IS_CAPS (caps2)' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.755: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.755: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.755: gst_mini_object_ref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.755: gst_pad_template_new: assertion 'caps != NULL' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.755: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.755: gst_element_request_compatible_pad: assertion 'GST_IS_PAD_TEMPLATE (templ)' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.755: gst_object_unref: assertion 'object != NULL' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.755: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.755: gst_mini_object_ref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.755: gst_caps_can_intersect: assertion 'GST_IS_CAPS (caps2)' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.756: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.756: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.756: gst_mini_object_ref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.756: gst_pad_template_new: assertion 'caps != NULL' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.756: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.756: gst_element_request_compatible_pad: assertion 'GST_IS_PAD_TEMPLATE (templ)' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.756: gst_object_unref: assertion 'object != NULL' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.756: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.756: gst_mini_object_ref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.756: gst_caps_can_intersect: assertion 'GST_IS_CAPS (caps1)' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.756: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.756: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(nnstreamer_example_object_detection_tflite:25448): GStreamer-CRITICAL **: 04:32:02.756: gst_mini_object_ref: assertion 'mini_object != NULL' failed
우선 nnstreamer_example_object_detection_tflite 파일을 돌렸을 때 제가 텐서플로우 라이트를 잘못설치해서 그런지 위에 경고가 뜨긴 하지만 아래 dev/video0 에러는 안뜨네요. 말씀하신 대로 가상머신이라 카메라를 못찾는 게 맞는 거 같아요.
(py36) deokho@deokho-ThinkPad-T480s:~/nnstreamer/bin$ ./nnstreamer_example_object_detection_tf
(nnstreamer_example_object_detection_tf:25931): GLib-CRITICAL **: 04:45:28.456: g_file_test: assertion 'filename != NULL' failed
Segmentation fault (core dumped)
해당 예제를 따라 했을 때 저는 이런 에러가 뜨네요.
같은 예제의 bash를 이용하는 방법으로도 해보았는데
이 방법은 위 사진에서 보이는 것 처럼 잘 돌아가네요.
해당 파일을 돌리면 왜 위와 같은 Segmentation fault이 나는 지 찾아 보도록 할게요.
현재 확인한 결과
nnstreamer_example_object_detection_tf 실행 시 발생 에러
./nnstreamer_example_object_detection_tf
2020-03-08 09:10:33.864729: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:src: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:src:
streaming stopped, reason not-negotiated (-4)
gst-launch-object-detection-tf.sh 실행 시 발생 에러
2020-03-08 09:09:08.025167: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:cam_src: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:cam_src:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.005241589
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
보니까 지속적으로 같은 에러가 발생하는 것 같아요
실제로 nnstreamer_example_object_detection_tf 내부 코드를 보면 아래와 같습니다.
int
main (int argc, char ** argv)
{
const gchar tf_model_path[] = "./tf_model";
gchar *str_pipeline;
GstElement *element;
_print_log ("start app..");
/* init app variable */
g_app.running = FALSE;
g_app.loop = NULL;
g_app.bus = NULL;
g_app.pipeline = NULL;
g_app.detected_objects.clear ();
g_mutex_init (&g_app.mutex);
_check_cond_err (tf_init_info (&g_app.tf_info, tf_model_path));
/* init gstreamer */
gst_init (&argc, &argv);
/* main loop */
g_app.loop = g_main_loop_new (NULL, FALSE);
_check_cond_err (g_app.loop != NULL);
/* init pipeline */
str_pipeline =
g_strdup_printf
("v4l2src name=src ! videoconvert ! videoscale ! video/x-raw,width=%d,height=%d,format=RGB ! tee name=t_raw "
"t_raw. ! queue ! videoconvert ! cairooverlay name=tensor_res ! ximagesink name=img_tensor "
"t_raw. ! queue leaky=2 max-size-buffers=2 ! videoscale ! tensor_converter ! "
"tensor_filter framework=tensorflow model=%s "
"input=3:640:480:1 inputname=image_tensor inputtype=uint8 "
"output=1,100:1,100:1,4:100:1 "
"outputname=num_detections,detection_classes,detection_scores,detection_boxes "
"outputtype=float32,float32,float32,float32 ! "
"tensor_sink name=tensor_sink ",
VIDEO_WIDTH, VIDEO_HEIGHT, g_app.tf_info.model_path);
_print_log ("%s\n", str_pipeline);
여기서 v4lsrc 관련한 부분이 문제가 있는걸로 보여요...
아마 이것도 제 환경이 가상환경이라 생기는 문제인 것 같긴한데 혹시 아시는 분 있을까요?
./gst-launch-object-detection-tf.sh
2020-03-08 10:34:12.976081: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:cam_src: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:cam_src:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.005453889
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
상기 부분이 현재 오류로 보입니다.
위 오류는 integrated cam을 v4l2Src로 불러올 때 발생하는 에러로 보이는데... gstreamer 자체 에러로 보이네요...
nnstreamer_example_object_detection_tf.cc 파일 구동
컴파일 명령어
g++ nnstreamer_example_object_detection_tf.cc -o nntest `pkg-config --cflags --libs gstreamer-1.0 gstreamer-video-1.0 gtk+-3.0`
or
g++ nnstreamer_example_object_detection_tf.cc -o nntest `pkg-config --cflags --libs gstreamer-1.0 gstreamer-video-1.0 cairo`
컴파일 된 파일 구동 2.1 sudo 권한 없이 돌렸을 때
(py36) deokho@deokho-ThinkPad-T480s:~/nnstreamer-example/native/example_object_detection_tensorflow$ ./nntest
(nntest:14058): GLib-CRITICAL **: 17:23:36.426: g_file_test: assertion 'filename != NULL' failed
Segmentation fault (core dumped)
2.2 sudo 권한 주고 돌렸을 때
카메라 화면이 까만이유는 덮개를 닫고 있어서 입니다.
(py36) deokho@deokho-ThinkPad-T480s:~/nnstreamer-example/native/example_object_detection_tensorflow$ sudo ./nntest
2020-03-08 17:24:19.581366: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
**
ERROR:nnstreamer_example_object_detection_tf.cc:389:void new_data_cb(GstElement*, GstBuffer*, gpointer): assertion failed: (info_classes.size == DETECTION_MAX * 4)
Aborted
둘 다 에러가 있고 sudo 권한을 준 건 돌 다가 에러로 멈춤
Segmentation fault. 일반적으로 메모리 주소값을 잘못 침범했을떄 발생하는 에러인데요. 메모리 할당이 안된 인스턴스에 값이 참조가 됐다거나
결국 main() 함수에 대한 이해가 필요하다고 보이는데요.
위 메인함수에서 보면 *element 포인터에 인스턴스가 생성된 코드를 못찾겠는데 그 부분이 어떻게 사용되고 있는지 알아야 할꺼 같아요. 메모리가 할당이 안된상태로 사용되고 있는 건 아닌지?
혹시 init app variable
설정이 해당설정이 맞는지 확인해 보셨나요 ?
g_app 인스턴스가 어디서 생성되는지 궁금하네요
g_main_loop_new()의 입력인자가 어떤 값인지 잘 설정되어 있는지 확인 할 필요가 있어 보이네요
전 돌리면 멈추진않고 돌아가긴하네요 올려주신 모델말고 따로 coco lables_list.txt, ssdlite_mobilenet_v2.pb 파일 찾아서 넣어주었어요 sudo ./nntest, ./nntest 둘다 동작하구요
위의 다운님, 덕호님께서 언급해주신 에러로 고군분투하다 알려주신대로 아래와 같이 시도했는데 저의 경우 에러 안나고 .cc 파일 잘 돌아가네요. 감사합니다!
[실행명령어]
g++ nnstreamer_example_object_detection_tf.cc -o nntest `pkg-config --cflags --libs gstreamer-1.0 gstreamer-video-1.0 cairo`
./nntest 명령어 실행시 아래와 같이 에러가 나와 model과 label 파일을 넣어주었어요.(저도 위에 언급된 에러들(./nnstreamer_example_object_detection_tflite 실행에러, filters 없는 에러 등) 못잡은 상태로 진행했습니다.)
Gstreamer - NNStreamer Test Error
g++ nnstreamer_gstreamer.cc -o nntest `pkg-config --cflags --libs gstreamer-1.0 gstreamer-video-1.0 cairo`
Gstreamer - NNStreamer Test Error
다운님이 알려주신 command는 제 환경에서 에러가 나네요. 해당 파일, 디렉터리를 설치하고 있으나 안되는 상황입니다. 설치하면 바로 실행될 줄 알았더니 말이죠. 일단 해당 내용 설치해서 빨리 해결해볼게요
g++ nnstreamer_gstreamer.cc -o nntest `pkg-config --cflags --libs gstreamer-1.0 gstreamer-video-1.0 gtk+-3.0`
Model change Error
기존 ssdlite_mobilenet_v2.pb 파일을 squeezenet.pb로 교체했을 시 발생되는 에러입니다. 단순히 패키지, 모듈 설치가 안되어 발생되는 에러같았는데 다시 살펴보니
Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
부분은 경고메시지로 무시할 수 있지만
아래 에러메시지는 'nnstreamer/tensor_filter/tensor_filter_tensorflow.cc' 부분과 관계된 것으로 파악됩니다.
이부분을 먼저 확인한 후 오늘 모임에서 언급되었던 pipeline 내 input frame을 변경하거나(input=3:640:480:1), iputtype을 바꾸거나(inputtype=unit8) 하는 것을 시도해보겠습니다.
명령어에 gstreamer-app-1.0 빠졌어요!
g++ nnstreamer_gstreamer.cc -o nntest `pkg-config --cflags --libs gstreamer-1.0 gstreamer-video-1.0 gtk+-3.0 gstreamer-app-1.0`
Gstreamer - NNStreamer Test Error
두 명령어 모두 같은 에러가 발생하네요. 아마 예전 소스라서 최신것으로 바꾸면 에러가 사라지길 바랍니다.
g++ nnstreamer_gstreamer.cc -o nntest `pkg-config --cflags --libs gstreamer-1.0 gstreamer-video-1.0 cairo`
g++ nnstreamer_gstreamer.cc -o nntest `pkg-config --cflags --libs gstreamer-1.0 gstreamer-video-1.0 gtk+-3.0 gstreamer-app-1.0`
cmd :g++ nnstreamer_example_object_detection_tf.cc -o nntest2 pkg-config --cflags --libs gstreamer-1.0 gstreamer-video-1.0 gtk+-3.0 gstreamer-app-1.0
저는 위와 같은 명령어로 실행 하면, 용희님이랑 같은 warning code는 뜨긴 해요. 근데 이건 build하는거랑은 관계없는 warning code인데 위와 같이 나오셔도 실행파일이 생성이 안된다는 말씀이시죠?
위의 결과에서는 error가 발생한 건 안보이거든됴.
그렇네요, warning 이니 보니까 실행파일 생성되었어요
segmentation fault 뜨네요
최신 코드로 업데이트해서 해봐야겠어요!
저기서 경고가 난 거라 만약 파일을 못불러 왔다면 null이 되어 segmentation fault 나올 수 있어요.
말씀하신대로 최신 코드로 업데이트되면 해결 될 수도 있어요.
최신 코드로 업데이트해도 왜 segmentation fault 에러가 나는지 모르겠네요
일단 수정한 코드는 nnstreamer-gstreamer repo에 branch로 업로드하였습니다. [소스]
소스 수정된 곳은 #41 ~ #165 확인하시면 됩니다.
현재 상황
파이프라인 출력확인 :lidar sensor data(.txt) 읽어주는 gstreamer 소스와 nnstreamer 간 파이프라인 연결은 확인되었습니다(출력되는 결과는 확인이 필요해보여요)
모델 교체 작업 : 모델 수정하며 발생되는 에러 해결해야겠어요
파일사이즈가 커서 슬랙 및 카톡으로 출력 결과 공유했습니다.
위 사진은 Beyond Compare로 덕호님이 공유해주신 기존 코드랑 변경된 코드를 비교한 내용이구요. 용희님이 merge하신 코드를 보니 두 군데가 변경이 안되었더라구요.
[기존 코드 내에 640 -> 630 변경]
해당 변경사항 수정해서 현재 기존 제 레포지토리에 커밋 올렸습니다. 확인 부탁드려요.
목표 : 덕호님이 만들어 놓은 gstreamer를 nnstreamer[Ubuntu 환경]에 연결
결과물 : gstreamer appsrc로 받은 Data[raw data or 2D projection data]가 nnstreamer 연결 파일 [c++ project, exe file]
due date : ~ 3/5 code merge [build가 되어 실행파일이 돌아가는 수준] & test ~ 3/7 예솔님, 유라님 작업하신 model merge + 덕호님 수정된 로직 merge
이슈 사항 :