Giter Club home page Giter Club logo

squeezeseg's People

Contributors

bichenwuucb 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

squeezeseg's Issues

CNN input features

Hi.

I have a question regarding the input features of the network. You are using x, y, z, distance and intensity. Aren't the first four breaking the CNN advantage of translation invariance and could this maybe result in some memorizing of the locations of objects? Did you perhaps test it with intensity and distance only?
Also fusing with rgb would definitely be interesting.

Could you open source the preprocess projection code

I followed https://github.com/Durant35/SqueezeSeg/blob/master/src/nodes/segment_node.py by @Durant35. But the code seems something wrong, show as below.

k1

k2

the first one is visualized by opencv from your npy file, the second one is created by the code from durant, they are the same frame from kitti. but they looks something different. And with such preprocess, the training result is very bad. Could you open source the projection code? @BichenWuUCB

batch queue error: Skipping cancelled dequeue attempt with queue not closed

I am running SqueezeSeg using TF 1.5.1 using default training command on AWS EC2 p3.2xlarge and I got this error after a while from training (demo works fine thought):

2018-02-19 19:10:34.304462: step 150, loss = 2.75 (127.6 images/sec; 0.251 sec/batch)
2018-02-19 19:10:36.817802: step 160, loss = 1.65 (127.7 images/sec; 0.251 sec/batch)
2018-02-19 19:11:38.855599: W tensorflow/core/kernels/queue_base.cc:285] _0_fifo_queue: Skipping cancelled dequeue attempt with queue not closed
Timed out waiting for notification
Traceback (most recent call last):
  File "./src/train.py", line 223, in <module>
    tf.app.run()
  File "/home/ubuntu/anaconda3/envs/tensorflow_p27/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 124, in run
    _sys.exit(main(argv))
  File "./src/train.py", line 219, in main
    train()
  File "./src/train.py", line 212, in train
    coord.join(enq_threads)
  File "/home/ubuntu/anaconda3/envs/tensorflow_p27/lib/python2.7/site-packages/tensorflow/python/training/coordinator.py", line 387, in join
    six.reraise(*self._exc_info_to_raise)
  File "/home/ubuntu/anaconda3/envs/tensorflow_p27/lib/python2.7/site-packages/tensorflow/python/training/coordinator.py", line 295, in stop_on_exception
    yield
  File "./src/train.py", line 98, in enqueue
    weight_per_batch = imdb.read_batch()
  File "/home/ubuntu/SqueezeSeg/src/imdb/imdb.py", line 87, in read_batch
    record = np.load(self._lidar_2d_path_at(idx)).astype(np.float32, copy=False)
  File "/home/ubuntu/anaconda3/envs/tensorflow_p27/lib/python2.7/site-packages/numpy/lib/npyio.py", line 421, in load
    pickle_kwargs=pickle_kwargs)
  File "/home/ubuntu/anaconda3/envs/tensorflow_p27/lib/python2.7/site-packages/numpy/lib/format.py", line 688, in read_array
    array.shape = shape
ValueError: cannot reshape array of size 187116 into shape (64,512,6)

Pixel wise features

Firstly, thank you very much for sharing your fantastic work.
My concern is about the pixel-wise features of the 2D projection: what does it happen when more than one point falls in a pixel? The obvious thing is computing the average, but if I'm not wrong, you don't address this issue in your paper. Thanks in advance.

Training Error

Hi Sir,
I successfully run the demo.py file but while running train.py I am getting this error, could anyone will help here. Help is appreciated.
Attaching.txt file here for the error
train_terminal.txt

Also, I m getting this error while running eval.py
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
No checkpoint file found
Wait 60s for new checkpoints to be saved ...
No checkpoint file found
Wait 60s for new checkpoints to be saved ...
No checkpoint file found
Wait 60s for new checkpoints to be saved ...

data used for training

Hi! I got some problem when I was downloading your data. It seems to be some problem with your link. Could your please share your data again? BTW, the 3D raw data is also needed. THX!

INPUT_MEAN and INPUT_STD, how the values come?

hello, all my friends,
in the code:
norm_lidar = (lidar - self._mc.INPUT_MEAN) / self._mc.INPUT_STD

x, y, z, intensity, distance

mc.INPUT_MEAN = np.array([[[10.88, 0.23, -1.04, 0.21, 12.12]]])
mc.INPUT_STD = np.array([[[11.47, 6.91, 0.86, 0.16, 12.32]]])

