# Project 3. Are the bounding boxes correct?

In this project, Tolokers will determine if traffic signs were selected correctly on the images in project 1, and submit the responses in project 2.

## Create a project

#### In the interface:

1. Choose a preset:

1. Click Create project.
2. Select the Object recognition & detection preset.
3. Click Choose this preset.
2. Provide general information:

1. In the Name for Tolokers field, enter Are the traffic signs outlined correctly?.
2. In the Description for Tolokers field, enter Look at the image and decide whether the traffic signs are outlined correctly or not.
3. Optionally add a Private comment.
3. Edit the task interface. The output data format depends on the interface editor, so choose the same editor as in Project 2.

1. Create a template based on the Checking the selected area example that uses Component for image labeling.

2. To see the input and output data fields, click Show specifications in the Data specification section.

Input data fields used in the project:

• image — image address;
• result — an array with the selected area coordinates;
• assignment_id — task ID.

The Toloker's response will be recorded in the verdict output data field.

3. Turn on the Define data specification manually option.

4. Click to switch graphic mode to JSON format.

5. Remove the template code from the Input data field and enter the following code:

{
"image": {
"type": "url",
"hidden": false,
"required": true
},
"result": {
"type": "array_json",
"hidden": false,
"required": false
},
"assignment_id": {
"type": "string",
"hidden": true,
"required": true
}
}

6. Remove the template code from the Output data field and enter the following code:

{
"verdict": {
"type": "string",
"hidden": false,
"required": true,
"allowed_values": [
"OK",
]
}
}

1. Prepare Task interface:

1. Connect the $TOLOKA_ASSETS/js/image-annotation.js library (click in the Task interface block on the project page). 2. In the html block, replace the current code with the following: <!-- editor for selecting objects that lets you add an area in advance --> {{field type="image-annotation" name="object" src=image annotations=selection}} <!-- buttons for responses --> {{field type="radio" name="result" value="OK" label="Correct" hotkey="1"}} {{field type="radio" name="result" value="BAD" label="Incorrect" hotkey="2"}}  3. In the css block, replace the code with the following: /* hide the button for polygon selection */ .image-annotation-editor__shape-polygon { display: none; } /* adjust the interface height */ .image-annotation-editor__annotation-layer { height: max-content; }  2. Configure the Data specification section: 1. Click to switch graphic mode to JSON format. 2. Remove the template code from the Input data field and enter the following code: { "image": { "type": "url", "hidden": false, "required": true }, "selection": { "type": "array_json", "hidden": false, "required": false }, "assignment_id": { "type": "string", "hidden": true, "required": true } }  3. Remove the template code from the Output data field and enter the following code: { "result": { "type": "string", "hidden": false, "required": true, "allowed_values": [ "OK", "BAD" ] } }  Learn more about Specifications in Input and output data. 3. Click the Preview task button to view the task. Note The project preview shows one task with standard data. You can define the number of tasks to show on the page later. 4. Click Change input data. 5. In the selection field, add an example of input data: [{"data":{"p1":{"x":0.472,"y":0.413},"p2":{"x":0.932,"y":0.877}},"type":"rectangle"}, {"data":[{"x":0.143,"y":0.807},{"x":0.317,"y":0.87},{"x":0.511,"y":0.145},{"x":0.328,"y":0.096},{"x":0.096,"y":0.554}],"type":"polygon"}]  6. If everything is OK, close the preview tab. If not, check the data you inserted in the code blocks. 4. Save the changes. 5. Write instructions for Tolokers: Instructions: Look at the image and answer the question: **Are all traffic signs outlined correctly?** If there are, click **Yes**. If there isn't, click **No**. For example, road signs are outlined correctly, so the correct answer is **Yes**.  Tip If you want to add a task examples in the instruction, complete it yourself in the preview mode. Take screenshots, upload them to photo hosting or cloud storage and insert image links in the instructions by clicking the button on the toolbar. 6. Click Create project. ## Create a pool 1. Open the project page titled Are the traffic signs outlined correctly?. 2. Click Add a pool on the project page. 3. Set the Pool name (visible only to you) field. Only you will see this pool name on the project page. 4. Specify the pool description which will be displayed instead of the project description in the task list for Tolokers. By default, Tolokers see the description from the project settings. To use a different description, uncheck the Use project description box and set Public description. If necessary, click + Private comment to add a private project description that only you will see. 5. Click Create. 6. At the Select the audience for your task step, set up filters to select Tolokers for your pool. 1. Use the Languages filter to select Tolokers with knowledge of the language. 2. Clear My tasks may contain shocking or pornographic content if your project has none of those. 3. Tasks in pools will be automatically available in the web version of Toloka and the mobile app. If you want to change the default settings and limit the visibility of the task for any of the versions, add the Client filter and select the desired value: Toloka web version or Toloka for mobile. 4. Add another filter. Click Add filter. 5. Find the Skills block in the list and select the My skills skill. 6. In the Skills field, select Area selection. 7. In the ? field specify =. 8. Leave the Missing field blank. 7. (optional) In the Speed/quality balance section, specify the desired quality level. Improving quality may reduce the speed of task completion because the pool will be available to fewer Tolokers. Learn more in the Speed/quality balance section. 8. At the Set the task price and overlap step, set up how much a single task will cost for you. 1. In Price per task suite,$, set the amount of money to pay per task suite done by one Toloker. For example, 0.01.

