prosopo/provider

Dynamically generate captchas based on sets of labelled and unlabelled images

Closed this issue · 0 comments

Currently the captcha JSON format assumes that the captchas are predefined. For example:

{
  "captchas": [
    {
      "salt": "0x01",
      "solution": [
        2,
        3,
        8
      ],
      "items": [
        {
          "path": "http://localhost:4000/img/test_image_png_5.png",
          "type": "image"
        },
        {
          "path": "http://localhost:4000/img/test_image_png_24.png",
          "type": "image"
        },
        {
          "path": "http://localhost:4000/img/test_image_png_27.png",
          "type": "image"
        },
        {
          "path": "http://localhost:4000/img/test_image_png_28.png",
          "type": "image"
        },
        {
          "path": "http://localhost:4000/img/test_image_png_22.png",
          "type": "image"
        },
        {
          "path": "http://localhost:4000/img/test_image_png_32.png",
          "type": "image"
        },
        {
          "path": "http://localhost:4000/img/test_image_png_26.png",
          "type": "image"
        },
        {
          "path": "http://localhost:4000/img/test_image_png_44.png",
          "type": "image"
        },
        {
          "path": "http://localhost:4000/img/test_image_png_51.png",
          "type": "image"
        }
      ],
      "target": "dog"
    },

9 images are combined to create a captcha with a target of dog, with 3 of the images actually representing dogs. Manually creating JSON datasets like this will be cumbersome for Providers whose main aim is to have their data labelled. Therefore, it potentially makes sense to have 2 sets of images, labelled and unlabelled, and automatically generate captcha based on these sets.

Note: can't have this as it will invalidate merkle proofs