Open p692584k opened 4 years ago
Hi, you can see the dataset definition and their paths in the dataset_catalog.py file. We added get_villard_database()
function that uses hardcoded paths, which you will need to change.
Best, Domen
Hi, I downloaded detectron according to your INSTALL.md git clone https://github.com/facebookresearch/detectron, but I implemented "python2 tools/infer_simple.py in this folder --cfg configs/12_2017_baselines/e2e_mask_rcnn_R-101-FPN_2x.yaml --output-dir /tmp/detectron-visualizations --image-ext jpg --wts https:/ /s3-us-west-2.amazonaws.com/detectron/35861858/12_2017_baselines/e2e_mask_rcnn_R-101-FPN_2x.yaml.02_32_51.SgT4y1cO/output/train/coco_2014_train:coco_2014_valminusminival/generalized_rcnn/model_final.pkl demo " is ok, but If your detectron-traffic-signs is not available. ImportError: No module named core.config will appear. How can I solve this? Thank you.
Have you also run cd $DETECTRON/lib && make
?
Also, make sure to clone my repository that uses the 'villard' branch, which includes all our changes:
git clone https://github.com/skokec/detectron-traffic-signs.git
.
I found that your pkl download link is dead. Can you check with that?
They have changed the paths to the pkl files on the original Detectron github. You should look for the correct links to their models on the original Detectron's MODEL_ZOO.md page.
How can I solve it? Thanks
Make sure to call train_net.py with correct arguments. See GETTING_STARTED.md for more details.
Best, Domen
Hi, I have downloaded your data. What should I do if I want to achieve the same results as your paper? Thanks.
Hi, you can use one of the yaml models linked in the README.md that I updated yesterday. You need to make sure to have enabled those settings described in the README.md below the links to get the same results as in the paper.
Best, Domen
Hi, I have tried to train with other yaml first, but I have these problems in test. Excuse me, where did I change it? Thanks.
I am not sure, but could be related to the number of classes then need to be defined in the yaml config (NUM_CLASSES: 201
for our DFG-dataset) or with the dataset definition for the testing (DATASETS: ('dfg_e5_coordBased_test',)
).
Are you using my yaml config for testings as well? You should be able to use it, but you will need to manually add path to the generated/trained model with the correct number of classes in the test section of the yaml:
TEST:
WEIGHTS: '/path/to/model_final.pkl'
Best, Domen
python2 tools/train_net.py --cfg configs/getting_started/tutorial_1gpu_e2e_faster_rcnn_R-50-FPN.yaml OUTPUT_DIR output wts/ I used this command when I was training. Also change the contents of tutorial_1gpu_e2e_faster_rcnn_R-50-FPN.yaml: NUM_CLASSES: 201 WEIGHTS: https://dl.fbaipublicfiles.com/detectron/ImageNetPretrained/MSRA/R-50.pkl (because the old link is dead) DATASETS has also changed.
My error is when I use the following command. Python2 tools/infer_simple.py --cfg configs/getting_started/tutorial_1gpu_e2e_faster_rcnn_R-50-FPN.yaml --output-dir output/ --image-ext jpg --wts output_wts/train/DFG_train/generalized_rcnn/model_final.pkl demo
Which py is this in? "DATASETS: ('dfg_e5_coordBased_test',)"
I think you need to use dataset dfg_e5_coordBased_test
in the TEST section of the yaml file to ensure that when visualizing classes, it will know about the classes definitions. When I look at the code in the vis.py:92 it appears that it does not know about the dataset classes so it throws an error. I actually haven't used detectron code for the visualization so you will need to debug it yourself to make it work correctly.
The dfg_e5_coordBased_test
is defined in dataset_catalog.py.
Best, Domen
You say that you don't used detectron code for the visualization, how is the result of the paper tested? Thanks.
We used only tools/train_net.py
, which will also do testing on the TEST dataset defined in the yaml file (testing can also be called manually with tools/test_net.py
using the same yaml config, but yaml needs to have additional WEIGHTS file defined in the TEST section). Testing procedure will export detections.pkl file, which we then used in our own visualization tool.
Best, Domen
I have some problems with your yaml. But I can use configs/getting_started/tutorial_1gpu_e2e_faster_rcnn_R-50-FPN.yaml to train.
How can I solve it?
Thanks
When enabling RPN_SIZE_WEIGHTED_LOSS
or CLS_SIZE_WEIGHTED_LOSS
it requires our custom caffe2 operation for weighted sigmoid cross entropy loss, which I forgot to commit.
I have now committed it and you can now find this code in caffe2-modules/
folder. You need to copy this code into caffe2 source (under modules/detectron
). See updated instructions in README.md
for more info.
Best, Domen
Hi, I am using docker, is the operation the same? Thanks.
You should re-compile caffe2 within the docker using the same instructions from README.md to enable those new operations.
Note, that I haven't updated the Dockerfile build script with this, so you need to do it manually if you are using that build script.
Best, Domen
ok, I will try. Thanks.
optimizer.py: 103: param gpu_3/fpn_res2_2_sum_b will be updated INFO optimizer.py: 103: param gpu_3/conv_rpn_fpn2_w will be updated INFO optimizer.py: 103: param gpu_3/conv_rpn_fpn2_b will be updated INFO optimizer.py: 103: param gpu_3/rpn_cls_logits_fpn2_w will be updated INFO optimizer.py: 103: param gpu_3/rpn_cls_logits_fpn2_b will be updated INFO optimizer.py: 103: param gpu_3/rpn_bbox_pred_fpn2_w will be updated INFO optimizer.py: 103: param gpu_3/rpn_bbox_pred_fpn2_b will be updated INFO optimizer.py: 103: param gpu_3/fc6_w will be updated INFO optimizer.py: 103: param gpu_3/fc6_b will be updated INFO optimizer.py: 103: param gpu_3/fc7_w will be updated INFO optimizer.py: 103: param gpu_3/fc7_b will be updated INFO optimizer.py: 103: param gpu_3/cls_score_w will be updated INFO optimizer.py: 103: param gpu_3/cls_score_b will be updated INFO optimizer.py: 103: param gpu_3/bbox_pred_w will be updated INFO optimizer.py: 103: param gpu_3/bbox_pred_b will be updated WARNING memonger.py: 55: NOTE: Executing memonger to optimize gradient memory INFO memonger.py: 97: Memonger memory optimization took 0.0242071151733 secs WARNING memonger.py: 55: NOTE: Executing memonger to optimize gradient memory INFO memonger.py: 97: Memonger memory optimization took 0.0220401287079 secs WARNING memonger.py: 55: NOTE: Executing memonger to optimize gradient memory INFO memonger.py: 97: Memonger memory optimization took 0.0223078727722 secs WARNING memonger.py: 55: NOTE: Executing memonger to optimize gradient memory INFO memonger.py: 97: Memonger memory optimization took 0.0221080780029 secs
How can I solve it? Thanks
Hi, I don't see any major errors here only a few warnings, but I am not sure this is the problem.
Best, Domen
How long does it detect a picture? Thanks.
I think it should be around 0.5 sec per one 1920x1080 image.
Where do you want to train the dataset or where to change the path? I may have missed some instructions, thank you.