Git Product home page Git Product logo

ssd_tensorflow_traffic_sign_detection's Introduction

SSD in TensorFlow: Traffic Sign Detection and Classification

Overview

Implementation of Single Shot MultiBox Detector (SSD) in TensorFlow, to detect and classify traffic signs. This implementation was able to achieve 40-45 fps on a GTX 1080 with an Intel Core i7-6700K.

Note this project is still work-in-progress. The main issue now is model overfitting. I am currently working on pre-training on VOC2012 first, then performing transfer learning over to traffic sign detection.

Currently only stop signs and pedestrian crossing signs are detected. Example detection images are below.

example1 example2 example3 example4 example5 example6

The model was trained on the LISA Traffic Sign Dataset, a dataset of US traffic signs.

Dependencies

  • Python 3.5+
  • TensorFlow v0.12.0
  • Pickle
  • OpenCV-Python
  • Matplotlib (optional)

How to run

Clone this repository somewhere, let's refer to it as $ROOT

Training the model from scratch:

  • Download the LISA Traffic Sign Dataset, and store it in a directory $LISA_DATA
  • cd $LISA_DATA
  • Follow instructions in the LISA Traffic Sign Dataset to create 'mergedAnnotations.csv' such that only stop signs and pedestrian crossing signs are shown
  • cp $ROOT/data_gathering/create_pickle.py $LISA_DATA
  • python create_pickle.py
  • cd $ROOT
  • ln -s $LISA_DATA/resized_images_* .
  • ln -s $LISA_DATA/data_raw_*.p .
  • python data_prep.py
    • This performs box matching between ground-truth boxes and default boxes, and packages the data into a format used later in the pipeline
  • python train.py
    • This trains the SSD model
  • python inference.py -m demo
    • This will take the images from sample_images, annotate them, and display them on screen
  • To run predictions on your own images and/or videos, use the -i flag in inference.py (see the code for more details)
    • Note the model severly overfits at this time

Differences between original SSD implementation

Obivously, we are only detecting certain traffic signs in this implementation, whereas the original SSD implemetation detected a greater number of object classes in the PASCAL VOC and MS COCO datasets. Other notable differences are:

  • Uses AlexNet as the base network
  • Input image resolution is 400x260
  • Uses a dynamic scaling factor based on the dimensions of the feature map relative to original image dimensions

Performance

As mentioned above, this SSD implementation was able to achieve 40-45 fps on a GTX 1080 with an Intel Core i7 6700K.

The inference time is the sum of the neural network inference time, and Non-Maximum Suppression (NMS) time. Overall, the neural network inference time is significantly less than the NMS time, with the neural network inference time generally between 7-8 ms, whereas the NMS time is between 15-16 ms. The NMS algorithm implemented here has not been optimized, and runs on CPU only, so further effort to improve performance can be done there.

Dataset characteristics

The entire LISA Traffic Sign Dataset consists of 47 distinct traffic sign classes. Since we are only concered with a subset of those classes, we only use a subset of the LISA dataset. Also, we ignore all training samples where we do not find a matching default box, further reducing our dataset's size. Due to this process, we end up with very little data to work with.

In order to improve on this issue, we can perform image data augmentation, and/or pre-train the model on a larger dataset (e.g. VOC2012, ILSVRC)

Training process

Given the small size of our pruned dataset, I chose a train/validation split of 95/5. The model was trained with Adadelta optimizers, with the default parameters provided by TensorFlow. The model was trained over 200 epochs, with a batch size of 32.

Areas of improvement

There are multiple potential areas of improvement in this project:

  • Pre-train the model on VOC2012 and/or ILSVRC
  • Image data augmentation
  • Hyper-parameter tuning
  • Optimize NMS alogorithm, or leverage existing optimized NMS algorithm
  • Implement and report mAP metric
  • Try different base networks
  • Expand to more traffic sign classes

ssd_tensorflow_traffic_sign_detection's People

Contributors

georgesung avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ssd_tensorflow_traffic_sign_detection's Issues

Predict more traffic sign class on this model

