Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

faster_rcnn frozen graph issue #6

Open
eeerrrwwwuuu opened this issue Feb 28, 2019 · 6 comments
Open

faster_rcnn frozen graph issue #6

eeerrrwwwuuu opened this issue Feb 28, 2019 · 6 comments

Comments

@eeerrrwwwuuu
Copy link

I have problem with loading frozen graph of faster_rcnn v2 graph. I trained it by my own with just one class... it looks like training process was successful, I was even able to export it to freeze state.

  1. I did change in config file to point my graph

model_type: 'faster_v2'
model_path: '/home/nvidia/Desktop/Real_Time/realtime_object_detection/models/faster_rcnn_v1/frozen_inference_graph.pb'

but during execution of run_video.py I get error on load_graph_faster_v2.py

i get warning that

assert d in name_to_node_map, "%s is not in graph" % d
AssertionError: Squeeze_2 is not in graph

where content of dest_nodes looks like :

['SecondStagePostprocessor/stack_1', 'SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/strided_slice', 'BatchMultiClassNonMaxSuppression/map/TensorArrayStack_4/TensorArrayGatherV3', 'Squeeze_2', 'Squeeze_3', 'SecondStagePostprocessor/Reshape_4']

@eeerrrwwwuuu
Copy link
Author

Ok I think I found solution : split_model: False but it gives 0.2 FPS :(

@naisy
Copy link
Owner

naisy commented Mar 1, 2019

Hi @eeerrrwwwuuu,

Probably this problem is the same as the following problem.
naisy/realtime_object_detection#53

This is speculated that the Faster RCNN model has changed. Actually, the published model (old structure) is different from the your model (new structure). And new structure is slow.
Thanks to tesfagabir's cooperation I tried to write a split code, but I could not improve speed.
I think it is better to learn using the old commit of tensorflow/models.

@eeerrrwwwuuu
Copy link
Author

Ok, now I get the point, what would be the ideal solution to train model and get maximum performance from faster_rcnn on jetson tx2? Should I pick Nvidia implementation or optimize graph somehow ? I have a problem that I want to handle 4 cameras at once and I'm able to start only one instance of recognition api, so I need to implement some kind of queue.
How many FPS I can get on older version of faster_rcnn, on ssd_coco I had about 20 frames of 800x600 but this model is not capturing small objects correctly... I need about 8fps ( 4 x 2 fps ) to deal with my task.
img_20190228_233322

@naisy
Copy link
Owner

naisy commented Mar 3, 2019

Hi @eeerrrwwwuuu,

If it is 0.2 FPS at the current Faster RCNN, I think that the old Faster RCNN will be around 0.3-0.4 FPS.
To get 8 FPS with Faster RCNN, you need desktop GPU.
It will be impossible to achieve 8 FPS with Jetson.

@eeerrrwwwuuu
Copy link
Author

eeerrrwwwuuu commented Mar 3, 2019 via email

@naisy
Copy link
Owner

naisy commented Mar 3, 2019

The picture is taken when running ssd_mobilenet_v1 on TX2.
fifa-tx2

Unfortunately, I do not know the training parameters for this, but it seems that detection of small objects is done so well.

I have not tried it yet, how about trial and error on data_augmentation_options with reference to this?

https://github.com/tensorflow/models/blob/master/research/object_detection/samples/configs/facessd_mobilenet_v2_quantized_320x320_open_image_v4.config

https://github.com/tensorflow/models/blob/master/research/object_detection/core/preprocessor.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants