naoto0804's picture
Update README.md
c964e3a verified
---
library_name: transformers
tags: []
---
# Model Card for Model ID
<!-- Provide a quick summary of what the model is/does. -->
This model is based on [LLaVA1.5-7b](https://huggingface.co/liuhaotian/llava-v1.5-7b). The model is finetuned with LoRA on [OpenCOLE1.0 dataset](naoto0804/opencole) to generate text layouts.
## Model Details
### Model Description
<!-- Provide a longer summary of what this model is. -->
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
<!--
- **Developed by:** [More Information Needed]
- **Funded by [optional]:** [More Information Needed]
- **Shared by [optional]:** [More Information Needed]
- **Model type:** [More Information Needed]
-->
- **Language(s) (NLP):** English
- **License:**
Llama 2 is licensed under the LLAMA 2 Community License, Copyright (c) Meta Platforms, Inc. All Rights Reserved.
- **Finetuned from model:** [LLaVA1.5-7b](https://huggingface.co/liuhaotian/llava-v1.5-7b)
### Model Sources [optional]
<!-- Provide the basic links for the model. -->
- **Repository:** [CyberAgentAILab/OpenCOLE](https://github.com/CyberAgentAILab/OpenCOLE)
- **Paper:** [OpenCOLE: Towards Reproducible Automatic Graphic Design Generation]()
<!-- **Demo [optional]:** [More Information Needed] -->
## Uses
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
Please refer to [OpenCOLE](https://github.com/CyberAgentAILab/OpenCOLE).
<!-- ### Direct Use -->
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
<!-- [More Information Needed] -->
<!-- ### Downstream Use [optional] -->
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
<!-- [More Information Needed] -->
<!-- ### Out-of-Scope Use -->
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
<!-- [More Information Needed] -->
<!-- ## Bias, Risks, and Limitations -->
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
<!-- [More Information Needed] -->
<!-- ### Recommendations -->
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
<!-- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. -->
<!--## How to Get Started with the Model -->
<!--Use the code below to get started with the model. -->
<!--[More Information Needed] -->
## Training Details
### Training Data
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
- About 18k image-text extracted automatically from OpenCOLE
Below is an example.
```
[
{
"id": "592d203395a7a863ddcd9df1",
"image": "images/592/592d203395a7a863ddcd9df1.png",
"conversations": [
{
"from": "human",
"value": "<image>\nGiven an image and text input including set of keywords to be placed on the image and its properties (optional), plan the layout of the texts. The output should be formatted as a JSON instance that conforms to the JSON schema below.\n\nAs an example, for the schema {\"properties\": {\"foo\": {\"title\": \"Foo\", \"description\": \"a list of strings\", \"type\": \"array\", \"items\": {\"type\": \"string\"}}}, \"required\": [\"foo\"]}\nthe object {\"foo\": [\"bar\", \"baz\"]} is a well-formatted instance of the schema. The object {\"properties\": {\"foo\": [\"bar\", \"baz\"]}} is not well-formatted.\n\nHere is the output schema:\n```\n{\"properties\": {\"elements\": {\"title\": \"Elements\", \"default\": [], \"type\": \"array\", \"items\": {\"$ref\": \"#/definitions/Element\"}}}, \"definitions\": {\"Element\": {\"title\": \"Element\", \"type\": \"object\", \"properties\": {\"text\": {\"title\": \"Text\", \"description\": \"Dummy text\", \"type\": \"string\"}, \"width\": {\"title\": \"Width\", \"description\": \"range: 0 <= width <= 127\", \"type\": \"integer\"}, \"height\": {\"title\": \"Height\", \"description\": \"range: 0 <= height <= 127\", \"type\": \"integer\"}, \"left\": {\"title\": \"Left\", \"description\": \"range: 0 <= left <= 127\", \"type\": \"integer\"}, \"top\": {\"title\": \"Top\", \"description\": \"range: 0 <= top <= 127\", \"type\": \"integer\"}, \"font\": {\"title\": \"Font\", \"type\": \"string\"}, \"color\": {\"title\": \"Color\", \"description\": \"range: 0 <= color <= 127\", \"type\": \"integer\"}, \"text_align\": {\"title\": \"Text Align\", \"description\": \"choices: \\\"\\\", \\\"left\\\", \\\"center\\\", \\\"right\\\"\", \"type\": \"string\"}, \"capitalize\": {\"title\": \"Capitalize\", \"description\": \"choices: \\\"false\\\", \\\"true\\\"\", \"type\": \"string\"}, \"font_size\": {\"title\": \"Font Size\", \"description\": \"range: 0 <= font_size <= 127\", \"type\": \"integer\"}, \"angle\": {\"title\": \"Angle\", \"description\": \"range: 0 <= angle <= 127\", \"type\": \"integer\"}, \"letter_spacing\": {\"title\": \"Letter Spacing\", \"description\": \"range: 0 <= letter_spacing <= 127\", \"type\": \"integer\"}, \"line_height\": {\"title\": \"Line Height\", \"description\": \"range: 0 <= line_height <= 127\", \"type\": \"integer\"}}, \"required\": [\"text\", \"width\", \"height\", \"left\", \"top\", \"font\", \"color\", \"text_align\", \"capitalize\", \"font_size\", \"angle\", \"letter_spacing\", \"line_height\"]}}}\n``` Input: [\"WE DON'T HAVE\\nANOTHER PLANET\", \"GREEN\", \"GO\"]"
},
{
"from": "gpt",
"value": "{\"elements\": [{\"text\": \"GO\", \"width\": 62, \"height\": 40, \"left\": 11, \"top\": 43, \"font\": \"Cormorant Infant\", \"color\": 38, \"text_align\": \"center\", \"capitalize\": \"false\", \"font_size\": 79, \"angle\": 0, \"letter_spacing\": 61, \"line_height\": 27}, {\"text\": \"GREEN\", \"width\": 69, \"height\": 30, \"left\": 6, \"top\": 60, \"font\": \"Cormorant Infant\", \"color\": 56, \"text_align\": \"center\", \"capitalize\": \"false\", \"font_size\": 67, \"angle\": 0, \"letter_spacing\": 50, \"line_height\": 27}, {\"text\": \"WE DON'T HAVE\\nANOTHER PLANET\", \"width\": 71, \"height\": 37, \"left\": 3, \"top\": 74, \"font\": \"Cormorant Infant\", \"color\": 56, \"text_align\": \"center\", \"capitalize\": \"false\", \"font_size\": 39, \"angle\": 0, \"letter_spacing\": 29, \"line_height\": 47}]}"
}
]
},
...
```
<!-- ### Training Procedure -->
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
<!-- #### Preprocessing [optional] -->
<!-- [More Information Needed] -->
<!-- #### Training Hyperparameters -->
<!-- - **Training regime:** [More Information Needed] -->
- <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
<!-- #### Speeds, Sizes, Times [optional] -->
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
<!-- [More Information Needed] -->
<!-- ## Evaluation ->
<!-- This section describes the evaluation protocols and provides the results. -->
<!-- ### Testing Data, Factors & Metrics ->
#### Testing Data
<!-- This should link to a Dataset Card if possible. -->
<!-- [More Information Needed] -->
<!-- #### Factors -->
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
<!-- [More Information Needed] -->
<!-- #### Metrics -->
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
<!-- [More Information Needed] -->
<!-- ### Results -->
<!-- [More Information Needed] -->
<!-- #### Summary -->
<!-- ## Model Examination [optional] -->
<!-- Relevant interpretability work for the model goes here -->
<!-- [More Information Needed] -->
<!-- ## Environmental Impact -->
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
<!--
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
- **Hardware Type:** [More Information Needed]
- **Hours used:** [More Information Needed]
- **Cloud Provider:** [More Information Needed]
- **Compute Region:** [More Information Needed]
- **Carbon Emitted:** [More Information Needed]
## Technical Specifications [optional]
### Model Architecture and Objective
[More Information Needed]
### Compute Infrastructure
[More Information Needed]
#### Hardware
[More Information Needed]
#### Software
[More Information Needed]
-->
## Citation
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
```
@inproceedings{inoue2024opencole,
title={{OpenCOLE: Towards Reproducible Automatic Graphic Design Generation}},
author={Naoto Inoue and Kento Masui and Wataru Shimoda and Kota Yamaguchi},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW)},
year={2024},
}
```
<!--
**APA:**
[More Information Needed]
## Glossary [optional]
-->
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
<!-- [More Information Needed] -->
<!-- ## More Information [optional] -->
<!-- [More Information Needed] -->
<!-- ## Model Card Authors [optional] -->
<!-- [More Information Needed] -->
## Model Card Contact
[Naoto Inoue](https://github.com/naoto0804)