You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 15, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 15, 2026. It is now read-only.
Question about use custom text as input Parse-Then-Place #46
Thank you very much for your work!
May I ask if it is possible to use custom text as input for LayoutPromoter and Parse-Then-Place? It seems that the input must contain ir and elements, and I can only call inputs from the existing test.json file. Is there a way to input custom text directly?
We are pleased to share with you that it's possible to use custom text for Parse-Then-Place. Specifically, there are totally 4 steps that you can follow to accomplish this.
Adapt the eval_split name in the script, maybe something like mydata.
Create a new json file in the folder Parse-Then-Place/data/$dataset/stage2/finetune/mydata.json according to the split name you specified in step 1.
Construct the sample based on your custom text in mydata.json. Below is an example:
[
{
"text": "a page for end user license agreement. on the top, there is a toolbar with a text button for the back on the left and a text in the middle. below is a text button for the end user license agreement. in the middle, there is a text occupying most of the page.",
"region_id": "",
"region_type": "",
"ir": "[region:SingleInfo]",
"execution": "",
"layout_seq_with_completion": "",
"layout_seq_without_completion": "",
"plain_layout_seq": "",
"canvas_width": 1440,
"canvas_height": 2560
}
]
Test on your custom text using the same command in README! And please check your result in the folder tmp/output/$dataset/stage1/mydata_predictions.json.
Activity
kaoshizhou commentedon Oct 14, 2024
Hi rui (@ruick),
We are pleased to share with you that it's possible to use custom text for Parse-Then-Place. Specifically, there are totally 4 steps that you can follow to accomplish this.
eval_splitname in the script, maybe something likemydata.Parse-Then-Place/data/$dataset/stage2/finetune/mydata.jsonaccording to the split name you specified in step 1.mydata.json. Below is an example:[ { "text": "a page for end user license agreement. on the top, there is a toolbar with a text button for the back on the left and a text in the middle. below is a text button for the end user license agreement. in the middle, there is a text occupying most of the page.", "region_id": "", "region_type": "", "ir": "[region:SingleInfo]", "execution": "", "layout_seq_with_completion": "", "layout_seq_without_completion": "", "plain_layout_seq": "", "canvas_width": 1440, "canvas_height": 2560 } ]tmp/output/$dataset/stage1/mydata_predictions.json.