Tuesday, January 30, 2018

[C#] OpenCvSharp DNN with YOLO2

yolo
On my post "OpenCV DNN speed compare in Python, C#, C++", Blaise Thunderbytes asked me to implement pjreddie's YOLO with OpenCvSharp, so that was why this post came out :P

Since OpenCV 3.3.1, DNN moudle supported parse YOLO models, so we can easily using YOLO pre-trained model now. OpenCv Doc have a tutorial of YOLO object detection writed in C++, if you using C++ can check it, I will using C# with OpenCVSharp.

Wednesday, January 3, 2018

[MSSQL] Set max server memory using command | 用指令設定伺服器最大記憶體

sql_maxmemory3
Few days ago I am testing a issue, set maximum server memory to very low (min limit 128 if you set the value below it) on SSMS, after apply the setting, SSMS pop out error , broken connection from SQL server and can't connect back due to the memory to low can't accept connection.
幾天前我在測一個問題,用SSMS把DB的最大伺服器記憶體設到非常低(系統最低是128MB),執行這個設定後,SSMS跳出錯誤,與SQL伺服器的連線中斷而且因為記憶體太少而連不回去。

I take some time to find out how to change the setting from command line, here is the guide.
我花了點時間找出怎麼用指令把設定改回來,下面是教學。

Tuesday, December 19, 2017

[C#] VGG Face - Multiple face detection / recognition

VggFaceCrop_1
Last time we tried VGG Face at previous post to display face recognition in one picture, this time we improve it, detect multiple face in one image and recognize them.

Here I will use Haar Cascades to do face detection, you can also download other feature-based cascade classifiers at here.

Monday, December 18, 2017

[C#] VGG Face CNN descriptor first try

VGG_Face0
It's time to try face detection since done lot of object detection. At this post, I will try VGG Face Descriptor, test the pre-trained model result, then see what we can do in next phase.

As usual, OpenCv Dnn is our model test good friend.

Friday, December 15, 2017

[C#] OpenCvSharp DNN test with SSD

OpenCvDnn_2
Last time, we compared different language running in OpenCv DNN at this article OpenCV DNN Speed Test in Python / C# / C++, this time we can test the newest OpenCvSharp with DNN moudule supported.

Tuesday, December 12, 2017

Electron first try with Active Directory and MSSQL access

electron_0
Electron is a framework base on Chromium and Node.js, it can create cross platform native applications with web technologies run on Mac, Windows, and Linux.

Recently I got a request to make a application to do some automatic stuff on Mac and Windows, after search on google, I think Electron was worth to try. But sadly the project got cut-out few day ago, so I only can share some experience what I got.

Thursday, December 7, 2017

[Tensorflow] Object Detection API test in Python and TensorflowSharp

py_tensorflow_2
Object detection in machine learning is a popular topic, this time I will test Tensorflow Object Detection API in Python(official) and TensorflowSharp(wrapper) and check the result.

Let's start with Python, my code was modify from Object Detection Demo with some simplify, avoid path/protobuf issue, hope this simple example can help more people successful test it.

Thursday, November 30, 2017

Textile defect detection using OpenCV | 使用OpenCv檢測紡織品瑕疵


textile defect detection
This is a sample display the result of textile defect detection via OpenCV, you can slide left/right to check image before and after.
這是一個範例,展示用OpenCV檢測紡織品瑕疵的結果,你可以在圖上左右拉動來比較前後的差別。

Get the result like that was not so hard, just tune parameters and keep patient, for confidentiality reason I can't share sample code this time.
要得到這樣的結果不難,只需要調參數跟耐心,因為保密的關係所以這次我不能分享範例程式。

Thursday, November 23, 2017

OpenCV DNN speed compare in Python, C#, C++

OpenCVDnnCompare_4
Last time I tried SSD on Python + OpenCV DNN, this time I will implement same test using C# and C++ to test performance and the difficult of implement.

To be fair, I will use same model and same test image on those 3 tests, model will be "VGG_VOC0712Plus_SSD_512x512_ft_iter_160000.caffemodel" from here (07++12+COCO: SSD512), image will be one picture I shot at Bail few year ago.
bali-crop

Friday, November 17, 2017

[Python] SSD (Single Shot MultiBox Detector) first try with OpenCv DNN | 在 OpenCv DNN初試 SSD

OpenCvSSD_0

SSD - Single Shot MultiBox Detector is an object detection model that has comparable accuracy with region proposals model(e.g. Faster RCNN) and is much faster. This time I will test SSD with Pyhton OpenCV DNN and check the result.
SSD - 單發多框偵測器(亂翻)是個在準確率上與候選區域模型(如Faster RCNN)不相上下,但速度更快的物體偵測模型。這次我將在Python OpenCV DNN環境下測試SSD看看其結果。

First, download SSD model from here, if you want to do train/evaluate just follow the instruction at same page, we only use model for detecting objects now.
首先,從這邊下載SSD模型,如果你想做訓練/驗證只要照著同一頁的說明去做就好,我們現在只用模型去做物件偵測。