91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

用Python計算圖像對不同地物分類精確度, 計算分類結果圖與標準參考圖的混淆矩陣, 對分類結果進行評價

資源截圖

代碼片段和文件信息

from?PIL?import?Image
from?sklearn?import?metrics
from?sklearn.metrics?import?confusion_matrix
from?sklearn.metrics?import?classification_report
import?numpy?as?np

im_re?=?Image.open(‘picture1.tif‘)
im_pre?=?Image.open(‘picture2.png‘)

#?pix_re?=?im_re.load()
#?pix_pre?=?im_pre.load()
im_re_array?=?np.array(im_re)
im_pre_array?=?np.array(im_pre)
rows_recols_redims_re=im_re_array.shape
rows_precols_predims_pre=im_re_array.shape
#?width?=?im_re.size[0]
#?height?=?im_re.size[1]
#?widthheight=im_re.size
im_re_ture?=?[([0]?*?cols_re)?for?i?in?range(rows_re)]
im_pre_pred?=?[([0]?*?cols_pre)?for?j?in?range(rows_pre)]
for?x?in?range(rows_re):
????for?y?in?range(cols_re):
????????rgb?=?im_re_array[xy:]
????????if?r?==?255?&?g?==?255?&?b?==?255:
????????????im_re_tu

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????2193??2018-05-31?16:36??混淆矩陣\confusion_matrix.py

?????文件????????302??2018-05-31?16:43??混淆矩陣\Readme.txt

?????目錄??????????0??2018-05-31?16:44??混淆矩陣

-----------?---------??----------?-----??----

?????????????????2495????????????????????3


評論

共有 條評論