View Code? Open in Web Editor
NEW
System Implementation from 'Enhancing Underwater Images: Automatic Colorization using Deep Learning and Image Enhancement Techniques', 2023 IEEE International Conference on Marine Artificial Intelligence and Law (IEEE ICMAIL 2023).
License: MIT License
Python 99.63%
Dockerfile 0.37%
give-ocean-a-piece-of-your-mind's People
Watchers
give-ocean-a-piece-of-your-mind's Issues
如遇到 QObject::moveToThread: Current thread(...) is not the object
s thread` 的錯誤
是由於 opencv 與 qt 之間的衝突,可以嘗試此方法 解決
main分支為專題競賽使用之分支
old-waternet為目前main分支之無文件版本
由於本系統的視窗大小固定,可能會讓與測試電腦不同解析度的使用者有不好的使用體驗。
def use_waterNet (self ):
def call_inference (): # inference.py (WaterNet)
# 設定參數
inference_path = os .path .expanduser ("waternet/inference.py" )
source_path = os .path .expanduser (self .img_path )
weights_path = os .path .expanduser ("waternet/weights/last.pt" )
output_path = os .path .expanduser ('res/' )
#使用subprocess.call()來呼叫inference.py程式
subprocess .call ([
"python3" , inference_path ,
"--source" , source_path ,
"--weights" , weights_path ,
"--output" , output_path ,
])
其中 "python3", inference_path,
是基於 ubuntu 環境下運行,如果是在 windows 環境下使用,會出現"Error: 請先上傳圖片或是您的waterNet運行有錯誤"。
請更換您的環境或是將 "python3", inference_path,
改為 "python", inference_path,
。
#22 使用鏡頭模式時,先使用 waterNet 再使用自動上色,自動上色無法正常處理。
圖片最高經度只能1080p,再高的話自動上色會爆vram
在 #2 中有說明:處理操作順序會造成的各種意外錯誤,目前用簡單的措施應對。由於無法保證不會有錯誤發生,後續一定需要處理。
使用 Qt 能提高縮放圖片的精度
def load_image (self ):
pixmap = QPixmap ('res/delta_e_1.png' )
scaled_pixmap = pixmap .scaled (500 , 500 , Qt .KeepAspectRatio , Qt .SmoothTransformation )
self .image_label .setPixmap (scaled_pixmap )
anaconda numpy version: 1.22.0
anaconda python version: 3.10
可能是colormath套件的問題
在重新上傳圖片後,拉條不會消失,仍然會繼續存在,需要在重新上傳圖片後將拉條清除
請確認 #5
請確認 waterNet 與 colorization 是否能獨立運行
在介面中按下 waterNet 或 colorization ,正常情況會在 terminal 中顯示運行過程,如果沒有出現如 Using device: cuda Total images/videos: 1 Saved output to res!
代表運行有問題,請檢查您的環境是否有按照文件設置。
請確認 waterNet 與 colorization 的資料夾內是否有放入權重檔案