Now for your model, only detect two traffic sign class, if I want to detect the 47 traffic sign class (the total class in the LISA dataset) in this model, Can the AlexNet still use into this situation?

Error while executing inference.py

hi @georgesung i ran python inference.py -m demo i get this error on both windows and ubuntu
value, dtype=dtype, shape=shape, verify_shape=verify_shape))
File "C:\Python35\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 413, in make_tensor_proto
_AssertCompatible(values, dtype)
File "C:\Python35\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 328, in _AssertCompatible
(dtype.name, repr(mismatch), type(mismatch).name)
TypeError: Expected int32, got list containing Tensors of type '_Message' instead.
I have tensorflow v14 the latest version installed in the system can you pls suggest me where should i make the necessary changes for the file to run

error

I couldn't able to install Pickle on python 3 and also I am getting the following error. Please help me to resolve this.
image

How to initialize base model

Did you initialize the base classifier layers with pre-trained values when training the full ssd model? I have a custom dataset, but my model will not converge to anything. I was wondering if I have to train my base classifier first with my custom dataset before training the ssd model.

Loss function - divide by N?

In the original paper, the sum of confidence loss and localization loss is divided by "N", where N is the number of matched default boxes. I fail to see where that division is implemented in the code. Without that my loss is very high...

Please help me!, I got this problem.

Traceback (most recent call last):
File "inference.py", line 189, in
generate_output(input_files, mode)
File "inference.py", line 125, in generate_output
model = SSDModel()
File "/Users/PEE/tensorflow/models/object_detection/ssd_tensorflow_traffic_sign_detection/model.py", line 178, in SSDModel
model = AlexNet()
File "/Users/PEE/tensorflow/models/object_detection/ssd_tensorflow_traffic_sign_detection/model.py", line 159, in AlexNet
final_pred_conf = tf.concat(1, preds_conf)
File "/Users/PEE/tensorflow/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 1043, in concat
dtype=dtypes.int32).get_shape(
File "/Users/PEE/tensorflow/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 676, in convert_to_tensor
as_ref=False)
File "/Users/PEE/tensorflow/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 741, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "/Users/PEE/tensorflow/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.py", line 113, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "/Users/PEE/tensorflow/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.py", line 102, in constant
tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape, verify_shape=verify_shape))
File "/Users/PEE/tensorflow/lib/python2.7/site-packages/tensorflow/python/framework/tensor_util.py", line 374, in make_tensor_proto
_AssertCompatible(values, dtype)
File "/Users/PEE/tensorflow/lib/python2.7/site-packages/tensorflow/python/framework/tensor_util.py", line 302, in _AssertCompatible
(dtype.name, repr(mismatch), type(mismatch).name))
TypeError: Expected int32, got list containing Tensors of type '_Message' instead.

Problems with more traffic sign classes, help please!!

Hello,
I met "train loss : nan, validation loss :nan“ since more traffic sign classed been added by following steps.

In file creat_pickle.py

sign_name = fields[1]
if sign_name != 'pedestrainCrossing' and sign_name != 'signalAhead' and sign_name != 'stop':
continue
sign_class = sign_map[sign_name]
class_list.append(sign_class)

resized images or full images

Thank you for your work.
For several days I'm trying to understand and implement your work. I read the paper and I get confused. Are you using the convolution type scanning on the resized image or on the original image. When I looked at the paper it seems to be the original images but in the code I think you are using the resized images in data_prep.py. The problem come through when the calc_iou() tries to find the matched, but the rescaled box coordinates of the ground truth aren't in between 0 and 1. Can you clarify this issue a little?

Thanks

More traffic sign classes

Can anybody please assist me how to train and add more Traffic sign classes along with Pedestrian walking and Stop. It's Urgent please help me...

why you want to transform the coords, In prepare training samples ?

In your data_prepare.py file, why you want to transform the coords ?

# Calculate normalized box coordinates and update y_true_loc
abs_box_center = np.array([col + 0.5, row + 0.5])  # absolute coordinates of center of feature map cell
abs_gt_box_coords = gt_box_coords * scale  # absolute ground truth box coordinates (in feature map grid)
norm_box_coords = abs_gt_box_coords - np.concatenate((abs_box_center, abs_box_center))
y_true_loc[y_true_idx*4 : y_true_idx*4 + 4] = norm_box_coords