And I don't understand how the values(INPUT_MEAN and INPUT_STD) are from?

Title typo

I opened this issue because I think that there is a typo in the repository title:
Implementation of SqueezeSeg, convolutional neural networks for LiDAR point clout segmentation

The problem in result by eval in val data

Hi, when I follow the code and do the evaluation, the result quite different with the result which shown in the paper, especially in pedestrian and cyclist. And I do not change any parameters. Is this reasonable?

How to set the model config file

I am using the model to seg more than 4 classes , I chane the NUM_CLASS. Would you please show me how to set the CLS_LOSS_WEIGHT、CLS_COLOR_MAP、BILATERAL_THETA_A、 BILATERAL_THETA_R in model config.

Data pre-process on Lidar data (lidar_mask/lidar_input)

First, thanks for the great work! I pull this repo and successfully ran it with the data you provided.

Now, I'd like to hook up this one directly with Lidar to run a real-time test. However, it seems you already did some pre-process the Lidar data and when you feed you have:

  • lidar_mask
  • lidar_input

those two placeholders

I wonder how can I prepare those? Say I got a PointCloud2 from LiDAR. Any references?

Cannot load the required modules for installation

Hello, I am trying to install the required modules to run the training.sh and I get an error when running

pip install -r requirements.txt

ERROR: Could not find a version that satisfies the requirement tensorflow-gpu==1.0.0 (from -r requirements.txt (line 5)) (from versions: none)
ERROR: No matching distribution found for tensorflow-gpu==1.0.0 (from -r requirements.txt (line 5))

Does anybody have the same issue ?
Bonus question : is it possible to use tensorflow instead of tensorflow-gpu ?

Thank you very much for your help !

Pre-Trained model

@BichenWuUCB Hi thanks for the wonderful , i had few queries

  1. can you please share the pre trained model ?
  2. how long will it take to train on the kitti dataset
    thanks in advance

lidar_2d data

hello,
I am trying to project KITTI velodyne data to 2d sphere and having some questions.
I tried to read your .npy data file like
data = np.fromfile("2011_09_26_0001_0000000000.npy", dtype=np.float32)
and reshape it like
data = data.reshape((-1,5))
when I call data
it turns out like this
[ 2.2366853e+08, 1.2387478e-40, 3.4833497e-15, 4.4898648e+21, 1.5767864e-19],
[ 2.1442303e-07, 2.2228396e-15, 7.6830766e+31, 1.7177136e+19, 6.7425655e+22],
[ 1.5767864e-19, 1.8727951e+31, 2.2228527e-15, 2.7904159e+29, 1.5767847e-19]

Does each of them contain data like [x, y, z, sqrt(x^2+y^2+z^2), intensity] ?
I found x,y,z and sqrt(x^2+y^2+z^2) don't match.

AssertionError

While trying to run train.sh I encountered this error please do help me out in any way. Thanks!
Traceback (most recent call last):
File "/home/jashshah999/Downloads/SqueezeSeg/src/train.py", line 220, in
tf.app.run()
File "/home/jashshah999/venv/local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 44, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "/home/jashshah999/Downloads/SqueezeSeg/src/train.py", line 216, in main
train()
File "/home/jashshah999/Downloads/SqueezeSeg/src/train.py", line 64, in train
imdb = kitti(FLAGS.image_set, FLAGS.data_path, mc)
File "/home/jashshah999/Downloads/SqueezeSeg/src/imdb/kitti.py", line 20, in init
self._image_idx = self._load_image_set_idx()
File "/home/jashshah999/Downloads/SqueezeSeg/src/imdb/kitti.py", line 33, in _load_image_set_idx
'File does not exist: {}'.format(image_set_file)
AssertionError: File does not exist: ImageSet/.txt

Also before this, I had to convert all the paths to absolute so anything that had ./ (SOMETHING) had to be changed to /home/jashshah999/Downloads/SqueezeSeg/(SOMETHING)

Please do help me out!
Thanks.

How to divide dataset into training set and validation set in 10,848 frames

Hi,
I have a problem with using a dataset that is published by the author of SqueezeSeg.
In a paper, 8,057 are used for training and 2,791 are used for validation. However, the given dataset is not divided. The total 10,848 frames just are given. I wonder how to divide the total dataset into the training and validation set. Please help me !!

Thanks,

ImportError: No module named 'kitti_squeezeSeg_config'

