Thursday, November 23, 2017

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

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.

Friday, November 17, 2017

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


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.

Friday, November 10, 2017

[C#] Solve find difference game by OpenCv | 用OpenCv來玩找出差異的遊戲

This is a tiny side project using OpenCv(actually, OpenCvSharp) Background Subtraction methods to solve find difference game's image.
這是一個用OpenCV(實際上是OpenCvSharp)的Background Subtraction功能來解找出差異遊戲圖片的小專案。

0x8007042B - 0x2000D error while upgrading Windows 10 | 升級Win10時發生0x8007042B - 0x2000D錯誤


Recently I am updating Windows 10 Fall Creators Update, but when it auto reboot and install to 27%, the update will stop and restore to previous version. After login in windows, the error message was that :
最近我在更新Windows 10秋季創作者更新,但當他自動重開然後安裝到27%時,更新會停止然後還原到上個版本。當登入windows後,錯誤訊息如下:
0x8007042B - 0x2000D
The installation failed in the SAFE_OS phase with an error during MIGRATE_DATA operation

Friday, November 3, 2017

[C#] Breakpoint will not currently be hit. No symbols loaded for this document.


Recently I was modify an old WPF application, but when I am debugging, it shows a message on my breakpoint told it can't work.
Breakpoint will not currently be hit. No symbols loaded for this document.

Googled it, a lot of solutions about this question, like this "Breakpoint will not currently be hit. No symbols loaded for this document." on codeproject , but no one work on me.
Google了一下,很多關於這問題的解法,像是codeproject上的"Breakpoint will not currently be hit. No symbols loaded for this document."這篇,不過沒有一個解法對我適用。

Tuesday, October 31, 2017

A trick in evaluate image using CNTK | 一個使用CNTK評估圖片的技巧

Most of time when you search for CNTK's example, they are training and evaluating model using bulk data, but in some production field, we need evaluate one or few image from real time generated data, how does CNTK framework work on it? Let's find out.
通常你搜尋CNTK的範例,它們都在用大量資料訓練跟驗證模型,但是在一些實際使用情況下,我們需要評估即時產生的一張或幾張圖片時,CNTK框架可以表現得如何呢? 讓我們來看看。

I writed some example for compare evaluate performance between from C#/CNTK, Python/CNTK and Python/OpenCv+DNN, full solution put on github CNTK Evaluate Performance Test with detail description, so I will skip the code detail focus on others.
我寫了一些範例來比較C#/CNTK, Python/CNTK 跟 Python/OpenCv+DNN 之間的驗證效率,完整專案放在github上 CNTK Evaluate Performance Test 還有各種細節描述,所以我這邊就會跳過程式細節的部份來說其他的。

Tuesday, October 24, 2017

[C#] Test MNIST Classifier with image using CNTK | 運用CNTK以圖片測試MNIST分類器

CNTK - The Microsoft Cognitive Toolkit - is a unified deep-learning toolkit by Microsoft. This time we will using CNTK to run up a MNIST Classifier and test it by our selected image.
CNTK - 微軟認知工具(?) - 是一套微軟的整合性深度學習工具。這次我們將使用CNTK來執行一個MNIST分類器,並使用我們所選擇的圖片進行測試。

Due to Microsoft didn't provide much CNTK support for C#, so the best way is start from the CNTK C#/.NET API training examples, in here you can get some code example for training/validate model and the dataset that you need for training/validate. Copy example code to get a new post not my sytle, so I will skip it, assume you already get all things complete and let the MNISTClassifier model trained done.
由於微軟沒有提供很多C#的CNTK支援,所以最佳的方式是從CNTK C#/.NET API training examples這範例開始,在這裡你可以取得一些訓練/驗證模型的程式範例,還有訓練/驗證所需的資料。拷貝範例程式就生出一篇新的文章不是我的風格,所以我會跳過這段,假設你已經取得所有東西而且訓練好MNISTClassifier的模型了。

Friday, October 13, 2017

在Visual Studio內嵌美人時鐘 - 美人時計IDE


今天在找Visual Studio上的theme時,發現到一個有趣的東西美人時計 IDE,因為介紹上沒看到圖,不是很能了解具體呈現會是怎樣,所以我抱著踩雷的心情試看看,沒想到裝了之後這玩意真心不錯XD

[Python] Using deep learning model in OpenCV | 在OpenCV中使用深度學習模型


OpenCV 3.3 included dnn module in the main repository, now we can use popular framework like Caffe, TensorFlow in OpenCV via dnn module.
OpenCV 3.3將dnn模組包入了主庫,現在我們可以在OpenCV中藉由dnn模組使用像是Caffe,TensorFlow這些熱門框架。

This post we will follow this dnn sample to test it (with some modify), because OpenCvSharp didn't support OpenCV 3.3 yet, so we will using python to do it.
這篇文章我們將照著這篇dnn範例來測試(有做一點修改),因為OpenCvSharp還沒支援OpenCV 3.3,所以我們將使用python來做這測試。

Tuesday, October 3, 2017

[C#] OpenCvSharp Detect Object in Video | OpenCvSharp 在影片中偵測物體

Last time we can detect object in image , now we can using same way to detect object in video , all we need just change the data source then do a little change.