I get wrong in 'create_pickle.py', Can you tell me how to solve this problem in detail?

I rename the file 'allAnnotations.csv' to 'mergedAnnotations.csv' , and I run the 'create_pickle.py',but I also get the problem
Traceback (most recent call last):

File "create_pickle.py", line 42, in
image_files = os.listdir('annotations')
FileNotFoundError: [Errno 2] No such file or directory: 'annotations'

Where is 'annotations'? and it is right or not ,about my 'mergedAnnotations.csv' ?
I do not understand what you say in "Follow instructions in the LISA Traffic Sign Dataset to create 'mergedAnnotations.csv' such that only stop signs and pedestrian crossing signs are shown"

Expected int32, got list containing Tensors of type '_Message' instead error.

Hello :)
I'm getting the following error while trying to run the demo by using the command :
python inference.py -m demo

ajmal@darkcow:~/Documents/ssd_tensorflow_traffic_sign_detection$ python inference.py -m demo
2017-06-28 14:52:35.472959: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-06-28 14:52:35.472990: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-06-28 14:52:35.472997: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-06-28 14:52:35.473003: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2017-06-28 14:52:35.473013: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
Traceback (most recent call last):
  File "inference.py", line 190, in <module>
    generate_output(input_files, mode)
  File "inference.py", line 126, in generate_output
    model = SSDModel()
  File "/home/ajmal/Documents/ssd_tensorflow_traffic_sign_detection/model.py", line 178, in SSDModel
    model = AlexNet()
  File "/home/ajmal/Documents/ssd_tensorflow_traffic_sign_detection/model.py", line 159, in AlexNet
    final_pred_conf = tf.concat(1, preds_conf)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.py", line 1043, in concat
    dtype=dtypes.int32).get_shape(
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 676, in convert_to_tensor
    as_ref=False)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 741, in internal_convert_to_tensor
    ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/constant_op.py", line 113, in _constant_tensor_conversion_function
    return constant(v, dtype=dtype, name=name)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/constant_op.py", line 102, in constant
    tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape, verify_shape=verify_shape))
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_util.py", line 374, in make_tensor_proto
    _AssertCompatible(values, dtype)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_util.py", line 302, in _AssertCompatible
    (dtype.name, repr(mismatch), type(mismatch).__name__))
TypeError: Expected int32, got list containing Tensors of type '_Message' instead.

Please help me to sort this out.
Thankyou.

TypeError: Expected int32, got list containing Tensors of type '_Message' instead.

hi there
i got some error when run this command

python inference.py -m demo

error detail :

C:\Program Files\python\lib\site-packages\h5py\__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from floattonp.floatingis deprecated. In future, it will be treated asnp.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters 2018-05-24 13:44:47.911946: I d:\build\tensorflow\tensorflow-r1.7\tensorflow\core\platform\cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 Traceback (most recent call last): File "inference.py", line 189, in <module> generate_output(input_files, mode) File "inference.py", line 125, in generate_output model = SSDModel() File "D:\my media\my_project\open-cv_traffic-sine\PythonApplication2\PythonApplication2\model.py", line 178, in SSDModel model = AlexNet() File "D:\my media\my_project\open-cv_traffic-sine\PythonApplication2\PythonApplication2\model.py", line 159, in AlexNet final_pred_conf = tf.concat(1, preds_conf) File "C:\Program Files\python\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1178, in concat dtype=dtypes.int32).get_shape().assert_is_compatible_with( File "C:\Program Files\python\lib\site-packages\tensorflow\python\framework\ops.py", line 950, in convert_to_tensor as_ref=False) File "C:\Program Files\python\lib\site-packages\tensorflow\python\framework\ops.py", line 1040, in internal_convert_to_tensor ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref) File "C:\Program Files\python\lib\site-packages\tensorflow\python\framework\constant_op.py", line 235, in _constant_tensor_conversion_function return constant(v, dtype=dtype, name=name) File "C:\Program Files\python\lib\site-packages\tensorflow\python\framework\constant_op.py", line 214, in constant value, dtype=dtype, shape=shape, verify_shape=verify_shape)) File "C:\Program Files\python\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 433, in make_tensor_proto _AssertCompatible(values, dtype) File "C:\Program Files\python\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 344, in _AssertCompatible (dtype.name, repr(mismatch), type(mismatch).__name__)) TypeError: Expected int32, got list containing Tensors of type '_Message' instead.

