seann999 / ssd_tensorflow Goto Github PK
View Code? Open in Web Editor NEWSSD implementation in development in TensorFlow
SSD implementation in development in TensorFlow
I download vgg16.py and run, face this error:
File "trainer.py", line 414, in
show_webcam(FLAGS.webcam_ip)
File "trainer.py", line 376, in show_webcam
ssd = SSD()
File "trainer.py", line 32, in init
self.imgs_ph, self.bn, self.output_tensors, self.pred_labels, self.pred_locs = model.model(self.sess)
File "/Users/Mac/TF/ssd_tensorflow/model.py", line 45, in model
sess.run(tf.initialize_variables(new_vars))
File "/Library/Python/2.7/site-packages/tensorflow/python/client/session.py", line 766, in run
run_metadata_ptr)
File "/Library/Python/2.7/site-packages/tensorflow/python/client/session.py", line 964, in _run
feed_dict_string, options, run_metadata)
File "/Library/Python/2.7/site-packages/tensorflow/python/client/session.py", line 1014, in _do_run
target_list, options, run_metadata)
File "/Library/Python/2.7/site-packages/tensorflow/python/client/session.py", line 1034, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: You must feed a value for placeholder tensor 'Placeholder_1' with dtype bool
[[Node: Placeholder_1 = Placeholderdtype=DT_BOOL, shape=[], _device="/job:localhost/replica:0/task:0/cpu:0"]]
Could you help on this error? Thanks
I cannot get the vgg16.npy model. Please give me some information. Thank you!
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 /Users/liuguiyang/Documents/CodeProj/PyProj/ssd_tensorflow/trainer.py
/usr/local/lib/python2.7/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
npy file loaded
build model started
build model finished: 0s
WARNING:tensorflow:VARIABLES collection name is deprecated, please use GLOBAL_VARIABLES instead; VARIABLES will be removed after 2017-03-02.
Traceback (most recent call last):
File "/Users/liuguiyang/Documents/CodeProj/PyProj/ssd_tensorflow/trainer.py", line 411, in <module>
evaluate_image(FLAGS.image_path)
File "/Users/liuguiyang/Documents/CodeProj/PyProj/ssd_tensorflow/trainer.py", line 358, in evaluate_image
boxes_, confidences_ = get_image_detections(path)
File "/Users/liuguiyang/Documents/CodeProj/PyProj/ssd_tensorflow/trainer.py", line 345, in get_image_detections
ssd = SSD()
File "/Users/liuguiyang/Documents/CodeProj/PyProj/ssd_tensorflow/trainer.py", line 35, in __init__
model.loss(self.pred_labels, self.pred_locs, total_boxes)
File "/Users/liuguiyang/Documents/CodeProj/PyProj/ssd_tensorflow/model.py", line 83, in loss
loc_loss = tf.reduce_sum(smooth_l1(pred_locs - true_locs), reduction_indices=2) * positives
File "/Users/liuguiyang/Documents/CodeProj/PyProj/ssd_tensorflow/model.py", line 68, in smooth_l1
re = tf.select(condition, l2, l1)
AttributeError: 'module' object has no attribute 'select'
Hello,when I run your codes ,an error accured :FileNotFoundError: [Errno 2] No such file or directory: '/media/sean/HDCL-UT1/mscoco/annotations/instances_train2014.json'
I think I shoud change the path,but I do not know how to do it.
Hi @seann999,
Where I can download the trained model (not vgg pretrained) to test?
I found that this tf code uses "feed_dict" to feed the data for training. However, it's slow in tensorflow. I remember that "tfrecords" will speed up io while training.
I test this code, and i think the match step is really slow, is it?
And I think the name of the function model in model.py is not good. This will cause some error to OpenCV.
Hi,
I'm quite new to tensorflow - could you please provide an explanation how you've implemented SSD without the 2 custom layers defined in Caffe - PriorBoxLayer and MultiBoxLossLayer?
From my (limited) understanding - MultiBoxLossLayer is needed for training and backpropagation connecting the ground truth boxes to intermediate layers and loss calculation. PriorBox is used in the forward pass only to generate boxes at the predefined sizes / aspect ratios.
Thanks
I compared the results of caffe detection code with the detection code implemented in this repo with the same caffe model (converted to tf model). The results are visually different. Boxes are smaller around objects in this tf implementation. There are some additional miss detection in TF. I think the pre processing code for images need to be refined. The images and annotations are probably not mapped accurately to 512*512 and back to original size. Just a guess!
For the loc_loss calculation, absolute difference between ground truth and anchor have been taken instead of normalized difference between ground truth and anchor. Why is it so? Am I missing something? Because paper have suggested this in equation (2) in page num. 5.
Line 82 in f381dba
this function require pred_labels must have rank 2, but your program the pred_labels shape is (?, 7308, 81)
I tried to run this both on the desktop and on a Jetson TX1, tensorflow 0.12.1 as well as 1.0a0 (both compiled form source)
I get a type mismatch error when running trainer.py in
npy file loaded
build model started
Traceback (most recent call last):
File "trainer.py", line 407, in <module>
start_train()
File "trainer.py", line 236, in start_train
ssd = SSD()
File "trainer.py", line 32, in __init__
self.imgs_ph, self.bn, self.output_tensors, self.pred_labels, self.pred_locs = model.model(self.sess)
File "/home/raven/src/ssd_tensorflow/model.py", line 13, in model
vgg.build(images)
File "/home/raven/src/ssd_tensorflow/vgg/ssd_base.py", line 35, in build
red, green, blue = tf.split(3, 3, rgb_scaled)
File "/home/raven/.local/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 1222, in split
split_dim=axis, num_split=num_or_size_splits, value=value, name=name)
File "/home/raven/.local/lib/python2.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 3426, in _split
num_split=num_split, name=name)
File "/home/raven/.local/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 509, in apply_op
(prefix, dtypes.as_dtype(input_arg.type).name))
TypeError: Input 'split_dim' of 'Split' Op has type float32 that does not match expected type of int32.
In the function get_top_confidences in matcher.py, you choose the top_k confidences bounding boxes including background, I think it is not a good strategy, it may lead to train negative examples that have already been trained. I think the top_k foreground bounding boxes should be chosen, am I right?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.