In this tutorial, you will learn how to run image classification in Toloka. We will use a project preset designed specifically for this type of data labeling.
Image classification is a type of data labeling task with a finite number of response options.
Use Toloka to classify a set of images into categories that you define. Tolokers look at the images and choose one of the given categories. After you collect all the labeled images, you can apply your dataset for model training.
Before you begin make sure that:
Choose a preset
We recommend starting with a project preset for easier configuration and better results.
- Follow this link, or create a project manually:
- In the main menu, choose the Projects tab, and click Create a project.
- Select the Image classification preset.
- Click Choose solution in the pop-up tab.
Create a project
Set up how your tasks will look for Tolokers. Tolokers are people around the world who get paid for completing your tasks.
- Under General information, add the project name and description.
- Name to show performers: In 2–5 words, state the general idea of the project.
- Description for performers: In a couple of sentences, explain what you expect Tolokers to do. This is just an overview. You will write instructions later.
- In the Task interface section, set up what your tasks will look like. This preset has a task template with validation, keyboard shortcuts, and task layout pre-configured.Note.
- Using the Visual editor, add your data to the Config section:
- Question performers will see in your task: Write a question that matches the responses Tolokers need to choose from. All tasks in a project use the same question.
- Paste link to a sample image: This image is only used to display the task interface preview on the right.
- Set answer options is pre-filled with sample answers. Replace the samples with your categories. Note that Other and Error are separate entities.
- Answer option for performers: This is the label that Tolokers will see. Make sure it is clear and correct.
- Name in labeling results: This is the value you will see in the file with the labeling results.
Raw task data is stored in the XSLX, TSV, or JSON format. The labeling results are presented in a TSV file. The Data specification section determines which parameters these files might contain.
Click Show specifications and check the values:
- Input data: Parameters in the file with raw task data.
- Output data: Parameters in the file with labeling results.
Input data and Output data match the task interface you set up in Template Builder. Check that there are fields for all data types you use for your tasks, and for the ones you want to see in the results file.
- Under Instructions for performers, add the instructions Tolokers will see when they start doing your tasks. You can add text, tables, and images to your instructions.
Check the sample text of the instructions, and update it to fit your project.Tip.
When writing instructions, remember that most performers don’t know anything about your tasks beforehand. Make sure your instructions are as clear as possible, but not too wordy. For successful data labeling, try to strike a balance between covering all the essentials and keeping it short. Learn more in our knowledge base.
- To save your data and continue, click Create a project.
Create a pool
A pool is a set of tasks sent out to Tolokers at the same time. One project can have many pools. When creating a pool, you set up pricing, audience filters for Tolokers, and quality control.
- Click Create new pool.
- Under General information, set the Pool name.
- Under Audience, set up filters to select Tolokers for your pool.
- Uncheck My tasks may contain shocking or pornographic content if your project has none of those.
- To select Tolokers based on their language, location, age, gender, and other parameters, click the Add filter button. For example, add the Languages filter:
- Use the Speed/quality balance slider to change the number of Tolokers who can see your tasks. Move the slider to the right to exclude Tolokers with lower ratings from participating in your project.
- Under Quality control, the Image classification preset has preconfigured quality control rules for more accurate results. In most cases, you can keep them as is:
- Fast responses: This rule filters out Tolokers who complete tasks too fast. The default settings mean that Tolokers are banned from the project for 1 day if they respond to 4 out of 5 tasks in less than 15 seconds.
- Majority vote: This rule accepts the most popular response as the correct one, and allows you to filter out Tolokers who answer incorrectly. The default settings mean that Tolokers who give correct responses to less than 40% of tasks are banned from the project for 1 day. Accept as majority set to
2means that 2 similar responses out of all responses given to a single task will be considered as the correct answer.
- In Price, set up how much a single task will cost for you.
- In Price per task suite, set the amount of money to pay per task suite done by one Toloker. A task suite is a page with a number of tasks. It can contain one or several tasks. If the tasks are simple, you can add 10–20 tasks per suite.
- In the Overlap field, define how many Tolokers must do each task. The default value (
3) means that each task will have 3 responses.
- At the bottom of the Price section, you see Price per 1 task. This is the amount of money paid per task.
- To save the settings and continue, click Create pool.
At this step, upload your task data to Toloka.
- Click Upload data.
- Create the tasks for Tolokers:
- To download a template, click one of the buttons:
- Template for general tasks in XLSX
- Template for general tasks in TSV
- Template for general tasks in JSON
For this type of project, the file with tasks must have one parameter. Its name equals
INPUT:image, and the values are links to the images.
INPUT:image https://tlk.s3.yandex.net/dataset/cats_vs_dogs/dogs/041adb571f4342e7a42e47712f492101.jpg https://tlk.s3.yandex.net/dataset/cats_vs_dogs/dogs/048e5760fc5a46faa434922b2447a527.jpg https://tlk.s3.yandex.net/dataset/cats_vs_dogs/dogs/05334365c060421ab25264166bbb4fd1.jpg
- Open the downloaded file, and replace the sample links with links to your images.
- Click Drop file here or select, and upload the file you’ve just made.
- Click Continue.
- Tasks are shown to Tolokers in suites. A suite is a single page with multiple tasks. Define how many tasks to include per suite:
- General tasks: These are tasks for Tolokers to label.
- Control tasks: These are tasks with predefined answers used to control the quality of responses. You will create them in the next step.
- Training tasks: These are tasks with predefined answers and explanations for Tolokers. Normally you use training tasks in separate training pools. You don’t have to include them.
For example, you can add 9 general tasks and 1 control task per suite:
- Click Combine tasks into suites.
- To create control tasks, add correct answers to some of your tasks.
- Click Edit.
- On the Edit tasks page, click Create control tasks.
- Check the result checkbox, and select the correct answer for a task. Then, click the Save and go to next button. Add several control tasks this way.Tip.
For large pools (over 1000 tasks), we recommend adding at least 1% of control tasks to the pool. For small pools (around 100 tasks), you need 10% control tasks.
- Note the Distribution of correct responses for control tasks graph on the right side of the page. It shows how many control tasks of each type you have. We recommend adding an equal quantity of each correct response.
- When you are done adding control tasks, click the pool name in the menu.
- Make sure you have topped up your account.
- To send the tasks to Tolokers and begin the labeling process, click Start labeling.
- In the pop-up panel, review the budget and click Launch.
See the results
- You can see the labeling progress on the pool page. Wait until the labeling is completed. Refresh the page to check the progress.
- When the labeling is complete, click the arrow next to the Download results button and choose Run Dawid-Skene model from the drop-down menu. Click Yes in the pop-up window.
- Open the same drop-down menu again, and click View aggregations list.
- Wait until the aggregation is complete, and click Download. You will get the TSV file with the labeling results:
- INPUT: The data you uploaded for labeling.
- OUTPUT: The results of labeling (category picked by Tolokers).
- CONFIDENCE: The response significance according to the Dawid-Skene model.