can anyone help me ?

I am runing inference.py,but it have a problom input_files = glob.glob(input_dir + '/*.*'),unsupported operand type(s) for +: 'NoneType' and 'str'

please help me

Traceback (most recent call last):
File "D:/traffic_sign/ssd/ssd/inference.py", line 185, in
input_files = glob.glob(input_dir + '/.')
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
I think the error that is input_dir,but
parser = OptionParser()
parser.add_option('-i', '--input_dir', dest='input_dir',type='string',
help='Directory of input videos/images (ignored for "demo" mode). Will run inference on all videos/images in that dir')
parser.add_option('-m', '--mode', dest='mode', default='image',
help='Operating mode, could be "image", "video", or "demo"; "demo" mode displays annotated images from sample_images/')
# Get and parse command line options
options, args = parser.parse_args(args)
put_dir = options.input_dir

what are --input_dir input file?the help prompt should not be the path(image or video),but it's wrong for me to enter the path of sample_images.
Please help me if I am wrong.

Error when run inference.py

I got this issue when run inference.py,can anyone help me? My python is python 2.7.5 and tensorflow is 1.1.0.

yjcai@inspur ssd_tensorflow_traffic_sign_detection]$ python inference.py -m demo
Traceback (most recent call last):
File "inference.py", line 6, in
from model import SSDModel
File "/export/userhome/yjcai/Documents/SSD/ssd_tensorflow_traffic_sign_detection/model.py", line 241
box = (*box_coords, cls, cls_prob)
^
SyntaxError: invalid syntax

Training set does not reflect test set

I think you can remove this line in data_prep.py:

if match_counter > 0:
data_prep[image_file] = {'y_true_conf': y_true_conf, 'y_true_loc': y_true_loc}

Otherwise, the model assumes that all input are expected to have an object. Depending on the application this may not hold true. Train set should really reflect distribution in test set and that includes images without any object

I can not find 'signnames.csv'.

First, I try to run inference.py

$ python inference.py -m demo
.
.
Traceback (most recent call last):
File "inference.py", line 271, in
generate_output(input_files, mode)
File "inference.py", line 188, in generate_output
with open('signnames.csv', 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'signnames.csv'

I can not find 'signnames.csv' in your git.

Is that in 'LISA Traffic Sign Dataset' ?

please help me, i am stuck in running inference.py

Traceback (most recent call last):
File "inference.py", line 189, in
generate_output(input_files, mode)
File "inference.py", line 130, in generate_output
saver.restore(sess, MODEL_SAVE_PATH)
File "E:\anaconda\envs\opencv\lib\site-packages\tensorflow\python\training\saver.py", line 1268, in restore
+ compat.as_text(save_path))
ValueError: The passed save_path is not a valid checkpoint: ./model.ckpt

how to modify this code? thanks

ValueError: Shapes must be equal rank, but are 2 and 1

tensorflow.python.framework.errors_impl.InvalidArgumentError: Shapes must be equal rank, but are 2 and 1
From merging shape 0 with other shapes. for 'packed' (op: 'Pack') with input shapes: [?,23436], [3].
please help me
ValueError: Shapes must be equal rank, but are 2 and 1
From merging shape 0 with other shapes. for 'packed' (op: 'Pack') with input shapes: [?,23436], [3].
I should how charge the error?

Help me out~

I'm not sure if the issue is about tensorflow version.I was using tensorflow v1.12 and error occured at the function : final_pred_conf = tf.concat(1, preds_conf) final_pred_loc = tf.concat(1, preds_loc) at line 159 in file model.py. I have no idea how to solve it, I would appreciate it if someone can give a hand~

