hwajjala commited on
Commit
2e89562
β€’
1 Parent(s): 509301a

Bugfix update model

Browse files
Files changed (3) hide show
  1. app.py +2 -2
  2. logistic_regression_l1_oct_26.pkl +3 -0
  3. text_prompts2.json +514 -0
app.py CHANGED
@@ -12,9 +12,9 @@ from scipy.special import softmax
12
  logger = logging.getLogger("basebody")
13
  CLIP_MODEL_NAME = "ViT-B/16"
14
 
15
- TEXT_PROMPTS_FILE_NAME = "text_prompts.json"
16
  HAIR_TEXT_PROMPTS_FILE_NAME = "text_prompts_hair.json"
17
- LOGISTIC_REGRESSION_MODEL_FILE_NAME = "logistic_regression_l1_oct_2.pkl"
18
  HAIR_RF_CLASSIFIER_MODEL_FILE_NAME = "hairclassifier_rf.pkl"
19
 
20
  HF_TOKEN = os.getenv('HF_TOKEN')
 
12
  logger = logging.getLogger("basebody")
13
  CLIP_MODEL_NAME = "ViT-B/16"
14
 
15
+ TEXT_PROMPTS_FILE_NAME = "text_prompts2.json"
16
  HAIR_TEXT_PROMPTS_FILE_NAME = "text_prompts_hair.json"
17
+ LOGISTIC_REGRESSION_MODEL_FILE_NAME = "logistic_regression_l1_oct_26.pkl"
18
  HAIR_RF_CLASSIFIER_MODEL_FILE_NAME = "hairclassifier_rf.pkl"
19
 
20
  HF_TOKEN = os.getenv('HF_TOKEN')
