fix: company name mapping
Browse files
README.md
CHANGED
@@ -3074,6 +3074,16 @@ from datasets import load_dataset
|
|
3074 |
dataset = load_dataset("PodYapolsky/LogoDet-3K")
|
3075 |
```
|
3076 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3077 |
<!--
|
3078 |
### Out-of-Scope Use
|
3079 |
|
@@ -3090,7 +3100,7 @@ The dataset is provided in Parquet format and contains the following attributes:
|
|
3090 |
{
|
3091 |
"image_path": [PIL.Image],
|
3092 |
"industy_name": [str] Industry type company's brand belongs to,
|
3093 |
-
"company_name": [
|
3094 |
"bbox": [tuple[int]] bounding box in format ('xmin', 'ymin', 'xmax', 'ymax'),
|
3095 |
}
|
3096 |
```
|
|
|
3074 |
dataset = load_dataset("PodYapolsky/LogoDet-3K")
|
3075 |
```
|
3076 |
|
3077 |
+
Company ids mapping to names and vice versa
|
3078 |
+
|
3079 |
+
```python
|
3080 |
+
company2id = {
|
3081 |
+
name: idx
|
3082 |
+
for idx, name in enumerate(dataset["train"].features["company_name"].names)
|
3083 |
+
}
|
3084 |
+
id2company = {v: k for k, v in company2id.items()}
|
3085 |
+
```
|
3086 |
+
|
3087 |
<!--
|
3088 |
### Out-of-Scope Use
|
3089 |
|
|
|
3100 |
{
|
3101 |
"image_path": [PIL.Image],
|
3102 |
"industy_name": [str] Industry type company's brand belongs to,
|
3103 |
+
"company_name": [int] The company id to which brand belongs,
|
3104 |
"bbox": [tuple[int]] bounding box in format ('xmin', 'ymin', 'xmax', 'ymax'),
|
3105 |
}
|
3106 |
```
|