I am getting an error when trying to run demo.py. It says that there is no module named kitti_squeezeSeg_config. How do I obtain this module?
The exact error is as shown below:

Traceback (most recent call last):
File "demo.py", line 20, in
from config import *
File "/home/jashshah999/TensorFlow/venv/SqueezeSeg/src/config/init.py", line 1, in
from kitti_squeezeSeg_config import kitti_squeezeSeg_config
ImportError: No module named 'kitti_squeezeSeg_config'

Any help is appreciated
Thanks

Pickle backward compatibility

I'm experimenting some issues importing the pretrained model because I'm running the code with joblib 0.16 and the pickles were exported with 0.10, any idea?

Could you provide 3D lidar raw data?

Thanks for sharing your work!
I noticed that the data you provide is lidar_2d, which is projected from 3D lidar data. I am wondering whether other projection method would be better? Could anybody provide the 3D lidar data? Thanks!

BATCH_SIZE is hard-coded

Hi! I notice that the BATCH_SIZE is hard-coded to 1 and you will change that later. Have you fix this problem? If yes, would you update the code? If no, what should I do to fix that? Thanks!!!

How to run demo.py? I have a problem with tensorflow.

When I run python demo.py I encounter this error:

.
.
.
  File "demo.py", line 54, in detect
    saver = tf.train.Saver(model.model_params)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1051, in __init__
    self.build()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1081, in build
    restore_sequentially=self._restore_sequentially)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 675, in build
    restore_sequentially, reshape)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 402, in _AddRestoreOps
    tensors = self.restore_op(filename_tensor, saveable, preferred_shard)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 242, in restore_op
    [spec.tensor.dtype])[0])
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_io_ops.py", line 668, in restore_v2
    dtypes=dtypes, name=name)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 763, in apply_op
    op_def=op_def)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2395, in create_op
    original_op=self._default_original_op, op_def=op_def)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1264, in __init__
    self._traceback = _extract_stack()

InvalidArgumentError (see above for traceback): Unsuccessful TensorSliceReader constructor: Failed to get matching files on ./data/SqueezeSeg/model.ckpt-23000: Not found: ./data/SqueezeSeg
         [[Node: save/RestoreV2_5 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_5/tensor_names, save/RestoreV2_5/shape_and_slices)]]

NOTE: I install tensorflow==1.0.0 instead of tensorflow-gpu==1.0.0 because I haven't NVIDIA, is this correct?

how to freeze the pb for c++

if i use the typical freeze_graph.py method, it cannot produce the placeholders. I wonder if the fifoqueue causes this question. could you share the frozen script

Problem with training

Hi :),

I wanted to train the model. I followed all the steps described in the readme.md.
The demo script ran perfectly but for the training I always confront the same issue( it ran just for the first step and it stops after) .
./scripts/train.sh -gpu 0 -image_set train -log_dir ./log/
Shape of the pretrained parameter of conv1 does not match, use randomly initialized parameter
Cannot find conv1_skip in the pretrained model. Use randomly initialized parameters
Cannot find fire_deconv10/squeeze1x1 in the pretrained model. Use randomly initialized parameters
Cannot find fire_deconv10/expand1x1 in the pretrained model. Use randomly initialized parameters
Cannot find fire_deconv10/expand1x1 in the pretrained model. Use randomly initialized parameters
Cannot find fire_deconv10/expand3x3 in the pretrained model. Use randomly initialized parameters
Cannot find fire_deconv11/squeeze1x1 in the pretrained model. Use randomly initialized parameters
Cannot find fire_deconv11/expand1x1 in the pretrained model. Use randomly initialized parameters
Cannot find fire_deconv11/expand3x3 in the pretrained model. Use randomly initialized parameters
Cannot find fire_deconv12/squeeze1x1 in the pretrained model. Use randomly initialized parameters
Cannot find fire_deconv12/expand1x1 in the pretrained model. Use randomly initialized parameters
Cannot find fire_deconv12/expand3x3 in the pretrained model. Use randomly initialized parameters
Cannot find fire_deconv13/squeeze1x1 in the pretrained model. Use randomly initialized parameters
Cannot find fire_deconv13/expand1x1 in the pretrained model. Use randomly initialized parameters
Cannot find fire_deconv13/expand3x3 in the pretrained model. Use randomly initialized parameters
Cannot find conv14_prob in the pretrained model. Use randomly initialized parameters
WARNING:tensorflow:From /home/rahul/$SQSG_ROOT/src/nn_skeleton.py:736: calling softmax (from tensorflow.python.ops.nn_ops) with dim is deprecated and will be removed in a future version.
Instructions for updating:
dim is deprecated, use axis instead
Model statistics saved to ./log///train/model_metrics.txt.
WARNING:tensorflow:From ./src/train.py:109: all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Please use tf.global_variables instead.
WARNING:tensorflow:From /home/rahul/anaconda2/lib/python2.7/site-packages/tensorflow/python/util/tf_should_use.py:189: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Use tf.global_variables_initializer instead.
2019-01-07 11:09:21.153978: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-01-07 11:09:34.158950: step 0, loss = 2.98 (2.6 images/sec; 12.406 sec/batch) terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
./scripts/train.sh: line 73: 9311 Aborted (core dumped) python ./src/train.py --dataset=KITTI --pretrained_model_path=./data/SqueezeNet/squeezenet_v1.1.pkl --data_path=./data/ --image_set=$IMAGE_SET --train_dir="$logdir/train" --net=$NET --max_steps=$STEPS --summary_step=100 --checkpoint_step=1000 --gpu=$GPUID

