Update README.md
Browse files
README.md
CHANGED
|
@@ -65,7 +65,6 @@ Without introducing any complex architectures or special patterns, we show how e
|
|
| 65 |
|
| 66 |
# Model Usage
|
| 67 |
|
| 68 |
-
|
| 69 |
## Inference with 🤗 Hugging Face Transformers
|
| 70 |
|
| 71 |
It is recommended to use python=3.10, torch>=2.1.0, and transformers=4.48.2 as the development environment.
|
|
@@ -96,13 +95,14 @@ response = processor.batch_decode(
|
|
| 96 |
generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
|
| 97 |
)[0]
|
| 98 |
print(response)
|
| 99 |
-
|
| 100 |
```
|
| 101 |
|
|
|
|
| 102 |
## Decode the polygons and masks from the response string
|
| 103 |
|
| 104 |
```python
|
| 105 |
import re
|
|
|
|
| 106 |
import pycocotools.mask as mask_utils
|
| 107 |
|
| 108 |
class RegexPatterns:
|
|
|
|
| 65 |
|
| 66 |
# Model Usage
|
| 67 |
|
|
|
|
| 68 |
## Inference with 🤗 Hugging Face Transformers
|
| 69 |
|
| 70 |
It is recommended to use python=3.10, torch>=2.1.0, and transformers=4.48.2 as the development environment.
|
|
|
|
| 95 |
generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
|
| 96 |
)[0]
|
| 97 |
print(response)
|
|
|
|
| 98 |
```
|
| 99 |
|
| 100 |
+
|
| 101 |
## Decode the polygons and masks from the response string
|
| 102 |
|
| 103 |
```python
|
| 104 |
import re
|
| 105 |
+
import json
|
| 106 |
import pycocotools.mask as mask_utils
|
| 107 |
|
| 108 |
class RegexPatterns:
|