Giter VIP home page Giter VIP logo

Comments (7)

hanxiaotian avatar hanxiaotian commented on May 20, 2024

Sorry for the confusion. At this time, you could use labelmap.json to replace train.labelmap.tsv.
The format of labelmap.json is like this:

{"label_to_idx": {"Piano": 1, "Boy": 2, "Tennis ball": 3, "Van": 4, "Football": 5, "Beer": 6, "Camera": 7, "Suitcase": 8, "Man": 9, "Bench": 10, "Dolphin": 11, "Motorcycle": 12, "Mug": 13, "Tennis racket": 14, "Drum": 15, "Spoon": 16, "Horse": 17, "Surfboard": 18, "Bicycle": 19, "Knife": 20, "Rugby ball": 21, "Woman": 22, "Handbag": 23, "Microwave oven": 24, "Flute": 25, "Girl": 26, "Taxi": 27, "Hamster": 28, "Wine glass": 29, "Backpack": 30, "Racket": 31, "Table": 32, "Pretzel": 33, "Bed": 34, "Snowboard": 35, "Car": 36, "Chair": 37, "Microphone": 38, "Coffee cup": 39, "Table tennis racket": 40, "Bottle": 41, "Guitar": 42, "Desk": 43, "Ski": 44, "Coffee table": 45, "Dog": 46, "Cat": 47, "Chopsticks": 48, "Elephant": 49, "Mobile phone": 50, "Monkey": 51, "Snake": 52, "Sofa bed": 53, "Violin": 54, "Fork": 55, "Oven": 56, "Briefcase": 57}, "predicate_to_idx": {"at": 1, "on": 2, "holds": 3, "plays": 4, "interacts_with": 5, "wears": 6, "inside_of": 7, "under": 8, "hits": 9}, "attribute_to_idx": {"Transparent": 1, "Plastic": 2, "(made of)Textile": 3, "(made of)Leather": 4, "Wooden": 5}}

Basicly, this file maps class names to index. The "predicate_to_idx" and "attribute_to_idx" fields are optional if you only need to train detector.

Thanks

from scene_graph_benchmark.

Edwardmark avatar Edwardmark commented on May 20, 2024

attribute_to_idx

so does that mean I should just copy labelmap.json to train.labelmap.tsv? Or how to change the code?

from scene_graph_benchmark.

hanxiaotian avatar hanxiaotian commented on May 20, 2024

in train.yaml file, you could fill in like below,

img: train.vrd.img.tsv
hw: train.vrd.hw.tsv
label: train.vrd.label.tsv
linelist: train.vrd.linelist.tsv
labelmap: labelmap.json

Then you replace this part with your train.yaml

TRAIN: ("visualgenome/train_vgoi6_clipped.yaml",)

from scene_graph_benchmark.

Edwardmark avatar Edwardmark commented on May 20, 2024

@hanxiaotian Thanks.

from scene_graph_benchmark.

Edwardmark avatar Edwardmark commented on May 20, 2024

@hanxiaotian why I run train_net.py, I get the error:

TypeError: do_train() missing 1 required positional argument: 'meters'

What does it mean? And how to set meters? Thanks.

from scene_graph_benchmark.

Edwardmark avatar Edwardmark commented on May 20, 2024

@hanxiaotian And is the tsv file format right? I try to run train_net.py, but I found that the annotions read from tsv file is:

[{"rect": [748.9104, 389.93981599999995, 1599.54016, 1060.51001], "class": "60"}, {"rect": [755.5798399999999, 214.17999749999996, 1500.6697600000002, 746.2600004999999], "class": "41"}, {"rect": [331.5100799999999, 329.6098400000001, 1405.22976, 1024.320052], "class": "53"}, {"rect": [411.12991999999997, 221.56005199999996, 1150.5699200000001, 722.530116], "class": "41"}, {"rect": [458.27008, 213.50021349999997, 1183.07008, 765.3400684999999], "class": "42"}]

but in od_tsv.py, the function get_target_from_annotations, there is a line:

if self.is_load_label:
            return self.label_loader(annotations['objects'], img_size)

but the annotaions is a list, not a dict, so there is no key named "objects", did I miss something? Thanks. @hanxiaotian @pzzhang

from scene_graph_benchmark.

yuchen2199 avatar yuchen2199 commented on May 20, 2024

I meet the same question. Could you tell me do you solve it?

from scene_graph_benchmark.

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.