Giter Site home page Giter Site logo

angeladai / scancomplete Goto Github PK

View Code? Open in Web Editor NEW
262.0 262.0 50.0 568 KB

[CVPR'18] ScanComplete: Large-Scale Scene Completion and Semantic Segmentation for 3D Scans

License: Apache License 2.0

Python 89.69% MATLAB 4.16% Shell 6.15%
3d-reconstruction autoregressive-neural-networks computer-graphics computer-vision deep-learning

scancomplete's People

Contributors

angeladai 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

scancomplete's Issues

About the output after running completion task

Hello,
After i run the run_complete_scans_hierarchical.sh, in the vis folder i obtain some .obj files. I opened some of those .obj file with Meshlab, but in the visualisation the points are black :

Capture du 2019-08-01 11-54-39

While the run_complete_scans_hierarchical.sh is running, i got some error on count and count++ not found.

Any Ideas on that? HOw do you visualize the results ?
THank you !

Segmentation part - next issues

So finally got the completetion code up and running, so decided to go for it and activate the segmentation/classification part. It had to be good to be true:

Processing hierarchy level 3, scene 1 of 1: /home/github/ScanComplete/data/vox19/e582d82458819d07c184a49feac3ca85__0__.tfrecords.
Traceback (most recent call last):
  File "complete_scan.py", line 399, in <module>
    tf.app.run(main)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "complete_scan.py", line 330, in main
    assign_fn(session)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/framework/python/ops/variables.py", line 660, in callback
    saver.restore(session, model_path)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1560, in restore
    {self.saver_def.filename_tensor_name: save_path})
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 895, in run
    run_metadata_ptr)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1124, in _run
    feed_dict_tensor, options, run_metadata)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1321, in _do_run
    options, run_metadata)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1340, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [128] rhs shape= [32]
	 [[Node: save/Assign_8 = Assign[T=DT_FLOAT, _class=["loc:@Conv_101/biases"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/cpu:0"](Conv_101/biases, save/RestoreV2_8)]]

Caused by op u'save/Assign_8', defined at:
  File "complete_scan.py", line 399, in <module>
    tf.app.run(main)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "complete_scan.py", line 329, in main
    checkpoint_path, tf.contrib.framework.get_variables_to_restore())
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/framework/python/ops/variables.py", line 658, in assign_from_checkpoint_fn
    saver = tf_saver.Saver(var_list, reshape=reshape_variables)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1140, in __init__
    self.build()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1172, in build
    filename=self._filename)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 688, in build
    restore_sequentially, reshape)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 419, in _AddRestoreOps
    assign_ops.append(saveable.restore(tensors, shapes))
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 155, in restore
    self.op.get_shape().is_fully_defined())
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/state_ops.py", line 274, in assign
    validate_shape=validate_shape)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_state_ops.py", line 43, in assign
    use_locking=use_locking, name=name)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 767, in apply_op
    op_def=op_def)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2630, 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 1204, in __init__
    self._traceback = self._graph._extract_stack()  # pylint: disable=protected-access

InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [128] rhs shape= [32]
	 [[Node: save/Assign_8 = Assign[T=DT_FLOAT, _class=["loc:@Conv_101/biases"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/cpu:0"](Conv_101/biases, save/RestoreV2_8)]]

Will have a look and suggest possible fixes if found.

about required data

Hi, @angeladai ,

Thanks for sharing the ScanComplete package. Would you list the download link for the required data for executing those two scripts (run_complete_scans_hierarchical.sh & run_train.sh)?

THX!

AssertionError complete_scan.py

Traceback (most recent call last):
File "complete_scan.py", line 394, in
tf.app.run(main)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "complete_scan.py", line 300, in main
FLAGS.num_quant_levels, FLAGS.p_norm, FLAGS.predict_semantics)
File "complete_scan.py", line 128, in read_inputs
assert os.path.isfile(previous_file)
AssertionError

In complete_scan.py line 122:

if not FLAGS.is_base_level:
previous_file = os.path.join(
FLAGS.output_dir_prev, 'level' + str(FLAGS.hierarchy_level - 1) + '_' +
os.path.splitext(os.path.basename(filename))[0] + 'pred.tfrecord')
tf.logging.info('Reading previous predictions frome file: %s',
previous_file)
assert os.path.isfile(previous_file)

Any ideas?

how to get the newest code

@angeladai
Thanks for sharing this paper and code, great work! how to get the newest code ? The model and data can not download, and some scripts have been deleted.Thanks!

Run the model on scans from ScanNet

Hi, I'd like to run the inference on ScanNet dataset, but I can't figure out how to generate the tfrecords. Could you please share the code to generate them on ScanNet dataset? Thanks

How to run test / train code

Hi,
Thanks for sharing this paper and code. I am also researching for 3d reconstruction and segmentation. and I think your idea is very great. now I am trying to run run_complete_scans_hierarchical.sh with below parameters but it doesn't work very well. Can you tell me how to run this code (how to fill test directory paths or other else) Thank you !
screenshot from 2018-06-26 17-32-41

Running the test code

So I configured a docker with your code and exact code copies.
The configuration file lists

# Parameter section begins here. Edit to change number of test scenes, which model to use, output path.
MAX_NUM_TEST_SCENES=1
NUM_HIERARCHY_LEVELS=3
BASE_OUTPUT_DIR=../results

# Fill in path to test scenes
TEST_SCENES_PATH_3='../data/vox19'
TEST_SCENES_PATH_2='../data/vox9'
TEST_SCENES_PATH_1='../data/vox5'

# Fill in model to use here
PREDICT_SEMANTICS=0
HIERARCHY_LEVEL_3_MODEL='../models/completion/hierarchy1of3'
HIERARCHY_LEVEL_2_MODEL='../models/completion/hierarchy2of3'
HIERARCHY_LEVEL_1_MODEL='../models/completion/hierarchy3of3'

# Specify output folders for each hierarchy level.
OUTPUT_FOLDER_3=${BASE_OUTPUT_DIR}/vis_level3
OUTPUT_FOLDER_2=${BASE_OUTPUT_DIR}/vis_level2
OUTPUT_FOLDER_1=${BASE_OUTPUT_DIR}/vis_level1

When running the shell script from src folder, the first hierarchy is loaded, but when it tries to save the results I get an error

Processing hierarchy level 3, scene 1 of 1: ../data/vox19/e582d82458819d07c184a49feac3ca85__0__.tfrecords.
Traceback (most recent call last):
  File "complete_scan.py", line 394, in <module>
    tf.app.run(main)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 125, in run
    _sys.exit(main(argv))
  File "complete_scan.py", line 325, in main
    assign_fn(session)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/framework/python/ops/variables.py", line 697, in callback
    saver.restore(session, model_path)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1713, in restore
    raise ValueError("Can't load save_path when it is None.")
ValueError: Can't load save_path when it is None.

Which in my opinion means that the paths are somehow configured incorrectly. Any clues on where to look?

visualize pred.obj file in matlab?

Hi~
I have successfully run the test code and got some โ€œ.objโ€ file.
However, I don not know how to use matlab to generate meshes visualization displayed in your paper, could you share the relevant codes?
thank you very much!!

Sucessfully running code, errors when generating meshes

After issue #6 I succeeded in building up the pipeline for completion, which seems to run now.
However, there is another issue popping up at each stage of the hierarchy levels

Traceback (most recent call last):
  File "complete_scan.py", line 397, in <module>
    tf.app.run(main)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "complete_scan.py", line 393, in main
    target_semantics)
  File "complete_scan.py", line 240, in export_prediction_to_mesh
    [None, save_errors, save_errors], [None, save_pred_sem, save_target_sem],
UnboundLocalError: local variable 'save_pred_sem' referenced before assignment

I will look into this further down the line and provide possible solutions whenever needed.

about test question

can you give me some example as run_train,i fill model to use but i cant test

Code for generate TFRecord

Hi
I cannot find the code to generate TFRecord?
Can you please share this code or recommend to another similar source?
Thank you!

About data generation

Hi!
I have got SUNCG database,but how to apply data generation to the database,can you show me your code? thank you very much!

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.