SaoYan / bgsCNN

Background subtraction using deep learning method.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stuck at some place

yikaiw opened this issue · comments

I try to run train.py (python train.py --generate_bg True --prepare_data True --dataset_dir dataset --log_dir record --model_version 2 --image_height 321 --image_width 321 --train_batch_size 40 --test_batch_size 200 --max_iteration 10000), but the code stuck at "sess.run(train_batch)" of the line "inputs_train, outputs_gt_train = build_img_pair(sess.run(train_batch))".

My code doesn't terminate, it just hangs there and stop giving any output.

Could you please help me to solve the problem?

Since "sess.run(test_batch)" (which is before "sess.run(train_batch)") ran well, I think the problem is not the code itself.

What GPU were you using? I guess the problem is that the queue is blocked because of limited hardware sources. You can try to use a smaller capacity at this part:

train_batch = tf.train.shuffle_batch([read_tfrecord(self.train_file, img_size)],
batch_size = self.train_batch_size,
capacity = 3000,
num_threads = 2,
min_after_dequeue = 1000)

But be careful when you change input parameters of tf.train.shuffle_batch.
Please refer to link 1 and link 2 for useful information about tf.train.shuffle_batch.

Thank you for your answer.
I'm sorry that I made a mistake. I find actually I am stopping at "sess.run(test_batch)"
(I'm using tensorflow1.3)
By the way, is there another way to access your pretrained model(.model files, so that I can directly run the test_on_video.py)? I cannot access files stored in the Google Drive.

The files in Google Drive are the dataset (image sequences with the generated background images), not the pre-trained model.

If you want the pre-trained models of Resnet or VGG16 (which are used in my code), you can directly go to https://github.com/tensorflow/models, enter directory "slim", and download the models provided by Tensorflow.

If you want the pre-trained model of my whole network, please inform me the version of the model you want. It would be more convenient if you could email me so that I could send you the model files.

Could you please send me the 5 pre-trained models of bgsCNN_v1,2,3,4,5(If the files are not very large)? I try to send emails to yanyiqinwpu@gmail.com, but failed. My email is wangyk17@mails.tsinghua.edu.cn or 845002185@qq.com
Thank you.

@SaoYan
Thanks for your work.

I would be very grateful if you could share your pre-trained model.It would be better if you put the link on the wiki so that we can download those by ourself.

I'm going to use bgsCNN_v2 here.If you have not planned to open the model, you can send my mailbox alone(1583213738@qq.com).

Could the author or someone can email me the pretrained model of bgsCNN_v2 , I don't have the hardware resources to train the model .
My email id is : rohitsinghnayak@gmail.com