GithubHelp home page GithubHelp logo

Inference on test images? about letr HOT 5 CLOSED

mlpc-ucsd avatar mlpc-ucsd commented on September 25, 2024
Inference on test images?

from letr.

Comments (5)

yix081 avatar yix081 commented on September 25, 2024

Thanks for your interest. I will upload one tomorrow if possible, and will keep you updated.

from letr.

tianchen-ns avatar tianchen-ns commented on September 25, 2024

Thanks for your interest. I will upload one tomorrow if possible, and will keep you updated.

Thank you so much. Looking forward to the update.

from letr.

yix081 avatar yix081 commented on September 25, 2024

Hi, Here is a quick usage demo. Hope it helps.
https://github.com/mlpc-ucsd/LETR/blob/master/src/demo_letr.ipynb

from letr.

tianchen-ns avatar tianchen-ns commented on September 25, 2024

Thank you! The example works perfectly on my new data. Some suggestions:

  1. The default pretrained weights (DETR) is not exactly match the model near the output (shape mismatch). To make it work I assign the weights only if the shape match.
  2. Is it possible to apply NMS postprocessing as in LCNN to remove duplicate/close lines? Currently in my custom dataset the overall result is great, better than LCNN, but with some results have duplicate lines.
  3. Have you considered using imgaug to do augmentation/transforms? imgaug supports the augmentation on lines. The current implementation is good but hard to further customize.

from letr.

yix081 avatar yix081 commented on September 25, 2024

Thanks for your suggestions.

  1. DETR weights are different from LETR slightly. Please refer to main.py

    LETR/src/main.py

    Lines 91 to 96 in 005b4c1

    for k in checkpoint['model']:
    if ("class_embed" in k) or ("bbox_embed" in k) or ("query_embed" in k):
    continue
    if ("input_proj" in k) and args.layer1_num != 3:
    continue
    new_state_dict[k] = checkpoint['model'][k]
    Let me know if you run into any problem with the provided training scripts, e.g. https://github.com/mlpc-ucsd/LETR/blob/master/script/train/a1_train_stage1_res101.sh.
  2. It is possible to apply NMS. However, the main purpose of LETR is to introduce a method that is post-processing and heuristics-guided intermediate processing (edge/junction/region detection) free. To further boost the performance, you are welcome to try this direction.
  3. Imgaug is another good idea to boost the performance further as well. We have not tried it yet. Transformers are data-hungry. We experience that more data augmentation would almost always help the training.

from letr.

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.