system_message = """You are an AI assistant playing the spot the difference game. You will be presented with several sentences that describe the images. The sentences include the captions of the image, the normalized bounding box coordinates and the name of objects shown in the image. The two images are sampled from COCO 2017 training set.\n\nYour response shall always contain two pairs of question and answer. Your generated questions should include asking the differences between the two images or the differences between the two similar objects in the image.\n\nThe output format must be "Question: xxx\nAnswer: xxx". The question you generate should have definite and concrete answer according to the description. You may use diverse sentences to ask the questions but they should be only concentrating on difference. When generating answer, you should answer as if you are watching the images. You do not have to provide a specific answer and you should not ask for more details.\n\nEach description mentioned in each round of conversation is independent. You should not assume that the descriptions in a new round of conversation are related to the previous context."""

in_context = [
    {
        "role": "user",
        "content": """image a:\nA smiling old lady holds a pizza on a plate.\nA woman holding a plate with a pizza on it\nA Woman carrying homemade pizza to the table.\nA woman holding a pizza on a red plate.\nA woman walking with a pan in her hands with a whole pizza on it. \nperson: [64.72, 5.75, 414.2, 627.06]\npizza: [51.2, 460.8, 206.31, 115.95]\nmicrowave: [5.75, 136.63, 192.72, 181.21]\nimage b:\nA woman at a stainless steel counter making pizza.\nA woman in the kitchen spreading dough next to a pizza.\na woman in a blue shirt making some pizza dough and a pizza \nA woman standing next to a pizza on top of a metal counter.\nWoman making fresh gourmet pizzas in her kitchen\nrefrigerator: [2.88, 44.34, 97.79, 568.09]\nchair: [293.73, 260.8, 178.86, 113.34]\ndining table: [46.02, 339.18, 433.98, 293.39]\nperson: [43.15, 73.35, 353.79, 506.25]\npizza: [146.5, 484.0, 325.0, 156.0]\nbowl: [437.35, 338.81, 42.65, 36.28]\nchair: [383.41, 170.61, 33.22, 48.35]\n""",
        "role": "assistant",
        "content": """Question: Can you see any difference between these two images?\nAnswer:In the previous image, the woman is holding the pizza while the second woman is standing next to the pizza.\nQuestion: What is the color different between these two women?\nAnswer: The first woman is wearing a brown T-shirt while the second woman wearing a blue one.""",
    },
    {
        "role": "user",
        "content": """image a:\nA living room with a couch in front of a TV.\nA small living room with shelving by the window, a small sofa and coffee table and a television\nA living area with a couch, coffee table and a television.\nA homey comfortable room with sun streaming through a window.\nA living room with a sunny window, couch and a tv.\ntv: [566.75, 216.47, 73.02, 122.84]\nbottle: [381.1, 261.65, 24.53, 62.02]\ncouch: [2.06, 254.97, 301.42, 217.8]\ndining table: [313.98, 302.68, 172.8, 168.28]\nremote: [347.3, 334.83, 63.96, 13.04]\nbook: [269.83, 278.65, 56.07, 15.61]\nbook: [215.29, 289.09, 45.63, 7.6]\nbook: [217.13, 277.32, 53.15, 10.18]\nbook: [491.59, 258.14, 11.29, 18.53]\nbook: [272.36, 271.8, 52.12, 14.41]\nbird: [112.28, 236.03, 13.72, 23.97]\npotted plant: [380.79, 158.62, 100.95, 87.75]\nbook: [265.48, 259.9, 41.03, 8.5]\nbook: [403.92, 282.83, 45.88, 27.98]\nbook: [215.96, 271.12, 43.02, 9.44]\nbook: [482.55, 302.69, 20.27, 29.42]\nbook: [396.62, 276.81, 46.59, 24.73]\nbook: [263.74, 263.63, 47.82, 7.79]\nbook: [275.38, 291.13, 53.9, 7.63]\nvase: [516.25, 92.92, 35.0, 39.92]\nremote: [612.91, 205.18, 27.09, 8.1]\nbook: [466.5, 258.38, 13.22, 20.34]\nbook: [114, 238, 424, 70]\nimage b:\nA living room filled with furniture and a book shelf filled with books.\nthere is a very large bookcase with many books in this room\na cluttered living room with book shelves and furniture.\na room full of book cases couches and chairs \nA room is cluttered with furniture and a large full bookcase.\nchair: [192.56, 268.97, 136.96, 115.4]\ncouch: [0.0, 239.17, 196.13, 235.36]\nvase: [116.4, 71.22, 19.19, 25.25]\nvase: [553.88, 20.63, 17.86, 30.32]\nbowl: [437.55, 26.27, 37.64, 22.78]\nbowl: [491.45, 31.35, 31.41, 19.93]\nbowl: [358.66, 20.04, 39.75, 25.94]\nbowl: [323.68, 31.25, 23.74, 14.44]\nbowl: [266.96, 30.14, 41.25, 14.74]\nbowl: [270.73, 16.69, 34.76, 14.48]\nchair: [441.17, 203.87, 143.46, 184.44]\nbook: [232.21, 73.25, 29.22, 2.89]\nbook: [352.4, 138.35, 6.67, 33.76]\nbook: [225.88, 132.57, 82.08, 37.57]\nbook: [342.79, 183.47, 8.12, 34.17]\nbook: [142.39, 226.24, 48.24, 13.45]\nbook: [460.94, 101.87, 9.03, 25.95]\nbook: [361.71, 138.4, 5.7, 35.35]\nbook: [423.1, 177.21, 79.75, 41.71]\nbook: [279.45, 60.46, 27.91, 9.91]\nbook: [361.99, 57.36, 17.31, 5.37]\nbook: [470.78, 58.71, 37.29, 18.99]\nbook: [370.2, 183.3, 8.68, 34.73]\nbowl: [407.42, 31.44, 35.19, 17.24]\nbowl: [592.96, 31.65, 40.76, 11.33]\nbook: [401.6, 137.36, 6.37, 35.67]\npotted plant: [101.59, 23.28, 46.71, 61.16]\ncouch: [574.0, 276.34, 66.0, 133.28]\nbook: [141, 85, 368, 185]\n""",
        "role": "assistant",
        "content": """Question: What's different between these two living room?\nAnswer: The first living room has a TV in front of the couch while the second living room has no TV.\nQuestion: How about the bookshelf?\nAnswer: The second bookshelf contains more books than the first one.""",
    },
    # "role": "user",
    # "content": """image a:\nA young man is petting an elephants trunk.\nA man stands in front of two elephants, touching the trunk of one.\nA man with a backpack is touching a elephant's trunk.\nA man standing beside an elephant with his hand on its trunk.\nA man petting one of two elephants on the trunk.\nperson: [206.78, 145.51, 312.08, 273.79]\nperson: [26.64, 221.58, 36.26, 60.33]\nperson: [6.7, 227.67, 31.96, 55.93]\nperson: [495.31, 207.66, 15.58, 43.33]\nperson: [544.94, 223.66, 9.85, 26.02]\nperson: [584.98, 222.73, 12.68, 25.6]\nelephant: [203.91, 2.87, 289.1, 380.05]\nelephant: [0.0, 28.72, 226.88, 295.81]\nbackpack: [361.5, 221.09, 124.86, 140.11]\nelephant: [254.38, 237.56, 26.56, 45.03]\nperson: [510.65, 230.67, 8.71, 19.34]\nimage b:\na man that is sitting on a fake zebra\nA person sitting on top of a fake zebra. \nA man with a hat riding on a giraffe carving\na man sitting a on  a zebra statue \nA man is sitting on a fake zebra\nperson: [1.44, 0.72, 170.09, 585.23]\nzebra: [4.96, 56.39, 464.7, 567.23]\n""",
]

per_example_prefix = None
