Comments (7)
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.
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.
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
from scene_graph_benchmark.
@hanxiaotian Thanks.
from scene_graph_benchmark.
@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.
@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.
I meet the same question. Could you tell me do you solve it?
from scene_graph_benchmark.
Related Issues (20)
- No SAS
- Alternate location for Vinvl ckpt and labelmap files
- Where to find maskrcnn-benchmark-1 ?
- Can I test with VinVL features under SGG?
- How to extract relation scores
- Runtime error occurred in Image Ids: CUDA error: device-side assert triggered HOT 7
- How to use pretrained neural motif to generate scene graph in my own image? HOT 1
- when I was running motif net with 'R152FPN_motif_oi.yaml', an attribute error happened.
- error from :assert l_batch == 1 HOT 1
- Upgrade to PyTorch 1.11 HOT 3
- Problem with training TSVYamlDataset
- Missing pretained model of X152fpn
- after training on own datasets getting zeros on result HOT 1
- Is the pre-trained Resnet-50 object detection model available?
- download links of pre-trained models are invalid HOT 2
- I got nan losses on results HOT 2
- [VinVL] Support for ONNX HOT 1
- Emergency, the pretrained model download links are lost HOT 6
- How to add masks for train
- Invalid Link
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scene_graph_benchmark.