logistic_regression_l1_oct_26.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d539f04fcb0566f83bbf1a9e06fbde0b0527bfba1ded77afe7855cb507e375c1
3
+ size 1222
text_prompts2.json ADDED
@@ -0,0 +1,514 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "clothing": [
3
+ "is character wearing clothing",
4
+ "is character not wearing clothing"
5
+ ],
6
+ "outfit": [
7
+ "is character wearing an outfit",
8
+ "is character not wearing an outfit"
9
+ ],
10
+ "equipment": [
11
+ "is character using equipment",
12
+ "is character not using equipment"
13
+ ],
14
+ "uniform": [
15
+ "is character wearing a uniform",
16
+ "is character not wearing a uniform"
17
+ ],
18
+ "jewelry": [
19
+ "is character wearing jewelry",
20
+ "is character not wearing jewelry"
21
+ ],
22
+ "jacket": [
23
+ "is character wearing a jacket",
24
+ "is character not wearing a jacket"
25
+ ],
26
+ "cardigan": [
27
+ "is character wearing a cardigan",
28
+ "is character not wearing a cardigan"
29
+ ],
30
+ "shoes": [
31
+ "is character wearing shoes",
32
+ "is character not wearing shoes"
33
+ ],
34
+ "jeans": [
35
+ "is character wearing jeans",
36
+ "is character not wearing jeans"
37
+ ],
38
+ "french": [
39
+ "is character wearing French-style clothing",
40
+ "is character not wearing French-style clothing"
41
+ ],
42
+ "chain": [
43
+ "is character wearing a chain",
44
+ "is character not wearing a chain"
45
+ ],
46
+ "weather": [
47
+ "is character wearing weather-appropriate clothing",
48
+ "is character not wearing weather-appropriate clothing"
49
+ ],
50
+ "trousers": [
51
+ "is character wearing trousers",
52
+ "is character not wearing trousers"
53
+ ],
54
+ "shorts": [
55
+ "is character wearing shorts",
56
+ "is character not wearing shorts"
57
+ ],
58
+ "tunic": [
59
+ "is character wearing a tunic",
60
+ "is character not wearing a tunic"
61
+ ],
62
+ "gown": [
63
+ "is character wearing a gown",
64
+ "is character not wearing a gown"
65
+ ],
66
+ "shirt": [
67
+ "is character wearing a shirt",
68
+ "is character not wearing a shirt"
69
+ ],
70
+ "hoodie": [
71
+ "is character wearing a hoodie",
72
+ "is character not wearing a hoodie"
73
+ ],
74
+ "crown": [
75
+ "is character wearing a crown",
76
+ "is character not wearing a crown"
77
+ ],
78
+ "suit": [
79
+ "is character wearing a suit",
80
+ "is character not wearing a suit"
81
+ ],
82
+ "armor": [
83
+ "is character wearing armor",
84
+ "is character not wearing armor"
85
+ ],
86
+ "kimono": [
87
+ "is character wearing a kimono",
88
+ "is character not wearing a kimono"
89
+ ],
90
+ "camping": [
91
+ "is character using camping equipment",
92
+ "is character not using camping equipment"
93
+ ],
94
+ "text": [
95
+ "is character wearing clothing with letters or numbers",
96
+ "is character not wearing clothing with letters or numbers"
97
+ ],
98
+ "blouse": [
99
+ "is character wearing a blouse",
100
+ "is character not wearing a blouse"
101
+ ],
102
+ "pajamas": [
103
+ "is character wearing pajamas",
104
+ "is character not wearing pajamas"
105
+ ],
106
+ "glasses": [
107
+ "is character wearing glasses",
108
+ "is character not wearing glasses"
109
+ ],
110
+ "cashmere": [
111
+ "is character wearing cashmere",
112
+ "is character not wearing cashmere"
113
+ ],
114
+ "knight": [
115
+ "is character dressed as a knight",
116
+ "is character not dressed as a knight"
117
+ ],
118
+ "fly": [
119
+ "is character wearing flying gear",
120
+ "is character not wearing flying gear"
121
+ ],
122
+ "overalls": [
123
+ "is character wearing overalls",
124
+ "is character not wearing overalls"
125
+ ],
126
+ "boxing": [
127
+ "is character wearing boxing gloves",
128
+ "is character not wearing boxing gloves"
129
+ ],
130
+ "lipstick": [
131
+ "is character wearing lipstick",
132
+ "is character not wearing lipstick"
133
+ ],
134
+ "pants": [
135
+ "is character wearing pants",
136
+ "is character not wearing pants"
137
+ ],
138
+ "apron": [
139
+ "is character wearing an apron",
140
+ "is character not wearing an apron"
141
+ ],
142
+ "zipper": [
143
+ "is character wearing something with a zipper",
144
+ "is character not wearing something with a zipper"
145
+ ],
146
+ "fighting": [
147
+ "is character wearing fighting gear",
148
+ "is character not wearing fighting gear"
149
+ ],
150
+ "headset": [
151
+ "is character wearing a headset",
152
+ "is character not wearing a headset"
153
+ ],
154
+ "lace": [
155
+ "is character wearing lace",
156
+ "is character not wearing lace"
157
+ ],
158
+ "bowling": [
159
+ "is character wearing bowling shoes",
160
+ "is character not wearing bowling shoes"
161
+ ],
162
+ "shawl": [
163
+ "is character wearing a shawl",
164
+ "is character not wearing a shawl"
165
+ ],
166
+ "flannel": [
167
+ "is character wearing flannel",
168
+ "is character not wearing flannel"
169
+ ],
170
+ "boots": [
171
+ "is character wearing boots",
172
+ "is character not wearing boots"
173
+ ],
174
+ "helmet": [
175
+ "is character wearing a helmet",
176
+ "is character not wearing a helmet"
177
+ ],
178
+ "t-shirt": [
179
+ "is character wearing a t-shirt",
180
+ "is character not wearing a t-shirt"
181
+ ],
182
+ "sandals": [
183
+ "is character wearing sandals",
184
+ "is character not wearing sandals"
185
+ ],
186
+ "jersey": [
187
+ "is character wearing a jersey",
188
+ "is character not wearing a jersey"
189
+ ],
190
+ "glove": [
191
+ "is character wearing gloves",
192
+ "is character not wearing gloves"
193
+ ],
194
+ "outdoors": [
195
+ "is character wearing outdoor gear",
196
+ "is character not wearing outdoor gear"
197
+ ],
198
+ "cargo": [
199
+ "is character wearing cargo pants",
200
+ "is character not wearing cargo pants"
201
+ ],
202
+ "tank top": [
203
+ "is character wearing a tank top",
204
+ "is character not wearing a tank top"
205
+ ],
206
+ "hair extensions": [
207
+ "is character wearing hair extensions",
208
+ "is character not wearing hair extensions"
209
+ ],
210
+ "scarf": [
211
+ "is character wearing a scarf",
212
+ "is character not wearing a scarf"
213
+ ],
214
+ "coat": [
215
+ "is character wearing a coat",
216
+ "is character not wearing a coat"
217
+ ],
218
+ "robe": [
219
+ "is character wearing a robe",
220
+ "is character not wearing a robe"
221
+ ],
222
+ "wizard": [
223
+ "is character dressed as a wizard",
224
+ "is character not dressed as a wizard"
225
+ ],
226
+ "backpack": [
227
+ "is character wearing a backpack",
228
+ "is character not wearing a backpack"
229
+ ],
230
+ "trenchcoat": [
231
+ "is character wearing a trenchcoat",
232
+ "is character not wearing a trenchcoat"
233
+ ],
234
+ "dress": [
235
+ "is character wearing a dress",
236
+ "is character not wearing a dress"
237
+ ],
238
+ "hat": [
239
+ "is character wearing a hat",
240
+ "is character not wearing a hat"
241
+ ],
242
+ "belt": [
243
+ "is character wearing a belt",
244
+ "is character not wearing a belt"
245
+ ],
246
+ "watch": [
247
+ "is character wearing a watch",
248
+ "is character not wearing a watch"
249
+ ],
250
+ "bag": [
251
+ "is character carrying a bag",
252
+ "is character not carrying a bag"
253
+ ],
254
+ "umbrella": [
255
+ "is character holding an umbrella",
256
+ "is character not holding an umbrella"
257
+ ],
258
+ "tattoo": [
259
+ "does character have a tattoo",
260
+ "does character not have a tattoo"
261
+ ],
262
+ "piercing": [
263
+ "does character have a piercing",
264
+ "does character not have a piercing"
265
+ ],
266
+ "bracelet": [
267
+ "is character wearing a bracelet",
268
+ "is character not wearing a bracelet"
269
+ ],
270
+ "necklace": [
271
+ "is character wearing a necklace",
272
+ "is character not wearing a necklace"
273
+ ],
274
+ "background-objects": [
275
+ "are there objects in the background",
276
+ "there are no objects in the background"
277
+ ],
278
+ "foreground-objects": [
279
+ "are there objects in the foreground",
280
+ "there are no objects in the foreground"
281
+ ],
282
+ "animals": [
283
+ "is there an animal near the character",
284
+ "there is no animal near the character"
285
+ ],
286
+ "vehicles": [
287
+ "is there a vehicle near the character",
288
+ "there is no vehicle near the character"
289
+ ],
290
+ "instruments": [
291
+ "is character holding a musical instrument",
292
+ "is character not holding a musical instrument"
293
+ ],
294
+ "weapons": [
295
+ "is character holding a weapon",
296
+ "is character not holding a weapon"
297
+ ],
298
+ "food-drink": [
299
+ "is character holding food or drink",
300
+ "is character not holding food or drink"
301
+ ],
302
+ "electronics": [
303
+ "is character using an electronic device",
304
+ "is character not using an electronic device"
305
+ ],
306
+ "books": [
307
+ "is character holding a book",
308
+ "is character not holding a book"
309
+ ],
310
+ "horns": [
311
+ "character has horns",
312
+ "character does not have horns"
313
+ ],
314
+ "skirt": [
315
+ "is character wearing a skirt",
316
+ "is character not wearing a skirt"
317
+ ],
318
+ "sweater": [
319
+ "is character wearing a sweater",
320
+ "is character not wearing a sweater"
321
+ ],
322
+ "sweatshirt": [
323
+ "is character wearing a sweatshirt",
324
+ "is character not wearing a sweatshirt"
325
+ ],
326
+ "sweatpants": [
327
+ "is character wearing sweatpants",
328
+ "is character not wearing sweatpants"
329
+ ],
330
+ "sunglasses": [
331
+ "is character wearing sunglasses",
332
+ "is character not wearing sunglasses"
333
+ ],
334
+ "tie": [
335
+ "is character wearing a tie",
336
+ "is character not wearing a tie"
337
+ ],
338
+ "skateboard": [
339
+ "is character using a skateboard",
340
+ "is character not using a skateboard"
341
+ ],
342
+ "skates": [
343
+ "is character using skates",
344
+ "is character not using skates"
345
+ ],
346
+ "rollerblades": [
347
+ "is character using rollerblades",
348
+ "is character not using rollerblades"
349
+ ],
350
+ "roller-skates": [
351
+ "is character using roller-skates",
352
+ "is character not using roller-skates"
353
+ ],
354
+ "surfboard": [
355
+ "is character using a surfboard",
356
+ "is character not using a surfboard"
357
+ ],
358
+ "snowboard": [
359
+ "is character using a snowboard",
360
+ "is character not using a snowboard"
361
+ ],
362
+ "skis": [
363
+ "is character using skis",
364
+ "is character not using skis"
365
+ ],
366
+ "goggles": [
367
+ "is character wearing goggles",
368
+ "is character not wearing goggles"
369
+ ],
370
+ "gloves": [
371
+ "is character wearing gloves",
372
+ "is character not wearing gloves"
373
+ ],
374
+ "mittens": [
375
+ "is character wearing mittens",
376
+ "is character not wearing mittens"
377
+ ],
378
+ "human": [
379
+ "is character human",
380
+ "is character not human"
381
+ ],
382
+ "animal": [
383
+ "is character an animal",
384
+ "is character not an animal"
385
+ ],
386
+ "hair": [
387
+ "does character have hair on its head",
388
+ "does character not have hair on its head"
389
+ ],
390
+ "bald": [
391
+ "is character bald",
392
+ "is character not bald"
393
+ ],
394
+ "headband": [
395
+ "is character wearing a headband",
396
+ "is character not wearing a headband"
397
+ ],
398
+ "tiara": [
399
+ "is character wearing a tiara",
400
+ "is character not wearing a tiara"
401
+ ],
402
+ "turban": [
403
+ "is character wearing a turban",
404
+ "is character not wearing a turban"
405
+ ],
406
+ "bandana": [
407
+ "is character wearing a bandana",
408
+ "is character not wearing a bandana"
409
+ ],
410
+ "hood": [
411
+ "is character wearing a hood",
412
+ "is character not wearing a hood"
413
+ ],
414
+ "wig": [
415
+ "is character wearing a wig",
416
+ "is character not wearing a wig"
417
+ ],
418
+ "headphones": [
419
+ "is character wearing headphones",
420
+ "is character not wearing headphones"
421
+ ],
422
+ "earmuffs": [
423
+ "is character wearing earmuffs",
424
+ "is character not wearing earmuffs"
425
+ ],
426
+ "veil": [
427
+ "is character wearing a veil",
428
+ "is character not wearing a veil"
429
+ ],
430
+ "feathers": [
431
+ "are there feathers on the character's head",
432
+ "there are no feathers on the character's head"
433
+ ],
434
+ "antenna": [
435
+ "does character have antenna on its head",
436
+ "does character not have antenna on its head"
437
+ ],
438
+ "head-decoration": [
439
+ "is there any decoration on the character's head",
440
+ "there is no decoration on the character's head"
441
+ ],
442
+ "skeleton": [
443
+ "is character a skeleton",
444
+ "is character not a skeleton"
445
+ ],
446
+ "robot": [
447
+ "is character a robot",
448
+ "is character not a robot"
449
+ ],
450
+ "cyborg": [
451
+ "is character a cyborg",
452
+ "is character not a cyborg"
453
+ ],
454
+ "mechanical-arm": [
455
+ "is character having a mechanical arm",
456
+ "is character not having a mechanical arm"
457
+ ],
458
+ "mechanical-leg": [
459
+ "is character having a mechanical leg",
460
+ "is character not having a mechanical leg"
461
+ ],
462
+ "exoskeleton": [
463
+ "is character wearing an exoskeleton",
464
+ "is character not wearing an exoskeleton"
465
+ ],
466
+ "bionic-eye": [
467
+ "does character have a bionic eye",
468
+ "does character not have a bionic eye"
469
+ ],
470
+ "mechanical-parts": [
471
+ "does character have visible mechanical parts",
472
+ "does character not have visible mechanical parts"
473
+ ],
474
+ "wires": [
475
+ "are there wires on or around the character",
476
+ "there are no wires on or around the character"
477
+ ],
478
+ "metallic-skin": [
479
+ "does character have metallic skin or surface",
480
+ "does character not have metallic skin or surface"
481
+ ],
482
+ "led-lights": [
483
+ "does character have LED lights or indicators",
484
+ "does character not have LED lights or indicators"
485
+ ],
486
+ "holographic-display": [
487
+ "does character have a holographic display or interface",
488
+ "does character not have a holographic display or interface"
489
+ ],
490
+ "battery-pack": [
491
+ "is character wearing or having a visible battery pack",
492
+ "is character not wearing or having a visible battery pack"
493
+ ],
494
+ "circuitry": [
495
+ "is visible circuitry present on the character",
496
+ "no visible circuitry is present on the character"
497
+ ],
498
+ "hydraulic-system": [
499
+ "does character have a visible hydraulic system",
500
+ "does character not have a visible hydraulic system"
501
+ ],
502
+ "cooling-fans": [
503
+ "does character have visible cooling fans or vents",
504
+ "does character not have visible cooling fans or vents"
505
+ ],
506
+ "control-panel": [
507
+ "does character have a control panel or interface",
508
+ "does character not have a control panel or interface"
509
+ ],
510
+ "gear-mechanism": [
511
+ "is there a visible gear mechanism on the character",
512
+ "there is no visible gear mechanism on the character"
513
+ ]
514
+ }