Example Locate Order#
To learn about the basics of creating an order, please refer to the quickstart guide.
A powerful new capability of image generation models is their ability to edit images. But how do these models understand the location and size of objects they need to edit? In this example, we will create an order where annotators color in the object in images, providing training data that helps the model learn where to apply its edits.
from rapidata import RapidataClient
IMAGE_URLS = ["https://assets.rapidata.ai/midjourney-5.2_37_3.jpg",
"https://assets.rapidata.ai/flux-1-pro_37_0.jpg",
"https://assets.rapidata.ai/frames-23-1-25_37_4.png",
"https://assets.rapidata.ai/aurora-20-1-25_37_3.png"]
if __name__ == "__main__":
rapi = RapidataClient()
order = rapi.order.create_draw_order(
name="Example Image Comparison",
instruction="Color in all the blue books",
datapoints=IMAGE_URLS,
responses_per_datapoint=35,
).run()
order.display_progress_bar()
results = order.get_results()
print(results)
To preview the order and see what the annotators see, you can run the following code:
To open the order in the browser, you can run the following code: