Open GallonDeng opened 5 years ago
I will add training scripts for smaller models on COCO. Training the hourglass network with 2 stacks won't be possible. It takes quite long and Keras/Tensorflow is not as fast and memory efficient as PyTorch. Do you have a specific dataset in mind?
yes, I am trying to do a project with a real dataset to detect whether or not a worker wears an uniform and a helmet in a factory. The person scale changes a lot and the background is complex. Thus, I am trying STOA method with tensorflow framework.
hello,Do you have updated training code? thanks!
Is there any plan for training code right now? Thanks!
No, there isn't a plan for adding training code. Sorry for the false promise. In terms of performance, I didn't get close to PyTorch. Here is a great summary of the problems: https://tensorpack.readthedocs.io/tutorial/philosophy/dataflow.html#alternative-data-loading-solutions. I also tried using tensorpack for better performance, but it is not fully compatible with keras (or tf-keras). Maybe tf-2.0 will change that.
Right now, I just use the official PyTorch code and port the model to TensorFlow when needed.
@see-- Thanks for the great repo! Could you please point me the code you used to port pytorch to tf.keras?
There is no code to do this automatically. The network is defined here: https://github.com/see--/keras-centernet/blob/master/keras_centernet/models/networks/hourglass.py. I named the layers so that they match with PyTorch weights. Maybe you mean the weight transplantation? I didn't include it as I didn't want a PyTorch dependency. You just iterate over all model.layers
and retrieve the matching weights from nn.Module state_dict()
.
BTW I just found a nice repo that does create the network definition automatically: https://github.com/nerox8664/pytorch2keras
Thanks! I will give it a try.
No, there isn't a plan for adding training code. Sorry for the false promise. In terms of performance, I didn't get close to PyTorch. Here is a great summary of the problems: https://tensorpack.readthedocs.io/tutorial/philosophy/dataflow.html#alternative-data-loading-solutions. I also tried using tensorpack for better performance, but it is not fully compatible with keras (or tf-keras). Maybe tf-2.0 will change that.
Right now, I just use the official PyTorch code and port the model to TensorFlow when needed.
hey, thank for you work. How did you transfer pytorch model to tensorflow model? Your weights is directly transformed from official pytorch weights? I am looking forward to your reply
Good Suggestion, I'll go use pyTorch.
This impl seems to have some training scripts https://github.com/Stick-To/CenterNet-tensorflow/blob/master/README.md#train-your-own-data
Hmmm, I only found debugging stuff.
Cause it is component of him multinet Object Detection API repo https://github.com/Stick-To/Object-Detection-API-Tensorflow/blob/master/testcenternet.py
Yeah I found that. It looks like debugging to me. You seem to be more familiar. Does it reproduce the VOC results?
I've not run the session with that code. But seems that the original author had some VOC result. Try to ask to him at https://github.com/Stick-To/Object-Detection-API-Tensorflow/issues/9#issuecomment-497541135
Aha, the answer is no it doesn't.
nice work! How about retraining? It will support retraining on new dataset? Thanks