天氣是一個很有意的研究對象,雖其本身較為複雜、連續且非線性 的動態信息。在平常生活上面的應用到特殊領域上面的科技應用,沒有不 需要對天氣進行一定程度上的分析。但是,由於大氣運動過程中所發展出 的隨機性極大以及今天的科學也沒有對大氣的一些現象有確切的證實,所 以在天氣預測上仍有存在一定的誤差。目前,天氣分類大多運用較貴的傳 感器去完成,而且偵測特定的天候都需相對應的傳感器,例如:溫濕度傳 感器、雨量傳感器等。為了降低設備成本,且避免使用眾多儀器,我們希 望統一使用電腦視覺技術來偵測所有天候狀況,通過公共影像,來精準地 對天氣情況進行分析。 本文是採用 Keras 進行深度學習。將在公共網絡上收集來的影像,然後 對影像數據進行了一個大致的整理,有一些影像連我自己都分不清楚是什 麼類別,就手動刪除,將做 4 個分類:霧,雪,雨,晴。使用 Python 進行 編號處理。轉換圖片像素,使其大小一致。將影像轉化為數組形式,進入 神經網絡進行模型訓練,增大樣本容量和增加訓練次數提高精度。最後選 擇裁剪好像素的影像上傳,得出分析結果。
Weather is a very interesting research object, even though it is with complex, continuous and nonlinear dynamic information. It is necessary for some applications of science and technology, especially special fields, to analyze the weather to a certain extent in our daily life. However, due to the great randomness developed in the process of atmospheric motion and the fact that today's science has not confirmed some atmospheric phenomena, there still exist certain errors in weather predictions. At present, most of the weather classification operates by using expensive sensors. Furthermore, the detection of specific weather requires specific sensors, such as temperature and humidity sensors, rainfall sensors, and so on. To reduce the cost of the equipment and avoid the use of many instruments, the computer vision technology is a promising solution to detect all weather conditions and accurately analyze the weather conditions through public images. In this thesis, we use keras to execute the method of deep learning. The images collected via the public network are then sorted out roughly. Moreover, some images cannot be decided belonging to which category, and will be manually deleted. Additionally, there will be 4 kinds of weather category: fog, snow, rain, and fine, to be classified and numbered through programming codes of the python. All images are converted into picture pixels with the same size, followed by transforming in a form of array, and then processing the model training by the neural network, in which we have increased the sample size and the training times for improving the accuracy. Finally, we attain the analysis results by cutting and uploading properly the images of the pixel.