Code Monkey home page Code Monkey logo

Comments (5)

Udayraj123 avatar Udayraj123 commented on August 17, 2024

@eabdollahian the issue looks genuine. Since the template is large and relatively the bubbles are smaller, we anticipate such template shifts especially when the photos are taken from a Mobile camera(explained in sample3). It's recommended to try out the FeatureBasedAlignment plugin from sample6 (template_fb_align.json)

from omrchecker.

eabdollahian avatar eabdollahian commented on August 17, 2024

@Udayraj123
I got worst result
I used FeatureBasedAlignment after CropOnMarkers. Is it right?
Case 1:
image
Case 2:
image
Case 3:
image

template.json

{
  "pageDimensions": [
    2092,
    2096
  ],
  "bubbleDimensions": [
    33,
    47
  ],
  "preProcessors": [
    {
      "name": "CropOnMarkers",
      "options": {
        "relativePath": "omr_marker.png",
        "sheetToMarkerWidthRatio": 17
      }
    },
   {
      "name": "FeatureBasedAlignment",
      "options": {
        "reference": "reference.png",
        "maxFeatures": 1000,
        "2d": true
      }
    }

  ],
  "fieldBlocks": {
    "MCQBlock1": {
      "fieldType": "QTYPE_MCQ4",
      "origin": [
        1530,
        275
      ],
      "fieldLabels": ["q1","q2"],
      "bubblesGap": 31,
      "labelsGap": 51
    },
    "MCQBlock2": {
      "fieldType": "QTYPE_INT_5",
      "origin": [
        1463,
        276
      ],
      "fieldLabels": ["q3","q4"],
      "bubblesGap": 41,
      "labelsGap": 30
    }
  }
}

config.json

{
  "dimensions": {
    "display_width": 800,
    "display_height": 1000,
    "processing_width": 1641,
    "processing_height": 1333
  },
  "threshold_params": {
    "MIN_JUMP": 30
  },
  "outputs": {
    "filter_out_multimarked_files": false,
    "show_image_level": 0
  }
}

And I used this as reference:
image

from omrchecker.

eabdollahian avatar eabdollahian commented on August 17, 2024

@Udayraj123 Another question. What is the correct value for these?
processing_width, processing_height in config.json and
pageDimensions in template.json
My pdf-extracted image is 3508x2480
My scan image is 1754x1275
My camera image is 2891x2084
And do I need to set sheetToMarkerWidthRatio in CropOnMarkers?

from omrchecker.

Udayraj123 avatar Udayraj123 commented on August 17, 2024
  • Right, FeatureBasedAlignment is not working as expected possibly due to incorrect tuning. The debug output may help you set the right tuning for it. Instead if you can wait for a few months, we're trying to come up with a better solution for it, testing the solution in a different branch: feature/upgrade-crop-on-markers
  • processing_width and processing_height are kept low for increasing speed. A healthy value is in the range 1500-2000
  • pageDimensions are used for the detection. Since you have many questions in your layout, this value should also be in the range 1500-2000 (or more)
  • Yes @eabdollahian the "sheetToMarkerWidthRatio" is needed for appropriate detection, although it seems to be already working in your case with the current value.

from omrchecker.

Udayraj123 avatar Udayraj123 commented on August 17, 2024

Closing this for inactivity. @eabdollahian do try out above suggestions and feel free to reopen

from omrchecker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.