trojblue commited on
Commit
0b231d1
·
verified ·
1 Parent(s): 608d19a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +21 -0
README.md CHANGED
@@ -17,3 +17,24 @@ configs:
17
  - split: train
18
  path: data/train-*
19
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  - split: train
18
  path: data/train-*
19
  ---
20
+
21
+ # dataproc5/tmp-danbooru2025-row-priorities
22
+
23
+ The repo contains priority scores by id for tag blancing task, as part of the dataproc5 pipeline.
24
+
25
+ ```python
26
+ import unibox as ub
27
+ from dataproc5.pipelines.danbooru.nodes import prepare_balancing_tags, select_balanced_images, prepare_row_priorities
28
+
29
+ dbr_df = ub.loads("hf://trojblue/danbooru2025-metadata").to_pandas()
30
+ tag_counts_all_df = ub.loads("hf://dataproc5/metrics-danbooru2025-alltime-tag-counts").to_pandas()
31
+
32
+ tag_df = prepare_balancing_tags(dbr_df, tag_counts_all_df, key_col="id")
33
+ dbr_df = dbr_df.merge(tag_df, on="id", how="left")
34
+
35
+ priority_df = prepare_row_priorities(dbr_df, column_name="_priority", key_col="id")
36
+ dbr_df = dbr_df.merge(priority_df, on="id", how="left")
37
+
38
+ # Then you can sort by the new priority
39
+ dbr_df.sort_values("_priority", ascending=False, inplace=True)
40
+ ```