2. Enter 3 in the Overlap field.

9. At the Setup quality control step, set quality control rules for more accurate results:

1. Click Add a quality control rule.

2. Find the Rules block in the list and choose Majority vote.

3. In the Accept as majority field, soecify 2.

4. Set the rule: if number of responses ≥ 10 and correct responses (%) < 50, then ban the Toloker on project for 10 days. Specify the reason Doesn't match the majority.

Note

The rule takes effect when the number of responses for the task is equal to the overlap.

10. At the Add optional pool settings step:

1. At the Add optional pool settings step, specify the Time per task suite, sec.

The time should be long enough to read the instructions and wait for task data to load. For example, 600 seconds.

2. Turn on the Keep task order option.

1. Prepare a file with tasks.

1. In the text or spreadsheet editor, open the file that you received after aggregating the results in project 2.

2. Leave the INPUT:image column unchanged.

3. Change the OUTPUT:result column name to INPUT:selection.

4. Rename the ASSIGNMENT:assignment_id column to INPUT:assignment_id.

5. Delete the ACCEPT:verdict: and ACCEPT:comment: columns:

6. Add input data, for example:

[{""type"":""rectangle"",""data"":{""p1"":{""x"":0.2421,""y"":0.98871},""p2"":{""x"":0.93663,""y"":0.8776}}}]


and save the file.

Tip

You can prepare the file in Notepad. To transfer data to Microsoft Excel, use Text Import Wizard and disable the Text qualifier option.

2. Upload the file to the Are the traffic signs outlined correctly? pool:

1. Open the Are the traffic signs outlined correctly? pool.

3. Click Drop file here or select, and upload the file you’ve just made.

4. Click Continue.

5. Choose Set manually.

6. In the Tasks per suite field, specify 10.

7. Click Combine tasks into suites.

8. On the pool page, click Preview. Make sure that the task displays images with the selected objects.

Tip

If there are no outlined objects, make sure that quotes are properly used in the INPUT:selection column in the file. Make sure that the interface parameters are set correctly.

12. Click to start the pool.

1. Next to the Download results button, click .

2. Choose Dawid-Skene aggregation model from the list. Learn more about Result aggregation based on the Dawid-Skene model.

3. In the window that opens, click Yes.

4. At the top of the page, click View the list of operations.

Note

To track the progress, refresh the page from time to time. Aggregation takes from 5 to 20 minutes. You can start designing another project meanwhile.

5. When the operation is complete, download the results file. To do this, click Download in the Files column.

6. Use the results file in project 2.

## Check the completed tasks

Since the manual review option is enabled in the pool settings for project 2, you should check the Tolokers' responses within the time limit set in the Review period field.

You can check the results in two ways:

• In the results file.
• In the pool interface.
1. In the text or spreadsheet editor, open the file you received after aggregating the results.

2. Prepare the file:

1. Add a column named ACCEPT:verdict with the review results.

2. Add a column named ACCEPT:comment with comments for Tolokers if responses were rejected. For example, comment on which part of the instructions wasn't followed.

3. Rename the INPUT:assignment_id column to ASSIGNMENT:assignment_id.

3. Fill in the ACCEPT:verdict: and ACCEPT:comment: columns:

• If the aggregate result of the assignment is OK, put + to accept it.

• If the aggregate result of the assignment is incorrect or it doesn't open, put - to reject it. Enter the reason for rejecting the task in the ACCEPT:comment: field, for example, The object isn't selected or is selected incorrectly.

Tip

You can use the awk commands to outline images on Linux and MacOS devices:

awk 'BEGIN {FS=OFS="\t";} NR>1 {if($4~"OK"){ print$1, "+", ""; }else{ print \$1, "-", "The object isn't selected or is selected incorrectly.";}}' <post_accept_res>.tsv > <review_res>.tsv

4. Delete all the other columns.

5. Save the file in TSV format.

6. Open the pool page in project 2.

7. Click Review assignments.

8. Click Upload results.

9. In the window that opens, choose the results file you want to upload and click Open.

10. In the window that opens, compare the number of tasks in the Processed successfully and Total submitted fields on the pool page.

12. In the window that opens, click Close.

13. When setting up a pool in the second project you turned on the Recompletion of the rejected tasks option.

In this case, the pool automatically reopens and the assignments are reassigned to other Tolokers. When they're completed, send the results for review. Then download the results, check them, and upload the reviewed results. You can reject assignments as many times as you want to get more accurate results.

1. Open the pool page in project 2.

2. Click View assignments.

3. Hover over the line of the assignment you want to check.

4. In the Status column, you will see the buttons for accepting () or rejecting () the completed assignment. If you reject the assignment, enter a comment in the window that opens and click Done.