Closed numb89757 closed 12 months ago
Thanks for your questions! I have revise the code and add some explanation to help readers better understand the function in the github and upload relevant files.
Thanks for your questions! I have revise the code and add some explanation to help readers better understand the function in the github and upload relevant files. This reply is also attached on the github.
This code functions to mask the semantic position manually. For each picture, we should click 4 times on the semantic position. You will see four red dots on the picture. Then, the picture will be closed and reopened automatically. You need to click 1 time on a nearby position (e.g., body) to decide the color of mask. When the operation is finished, the next picture will be opened. If the picture do not has semantic position, you can click 4 time on the same place to skip this picture.
I upload these files in the 'result_save' dir in github, you can download them. Or you can generate them from the val_distribution function in the code with some modification. I have added some notes before this sentence.
If you have any problems about the code, welcome to ask me at any time!
------------------ 原始邮件 ------------------ 发件人: "woshixuhao/semantic-explainable-AI" @.>; 发送时间: 2022年11月22日(星期二) 下午3:13 @.>; @.***>; 主题: [woshixuhao/semantic-explainable-AI] a problem when running the code S-XAI.py (Issue #1)
I'm trying to implement this project. I run the code in the sequence CNN_training.py GA.py and then S-XAI.py. I successfully run the first two python file. But when run the code in S-XAI.py, I meet a problem in this code segment:
The Exception output as follow. How could I fix the code? ----------第0次迭代---------- Traceback (most recent call last): File "S-XAI.py", line 1345, in <module> cut_position(use_model) File "S-XAI.py", line 355, in cut_position if position_spot[0]==position_spot[1]: IndexError: list index out of range
Besides, where is the file '{config.position_animal}_space_2000.npy'? I notice the code as follow I show, however I can't find the file from your Google Drive. 😢 or maybe it would generate automatically?
859 cdf_record=[] 860 for i in ['eye','nose','leg']: 861 for j in ['dog','cat']: 862 config.position_space =i 863 config.positionanimal = j 864 , _, space_index, space_value = get_position(conv_out_2_0, 5, show_picture=False) 865 space_index = np.array(space_index, dtype=int) 866 space = np.load(f'result_save/{config.position_animal}_space_2000.npy')
appreciate for your help.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
I'm trying to implement this project. I run the code in the sequence CNN_training.py GA.py and then S-XAI.py. I successfully run the first two python file. But when run the code in S-XAI.py, I meet a problem in this code segment:
The Exception output as follow. How could I fix the code?
2.
Besides, where is the file '{config.position_animal}_space_2000.npy'? I notice the code as follow I show, however I can't find the file from your Google Drive. 😢 or maybe it would generate automatically?
appreciate for your help.