Does anyone have any idea how to solve this issue ?

Thank you :)

Hey everyone, confused on $SQSG_ROOT

I am a newbie with Ubuntu but I tried searching Google for this, I'm confused on what I'm supposed to do after cloning the repository here.

How am I supposed to rename the root directory as $SQSG_ROOT? What does that even mean?

I'm researching online too obviously but could somebody link some documentation or something to explain this? Thanks!

Number of filters in Fire modules not consistent with the paper.

In your paper it is pointed that for an input tensor of HxWxC, the squeeze layer of the fire module has C/4 filters, and the expand layers have both C/2 filters, but in the code you are setting:
e1x1 = e3x3 = 4s1x1

With this sizes, the fire module does not preserve the equality between the input size and the output size.

Thx!

Hyper-parameter settings.

How would BILATERAL_THETA_A, BILATERAL_THETA_R and ANG_THETA_A vary for datasets with more/different labels?

Not able to run demo.py

python src/demo.py
I am encountering the following error while running demo.py. due to same name. Can you tell the way out?

File "src/demo.py", line 20, in <module> from config import * File "./SqueezeSeg/src/config/__init__.py", line 1, in <module> from config.kitti_squeezeSeg_config import kitti_squeezeSeg_config File "./SqueezeSeg/src/config/kitti_squeezeSeg_config.py", line 7, in <module> from config import base_model_config ImportError: cannot import name 'base_model_config'

Spherical projection

Hi, thanks for sharing your code! Are you planning to upload also the spherical projection part (described in your paper), in order to convert data from point cloud to projection images?

How to visualize .npy files?

Hello,

Thanks for sharing such a nice code in advance :-)

I trained SqueezeNet model using lidar_2d data and evaluated it and saved pred_....npy files like demo.py

but I don't know how to visualize it. I just got a lot of .npy files on my computer.

In your YouTube Video, there is visualizing tool which can visualize KITTI dataset and your .npy dataset at the same time. but I don't think https://github.com/MarkMuth/QtKittiVisualizer will work for me.


4

will you plan to share this visualization tool in the future?
Thank you

Visualize Segmented 3D Points

Is there a way to get a visualization of the segmented data without Rviz? Something similar to the first GIF on the Readme:

Why W=512 in projection pre-processing

I'm curious about during the data processing, why is 512 used to set W. It makes sense to set H=64 since it is 64 beams LiDAR, but how is 512 obtained for W? I recall 0.09° is the horizontal resolution and you picked 90° as the front view. Is 512 empirical for making projected images look like the real camera images?
Thanks!

Hi

I want to test this net on my own lidar data. Could you give me the source code which is used to convert to input_data?

Class loss weight

Hello again,
Which criterion have you followed in order to balance the dataset? You have manually set the CLASS_LOSS_WEIGH, i'm guessing how. I'm thinking in taking the ratios of number of points per class among all labeled points, but this weights will sum up to 1. For example, if there are 100 labeled points and 33 belong to 'car', the weight for 'car' is 0.33.
Thank you very much!

out of memory

Hi and Thank you for your work.
I am now testing it with GTX 1070(8GB) and having a problem of out of memory while training( with tensorflow-gpu 1.0 ). Should I modify the config files? Would you guys please give me some advices? Thanks and looking forward to your reply.

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.