該存儲庫包含用於使用GPT-4V進行色覺缺乏症的皮膚鏡分類的代碼和數據。
閱讀論文
請找到Mendeley數據的GPT模型的詳細響應
numpy
pil
道爾頓倫
JSON
Openai
基礎64
貓熊
. ├── data # Contains subdirectories for processed data │ ├── all │ ├── all_resized │ ├── all_resized_brettel_protan_1 │ ├── all_resized_brettel_deutan_1 │ ├── all_resized_brettel_tritan_1 │ ├── bn │ ├── bn_resized │ ├── bn_resized_label │ ├── bn_resized_label_brettel_protan_1 │ ├── bn_resized_label_brettel_deutan_1 │ ├── bn_resized_label_brettel_tritan_1 │ ├── mm │ ├── mm_resized │ ├── mm_resized_label │ ├── mm_resized_label_brettel_protan_1 │ ├── mm_resized_label_brettel_deutan_1 │ ├── mm_resized_label_brettel_tritan_1 │ └── selected_images.xlsx # Image names ├── RAW # Contains raw data downloaded from ISCI Archive ├── result # Results from running API_calling will be stored here │ ├── 2_shot_brettel_protan_1 │ │ ├──rep 1 │ │ └── ... │ ├── 2_shot_brettel_deutan_1 │ └── ... ├── CVD_classification_GPT.py # Call OpenAI API for classification ├── CVD_convertor.py # Convert original image to CVD simulated image ├── data_labeling.py # Add label to the image for reference ├── data_resizing.py # Resize the data with the original aspect ratio ├── data_selection.py # Select data from RAW └── README.md
所有皮膚鏡圖像均從ISIC存檔下載。
該項目僅用於學術研究目的。此存儲庫中的代碼按MIT許可發布。如果您使用提供的數據,請引用ISIC Archive.s
對於CVD模擬,我們選擇了Daltonlens-Python包。它涵蓋了各種Colorblindness模擬的當前可用算法。作者的博客也值得一讀。
我們選擇了Brettel等人。 1997年為CVD仿真方法,並將嚴重性設置為1,可以根據需要使用提供的代碼進行調整。
良性示例:ISIC_0012656
黑色素瘤示例:ISIC_0046725
從ISIC存檔下載原始數據
選擇數據:
運行python data_selection.py- [選項]
過程數據:
運行python data_resizeing.py- [選項]
運行python data_labeling.py- [選項]
轉換數據:
運行python cvd_convertor.py- [選項]
致電API:
運行python cvd_classification_gpt.py- [選項]
(a)非模擬和CVD模擬圖像(Protanopia,deuteranopia,tritanopia)的GPT-4V的平均分類精度。錯誤條:標準偏差。 *:p <0.05; **:p <0.01(t檢驗;兩尾)。 NS:不重要。所有實驗均以十個重複。 (b)在每個圖像查詢的十個重複中應用共識策略後,GPT-4V的分類精度。包括GPT-4O進行比較。
GPT-4V將其對基於顏色的發現的解釋轉化為不同的CVD模擬。具體而言,它沒有在Protanope和Deuteranope模擬中提到紅色或粉紅色,而是將這些顏色與非模擬圖像中的黑色素瘤預測相關聯。在Tritanopia模擬中,通過普遍的粉紅色色調來表徵 - GPT-4V不再將粉紅色視為黑色素瘤特徵。
對於每個非模擬和曲線模擬的條件,根據GPT-4V對其預測的解釋確定了兩組圖像查詢。第一組標記為“紅色”,其中包括描述,其中提到了紅色以描述查詢圖像,而不論粉紅色如何。第二組標記為“粉紅色”,包括描述專門提及沒有紅色的粉紅色。 Y軸顯示每個重複的“黑色素瘤”預測的百分比。默認情況下,查詢和參考圖像均未模擬或模擬為相同的CVD條件。通過從非模擬圖像中抽樣參考文獻,進行了一次消融測試(最後兩列)。 ***:p <0.001(t檢驗;兩尾)。