Adapting commited on
Commit
7fbe05d
1 Parent(s): c6f3b35

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -7
README.md CHANGED
@@ -7,22 +7,21 @@ tags:
7
  # Usage
8
 
9
  ```python
10
- from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
11
 
12
- tokenizer = AutoTokenizer.from_pretrained("Adapting/KeyBartAdapter")
 
13
 
14
- model = AutoModelForSeq2SeqLM.from_pretrained("Adapting/KeyBartAdapter")
 
15
  ```
16
- - init model: `9c3ed39c6ed5c7e141363e892d77cf8f589d5999`
17
- - 21 epoch: `38d17da9d05c05929bd57bd3ddf377fdb436261f`
18
 
19
  **1. inference**
20
 
21
- ```python
22
  from transformers import Text2TextGenerationPipeline
23
  pipe = Text2TextGenerationPipeline(model=model,tokenizer=tokenizer)
24
 
25
-
26
  abstract = '''Non-referential face image quality assessment methods have gained popularity as a pre-filtering step on face recognition systems. In most of them, the quality score is usually designed with face matching in mind. However, a small amount of work has been done on measuring their impact and usefulness on Presentation Attack Detection (PAD). In this paper, we study the effect of quality assessment methods on filtering bona fide and attack samples, their impact on PAD systems, and how the performance of such systems is improved when training on a filtered (by quality) dataset. On a Vision Transformer PAD algorithm, a reduction of 20% of the training dataset by removing lower quality samples allowed us to improve the BPCER by 3% in a cross-dataset test.'''
27
 
28
  pipe(abstract)
 
7
  # Usage
8
 
9
  ```python
10
+ !pip install KeyBartAdapter
11
 
12
+ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
13
+ from models import KeyBartAdapter
14
 
15
+ model = KeyBartAdapter.from_pretrained('Adapting/KeyBartAdapter',adapter_hid_dim =256)
16
+ tokenizer = AutoTokenizer.from_pretrained("bloomberg/KeyBART")
17
  ```
18
+ - adapter layer hd 256 init model: `9c3ed39c6ed5c7e141363e892d77cf8f589d5999`
 
19
 
20
  **1. inference**
21
 
 
22
  from transformers import Text2TextGenerationPipeline
23
  pipe = Text2TextGenerationPipeline(model=model,tokenizer=tokenizer)
24
 
 
25
  abstract = '''Non-referential face image quality assessment methods have gained popularity as a pre-filtering step on face recognition systems. In most of them, the quality score is usually designed with face matching in mind. However, a small amount of work has been done on measuring their impact and usefulness on Presentation Attack Detection (PAD). In this paper, we study the effect of quality assessment methods on filtering bona fide and attack samples, their impact on PAD systems, and how the performance of such systems is improved when training on a filtered (by quality) dataset. On a Vision Transformer PAD algorithm, a reduction of 20% of the training dataset by removing lower quality samples allowed us to improve the BPCER by 3% in a cross-dataset test.'''
26
 
27
  pipe(abstract)