Network speed
Hi.
I'm going to start experimenting with your project, but first wanted to ask, if you achieved similar speeds (~30fps on a high-end gpu or equivalent) as stated in the article?
Best, Lauri
Good question, I should have asked the same... For me actually the answer is no, I only get 0.66 FPS on a GTX GeForce 1080 so I guess this version is far less performant than the original one https://github.com/hszhao/ICNet
Okay. Well the one using TF directly, https://github.com/hellochick/ICNet-tensorflow, actually gets around 30, so I suggest looking there, if interested.
Oh thanks ! I'll have a look
Did you test it yourself ? because I get an inference time of 0.6734606330282986s which is more or less 1.5 fps...
seems to caused by the fact that I only test 1 image instead of a batch https://github.com/hellochick/ICNet-tensorflow/issues/4 I might have the same issue on the Keras version
Ok that's my bad, the keras implementation is very fast too ! I ran it on 20 images on a single batch and as you can see it goes from 1 FPS to 90 FPS after only one prediction !
[GeForce GTX 1080 major: 6 minor: 1 memoryClockRate(GHz): 1.7335]
Generated segmentations in 0.879213809967041 seconds -- 1.1373797689068224 FPS Generated segmentations in 0.011792182922363281 seconds -- 84.80194096239386 FPS Generated segmentations in 0.011512994766235352 seconds -- 86.85837354262875 FPS Generated segmentations in 0.01149892807006836 seconds -- 86.96462782500518 FPS Generated segmentations in 0.011469125747680664 seconds -- 87.1906038873298 FPS Generated segmentations in 0.011708974838256836 seconds -- 85.40457331351429 FPS Generated segmentations in 0.011548042297363281 seconds -- 86.59476422495665 FPS Generated segmentations in 0.011418342590332031 seconds -- 87.57838469890586 FPS Generated segmentations in 0.01206517219543457 seconds -- 82.88319336033989 FPS Generated segmentations in 0.011431455612182617 seconds -- 87.47792354057606 FPS Generated segmentations in 0.0111236572265625 seconds -- 89.89849108367626 FPS Generated segmentations in 0.010841846466064453 seconds -- 92.23521132955095 FPS Generated segmentations in 0.010785341262817383 seconds -- 92.71843844640449 FPS Generated segmentations in 0.010878801345825195 seconds -- 91.92189177935086 FPS Generated segmentations in 0.010807514190673828 seconds -- 92.52821530994926 FPS Generated segmentations in 0.010857343673706055 seconds -- 92.10355958628868 FPS Generated segmentations in 0.010789155960083008 seconds -- 92.68565619958898 FPS Generated segmentations in 0.010899066925048828 seconds -- 91.75097344358402 FPS Generated segmentations in 0.010824441909790039 seconds -- 92.38351578159072 FPS Generated segmentations in 0.010749101638793945 seconds -- 93.03103027614506 FPS
note that it doesn't count the image loading and parsing
So you might want to use this repo, it's well coded and easy to understand
The utilization of GPU is 1-2% when I run the train.py. I guess there are some issues caused by the image loading and parsing. And do you have the same problem? Now, I don't know how to solve the problem.Can you help me?
I have solved the issue.
great ! you should share briefly how you solved it as others might get the same issue. I've not used this code for a long time so I don't remember clearly how I solved this specific issue. Cheers
well,the utilization of GPU changed to 1-2% since i added a processing of images before each training.
But there is a new issue when i run the test script. #y = Lambda(lambda x: tf.image.resize_bilinear(x, size=(int(x.shape[1])//2, int(x.shape[2])//2)), name='data_sub2')(x) NameError: global name 'tf' is not defined
The "checkpoint" in test.py created by the function ModelCheckpoint. I would appreciate it if you could help me.
But there is a new issue when i run the test script. #y = Lambda(lambda x: tf.image.resize_bilinear(x, size=(int(x.shape[1])//2, int(x.shape[2])//2)), name='data_sub2')(x) NameError: global name 'tf' is not defined
The "checkpoint" in test.py created by the function ModelCheckpoint. I would appreciate it if you could help me.
I had this problem too. In my case replacing the next line of code:
https://github.com/aitorzip/Keras-ICNet/blob/987a6aab762207cc45cde1384ee27afd0e9f9fb9/test#L33
with:
net = load_model(opt.checkpoint, custom_objects={'tf': tf})
solves the problem.
I guess the problem is in lambda functions that don't take care the imports written in the 'test' file, you have to give in that wey.