NebulaeWis commited on
Commit
bd00d6e
1 Parent(s): 356d99e

Upload 2 files

Browse files
Files changed (2) hide show
  1. report.xlsx +0 -0
  2. test.py +42 -0
report.xlsx ADDED
Binary file (10 kB). View file
 
test.py ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ Created on Wed Mar 13 14:03:54 2024
4
+
5
+ @author: rezer
6
+ """
7
+
8
+ from sdeval.fidelity import CCIPMetrics
9
+ from sdeval.controllability import BikiniPlusMetrics
10
+ from sdeval.corrupt import AICorruptMetrics
11
+ import os
12
+
13
+
14
+ ccip = CCIPMetrics(images=r'jerry_test\train\1_1girl')
15
+ bp = BikiniPlusMetrics(
16
+ tag_blacklist=[
17
+ 'bangs', 'long_hair', 'blue_eyes', 'animal_ears', 'sleeveless',
18
+ 'breasts', 'grey_hair', 'medium_breasts'
19
+ ]
20
+ )
21
+ metrics = AICorruptMetrics()
22
+ lora_base_name_list=["surtr_arknights-000010",
23
+ "surtr_arknights-000012",
24
+ "surtr_arknights-000014",
25
+ "surtr_arknights-000016",
26
+ "surtr_arknights-000018",
27
+ "surtr_arknights-000020",
28
+ "surtr_arknights-000022",
29
+ "surtr_arknights",]
30
+ base_path=r'jerry_test'
31
+
32
+ import pandas as pd
33
+ l=[]
34
+ for lora_base_name in lora_base_name_list:
35
+ test_image_dir=os.path.join(base_path,lora_base_name)
36
+ ccip_score=ccip.score( test_image_dir)
37
+ metrics_score=metrics.score(test_image_dir)
38
+ bp_score=bp.score(test_image_dir)
39
+ score=[lora_base_name,ccip_score,metrics_score,bp_score]
40
+ print(f"lora_name:{lora_base_name},ccip:{ccip_score},bp:{bp_score},AI-C:{metrics_score}")
41
+ l.append(score)
42
+ pd.DataFrame(l).to_excel("report.xlsx")