| 研究生: |
李俊德 LEE, Chun-De |
|---|---|
| 論文名稱: |
基於深度學習之咖啡豆即時辨識 Real-time Coffee Beans Recognition Based on Deep Learning |
| 指導教授: |
林忠宏
Lin, Chung-Hung |
| 學位類別: |
碩士 Master |
| 系所名稱: |
工學院 - 系統及船舶機電工程學系 Department of Systems and Naval Mechatronic Engineering |
| 論文出版年: | 2018 |
| 畢業學年度: | 106 |
| 語文別: | 中文 |
| 論文頁數: | 91 |
| 中文關鍵詞: | 咖啡豆辨識 、類神經網路 、預訓練模型 |
| 外文關鍵詞: | Recognition of coffee beans, Convolutional neural network, Pre-trained model |
| 相關次數: | 點閱:93 下載:5 |
| 分享至: |
| 查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報 |
目前咖啡豆的選別大部分仍是利用人工進行檢測,由於人工檢測的方式相當耗時費力,且作業人員在長時間的工作下視覺容易產生疲勞,以致於影響選別的速度與準確性,使選別出來的咖啡豆品質無法達到一定的標準。因此咖啡豆選別的自動化將是未來咖啡產業相當重要的趨勢,以達到節省人力資源與時間成本之目的。
本文以自製的咖啡豆辨識機構蒐集咖啡豆的影像資料,並輸入至預訓練模型中對模型做微調(fine-tune),改變最後的輸出類別使之成為咖啡豆辨識的模型。首先以單面辨識的方式拍攝咖啡豆滑落軌道之影片,並將咖啡豆影像利用背景相減法從影片中擷取出來,分為好豆、瑕疵豆、無豆三個類別輸入至預訓練模型-Inception V3中做離線的訓練與測試,得到好豆正確率為76.67%、瑕疵豆正確率為79.31%、無豆正確率為100%。接著自製咖啡豆辨識機構,以一顆為單位利用網路攝影機(webcam)進行拍攝,蒐集更多訓練資料做訓練,最後實際將咖啡豆丟入至機構中做即時的辨識,其好豆正確率為63%、瑕疵豆為79%、無豆為100%。但單面拍攝下可能因瑕疵部份在另一面而攝影機沒有拍攝到而導致辨識錯誤,故下一步將對咖啡豆的兩面皆進行拍攝。
將兩台網路攝影機置於機構中成為拍攝咖啡豆兩面之機構,並以此蒐集大量的咖啡豆正、反兩面的訓練資料,將輸出類別改為正面好豆、反面好豆、正面瑕疵豆、反面瑕疵豆以及無豆五類,可將單面拍攝之問題做有效的改善。測試部分一樣將咖啡豆丟入機構中做即時辨識,再將辨識分數的閥值做修正,可將好豆的召回率達到100%、精確率達到93.85%。
This paper collects the image data of coffee beans with a self-made coffee bean recognition mechanism and inputs it into a pre-trained model to fine-tune the model. First of all, use a single-side recognition method to shoot coffee beans falling on the track, and use the background subtraction method to extract the coffee bean image from the record video. It is divided into three categories: good bean, bad bean, and no bean. Inception V3 did offline training and testing, the accuracy of good beans is 76.67%, kidney beans is 80%, and no bean is 100%. Then, the self-made coffee bean recognition mechanism uses a webcam to shoot coffee beans, collects more training data, and finally actually puts the coffee beans into the mechanism for real-time recognition. The accuracy of good bean is 63%, bad bean is 79%, and no bean is 100%. However, by the single-sided shooting, the recognition may be mistaken, the next step will photograph both sides of the coffee beans.
Use two webcams to collect a large amount of both sides of coffee beans data. The output categories are positive good bean, reverse good bean, positive bad bean, reverse bad bean and no bean. This method can improve the mistake of single-sided shooting. In the test part, the coffee beans are thrown into the mechanism for real-time recognition, and use Bayes' theorem to improve the orginal result. The recall of good beans can reach 81% and the precision is 84.38%.
[1] 魏子量, "基於摺積類神經網路之魚類偵測與辨識," 成功大學系統及船舶機電工程學系學位論文, pp. 1-66, 2016.
[2] 郭俊宏, "基於影像差分直方圖於揚繩作業影像中之魚體偵測," 成功大學系統及船舶機電工程學系學位論文, pp. 1-115, 2016.
[3] 林晋億, "全彩機械視覺於咖啡生豆檢測之研究," 碩士, 電子與光電工程研究所碩士班, 國立雲林科技大學, 雲林縣, 2013.
[4] T. Nasution and U. Andayani, "Recognition of Roasted Coffee Bean Levels using Image Processing and Neural Network," in IOP Conference Series: Materials Science and Engineering, 2017, p. 012059.
[5] K. Nogueira, W. R. Schwartz, and J. A. dos Santos, "Coffee crop recognition using multi-scale convolutional neural networks," in Iberoamerican Congress on Pattern Recognition, 2015, pp. 67-74.
[6] 凃亞廷, "咖啡公豆母豆自動選別裝置之開發," 碩士, 生物產業機電工程學系所, 國立中興大學, 台中市, 2014.
[7] 石坤城, "機器視覺應用在香菇選別系統之研究," 碩士, 食品科學系, 國立屏東科技大學, 屏東縣, 2001.
[8] 林福源, "應用影像色澤處理技術至花粉選別機之研究," 博士, 生物產業機電工程學系所, 國立中興大學, 台中市, 2013.
[9] A. D. Mengistu, D. M. Alemayehu, and S. G. Mengistu, "Ethiopian Coffee Plant Diseases Recognition Based on Imaging and Machine Learning Techniques," International Journal of Database Theory and Application, vol. 9, pp. 79-88, 2016.
[10] F. A. Faria, J. A. dos Santos, R. d. S. Torres, A. Rocha, and A. X. Falcao, "Automatic fusion of region-based classifiers for coffee crop recognition," in Geoscience and Remote Sensing Symposium (IGARSS), 2012 IEEE International, 2012, pp. 2221-2224.
[11] F. Faridah, G. O. Parikesit, and F. Ferdiansjah, "Coffee bean grade determination based on image parameter," TELKOMNIKA (Telecommunication Computing Electronics and Control), vol. 9, pp. 547-554, 2011.
[12] C. Pinto, J. Furukawa, H. Fukai, and S. Tamura, Classification of Green coffee bean images basec on defect types using convolutional neural network (CNN), 2017.
[13] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner, "Gradient-based learning applied to document recognition," Proceedings of the IEEE, vol. 86, pp. 2278-2324, 1998.
[14] C. Szegedy, V. Vanhoucke, S. Ioffe, J. Shlens, and Z. Wojna, "Rethinking the inception architecture for computer vision," in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2016, pp. 2818-2826.
[15] K. He, X. Zhang, S. Ren, and J. Sun, "Deep residual learning for image recognition," in Proceedings of the IEEE conference on computer vision and pattern recognition, 2016, pp. 770-778.
[16] S. S. Mohamed, N. M. Tahir, and R. Adnan, "Background modelling and background subtraction performance for object detection," in Signal Processing and Its Applications (CSPA), 2010 6th International Colloquium on, 2010, pp. 1-6.
[17] Bayes' theorem,T. Bayes. Available:https://en.wikipedia.org/wiki/Bayes%27_theorem