error when run

Hello! when i run python inference.py -m demo i see error

WARNING:tensorflow:From /home/user/ssd_tensorflow_traffic_sign_detection-master/model.py:79: get_regularization_losses (from tensorflow.contrib.losses.python.losses.loss_ops) is deprecated and will be removed after 2016-12-30.
Instructions for updating:
Use tf.losses.get_regularization_losses instead.
Restoring previously trained model at ./model.ckpt
Demo mode: Running inference on images in sample_images/
Running inference on sample_images/stop_1323896809.avi_image12.png
Inference took 38399.9 ms (0.03 fps)
Traceback (most recent call last):
  File "inference.py", line 189, in <module>
    generate_output(input_files, mode)
  File "inference.py", line 159, in generate_output
    image = run_inference(image_orig, model, sess, mode, sign_map)
  File "inference.py", line 74, in run_inference
    boxes = nms(y_pred_conf, y_pred_loc, prob)
  File "/home/user/ssd_tensorflow_traffic_sign_detection-master/model.py", line 248, in nms
    iou = calc_iou(box[:4], other_box[:4])
  File "/home/user/ssd_tensorflow_traffic_sign_detection-master/data_prep.py", line 29, in calc_iou
    iou = intersection / union
ZeroDivisionError: division by zero

when i run interface.py , I got a problem as flow. i don't know why,hope for your help.

File "/home/hg/anaconda3b/python3.5/site-packages/tensorflow/python/framework/tensor_util.py", line 367, in make_tensor_proto
_AssertCompatible(values, dtype)
File "/home/hg/anaconda3b/python3.5/site-packages/tensorflow/python/framework/tensor_util.py", line 302, in _AssertCompatible
(dtype.name, repr(mismatch), type(mismatch).name))
TypeError: Expected int32, got list containing Tensors of type '_Message' instead.

The use of the DEFAULT BOX

Thanks for your excellent codes.
But I can't find how you generate the default box, can you tell me please, thank you.

Improve the effect?

The original SSD paper point out that the scales should be different at different feature maps, but I find your code assign the scale same size in different feture map size. And the hard example methods isn't aplied. So I am wondering whether the effect is improving if appy these two tricks?

Error when I run python inference.py -m demo

First, I git clone https://github.com/georgesung/ssd_tensorflow_traffic_sign_detection.git
Then,I cd ssd_tensorflow_traffic_sign_detection.
And I run python inference.py -m demo, but error:

I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcublas.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcudnn.so.5 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcufft.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcurand.so.8.0 locally
Traceback (most recent call last):
File "inference.py", line 6, in
from model import SSDModel
File "/home/ubuntu/ssd_tensorflow_traffic_sign_detection/model.py", line 241
box = (*box_coords, cls, cls_prob)
^
SyntaxError: invalid syntax

where is the mergedAnnotations.csv??

hi,
I want to train your net model, use your given datasets.
But I did not found the mergedAnnotations.csv.

# For speed, put entire contents of mergedAnnotations.csv in memory
merged_annotations = []
with open('mergedAnnotations.csv', 'r') as f:
	for line in f:
		line = line[:-1]  # strip trailing newline
		merged_annotations.append(line)

thx

Can't find mergedAnnotations.csv'

I use below command, and find no such file mergedAnnotations.csv, any suggestions?
I download LISA data ,but
$ python create_pickle.py
Traceback (most recent call last):
File "create_pickle.py", line 36, in
with open('mergedAnnotations.csv', 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'mergedAnnotations.csv'

Thanks!

How to fix this problem?

When i running this command "python inference.py -m demo"

Restoring previously trained model at ./model.ckpt
Demo mode: Running inference on images in sample_images/
Running inference on sample_images/.DS_Store
Traceback (most recent call last):
File "inference.py", line 189, in
generate_output(input_files, mode)
File "inference.py", line 158, in generate_output
image_orig = np.asarray(Image.open('sample_images/' + image_file))
File "/usr/local/lib/python2.7/site-packages/PIL/Image.py", line 2519, in open
% (filename if filename else fp))
IOError: cannot identify image file 'sample_images/.DS_Store'

