Conversation
|
Addresses #1 |
|
Hi shadySource, thanks for this comprehensive PR that hits a lot of the todos I've put off! I've been super busy lately (just moved and got a new job) and so it will probably take me another few weeks to get around to reviewing and testing your PR. But giving it a quick look, it looks quite nice and like what I had in mind. |
|
edit: I was building a new computation graph and evaluating it for every image, which takes 0.2 seconds. To avoid this, I made yolo_head_np(), which is about 200x faster than the silliness I was doing before. |
…(), combine data processing functions
|
Still need to fix the paths in retrain_yolo so it does not look for model stuff in cwd. Besides this, it seems pretty ok. (Future) Adding support for fit generator with full data augmentation for boxes would be cool. (right after that custom loss function) |
|
|
||
|
|
||
| def yolo_head(feats, anchors, num_classes): | ||
| def yolo_head(feats, anchors, num_classes): # TODO: Turn this into a layer? |
There was a problem hiding this comment.
You could use this if you want.
https://gist.github.com/PavlosMelissinos/162621051c906ea85b772997d982403a
I got
yad2k.py,test_yolo.py, and the training part ofretrain_yolo.pyto work using theano backend.The main issue I have come across is converting the output features to final boxes without using the tf session. Also, I could not figure out a way to make non max supression elegantly using the keras backend, so I ended up using a python/numpy implementation someone else made. After doing that, I just converted most of the final box processing code to numpy.
I am not sure if this is a path you want to take, as using numpy to do the final box processing may not be as fast as using custom layers.
This breaks some stuff, so It is not ready to merge yet. The final box prediction parts of
retrain_yolo.pyneed to be updated, and I did not touch thetrain_overfit.pydemo.Mostly, I just wanted to share my progress and get some feedback. I did this because I needed to run this on ARM, and TensorFlow does not have support for that architecture.