How to filter only stop sign and pedestrian

Great work! Btw, I want to train the model but stuck in this step:

"Follow instructions in the LISA Traffic Sign Dataset to create 'mergedAnnotations.csv' such that only stop signs and pedestrian crossing signs are shown"

How do I filter all except stop sign and pedestrian cross? I read the mergeAnnotationFiles.py but no clue. Please help me.

when i train LISA_DATA following your instruction, i can not detect traffic-sign(stop, pedestrianCrossing)

first, thank you for your study.

i train data following your instruction.

i have 2,600 resized_images_400x260 using create_pickle.py.

before that, 6,618 annotations was acquired by using mergeAnnotationFiles.py and extractAnnotations.py.

then use data_prep.py and train.py

this is train result.

Epoch 196 -- Train loss: 18.6558, Validation loss: 49.2677, Elapsed time: 11.47 sec
Epoch 197 -- Train loss: 18.7084, Validation loss: 49.3180, Elapsed time: 11.46 sec
Epoch 198 -- Train loss: 18.5914, Validation loss: 47.7009, Elapsed time: 11.41 sec
Epoch 199 -- Train loss: 18.5991, Validation loss: 53.4686, Elapsed time: 11.43 sec
Epoch 200 -- Train loss: 19.2694, Validation loss: 50.9338, Elapsed time: 11.43 sec
Total elapsed time: 38 min 10 sec
Trained model saved at: ./model.ckpt
Loss history saved at loss_history.p

train loss and validation have high rate.

so, i can not detect any traffic-signs in demo.

i do not change any setting..

hope for your help.

When I run the "train.py", I get this wrong:ot list containing Tensors of type '_Message' instead.

Traceback (most recent call last):
File "/home/tian/tensorflow/example/ssd_tensorflow_traffic_sign_detection-master/train.py", line 236, in
run_training()
File "/home/tian/tensorflow/example/ssd_tensorflow_traffic_sign_detection-master/train.py", line 123, in run_training
model = SSDModel()
File "/home/tian/tensorflow/example/ssd_tensorflow_traffic_sign_detection-master/model.py", line 178, in SSDModel
model = AlexNet()
File "/home/tian/tensorflow/example/ssd_tensorflow_traffic_sign_detection-master/model.py", line 159, in AlexNet
final_pred_conf = tf.concat(1, preds_conf)
File "/home/tian/.local/lib/python3.5/site-packages/tensorflow/python/ops/array_ops.py", line 1061, in concat
dtype=dtypes.int32).get_shape(
File "/home/tian/.local/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 611, in convert_to_tensor
as_ref=False)
File "/home/tian/.local/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 676, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "/home/tian/.local/lib/python3.5/site-packages/tensorflow/python/framework/constant_op.py", line 121, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "/home/tian/.local/lib/python3.5/site-packages/tensorflow/python/framework/constant_op.py", line 102, in constant
tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape, verify_shape=verify_shape))
File "/home/tian/.local/lib/python3.5/site-packages/tensorflow/python/framework/tensor_util.py", line 376, in make_tensor_proto
_AssertCompatible(values, dtype)
File "/home/tian/.local/lib/python3.5/site-packages/tensorflow/python/framework/tensor_util.py", line 302, in _AssertCompatible
(dtype.name, repr(mismatch), type(mismatch).name))
TypeError: Expected int32, got list containing Tensors of type '_Message' instead.

It seems that something wrong in here: final_pred_conf = tf.concat(1, preds_conf)
I am eager for your help, please help me ...

Error during run the command "create_pickle.py"

Thank you for your code. Great Work.
I got the annotations folder after run the two codes for data processing : extractAnnotations.py and mergeAnnotationFiles.py. The annotation folder contains of 2325 crop images of stop and pedestrian detection sign.
Now the problem is occurred when I run pickle file (create_pickle.py) for pickling the data of resize image. I got a pickle file name as "data_raw_400x260.p" but the size is 6 byte. If this problem is not solved then I can't move to next stage. Please help me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.