Open chuangwaipiaoluohuaxiang opened 7 months ago
Hi! iirc you have to create them with sm_to_img.py
, which is in this repository, using the masks from the original dataset
Thank you for your reply! It's very useful. I want to visualize my images to get object affordance. What should I do?
Please follow the steps in https://github.com/beapc18/AffordanceNet?tab=readme-ov-file#testing. You will need to setup the repo previously as explained in https://github.com/beapc18/AffordanceNet?tab=readme-ov-file#setup-guide
Thank you for your reply. Setting "VISUALIZE=True" enables visualization. But can the code visualize my own pictures?
Yes, the results are plotted with matplotlib and you can use your images, but you will have to find in which path you should place your images. Maybe just updating DATA_MASKS_DIR
and DATA_MASKS_DIR_IMGS
to point to your images is enough.
2024-03-28 15:47:20.439166: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 411041792 exceeds 10% of free system memory. 2024-03-28 15:47:20.487141: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 411041792 exceeds 10% of free system memory. 2024-03-28 15:47:20.505193: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 411041792 exceeds 10% of free system memory. 2024-03-28 15:47:21.708147: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 411041792 exceeds 10% of free system memory. 2024-03-28 15:47:22.058499: W tensorflow/core/framework/op_kernel.cc:1767] OP_REQUIRES failed at whole_file_read_ops.cc:116 : Not found: /home/csce/AffordanceNet_ROOT/data/cache/GTsegmask_VOC_2012_train_images/5_1_segmask.png; No such file or directory 2024-03-28 15:47:22.058503: W tensorflow/core/framework/op_kernel.cc:1767] OP_REQUIRES failed at whole_file_read_ops.cc:116 : Not found: /home/csce/AffordanceNet_ROOT/data/cache/GTsegmask_VOC_2012_train_images/5_2_segmask.png; No such file or directory 2024-03-28 15:47:22.058581: W tensorflow/core/framework/op_kernel.cc:1767] OP_REQUIRES failed at whole_file_read_ops.cc:116 : Not found: /home/csce/AffordanceNet_ROOT/data/cache/GTsegmask_VOC_2012_train_images/5_3_segmask.png; No such file or directory 2024-03-28 15:47:22.059362: W tensorflow/core/framework/op_kernel.cc:1767] OP_REQUIRES failed at whole_file_read_ops.cc:116 : Not found: /home/csce/AffordanceNet_ROOT/data/cache/GTsegmask_VOC_2012_train_images/1676_1_segmask.png; No such file or directory 2024-03-28 15:47:22.060405: W tensorflow/core/framework/op_kernel.cc:1767] OP_REQUIRES failed at whole_file_read_ops.cc:116 : Not found: /home/csce/AffordanceNet_ROOT/data/cache/GTsegmask_VOC_2012_train_images/1836_1_segmask.png; No such file or directory 2024-03-28 15:47:22.060502: W tensorflow/core/framework/op_kernel.cc:1767] OP_REQUIRES failed at whole_file_read_ops.cc:116 : Not found: /home/csce/AffordanceNet_ROOT/data/cache/GTsegmask_VOC_2012_train_images/1836_2_segmask.png; No such file or directory 2024-03-28 15:47:22.061090: W tensorflow/core/framework/op_kernel.cc:1767] OP_REQUIRES failed at whole_file_read_ops.cc:116 : Not found: /home/csce/AffordanceNet_ROOT/data/cache/GTsegmask_VOC_2012_train_images/5410_1_segmask.png; No such file or directory 2024-03-28 15:47:22.062134: W tensorflow/core/framework/op_kernel.cc:1767] OP_REQUIRES failed at whole_file_read_ops.cc:116 : Not found: /home/csce/AffordanceNet_ROOT/data/cache/GTsegmask_VOC_2012_train_images/5459_1_segmask.png; No such file or directory 2024-03-28 15:47:22.063019: W tensorflow/core/framework/op_kernel.cc:1767] OP_REQUIRES failed at whole_file_read_ops.cc:116 : Not found: /home/csce/AffordanceNet_ROOT/data/cache/GTsegmask_VOC_2012_train_images/8777_1_segmask.png; No such file or directory 2024-03-28 15:47:22.065401: W tensorflow/core/framework/op_kernel.cc:1767] OP_REQUIRES failed at whole_file_read_ops.cc:116 : Not found: /home/csce/AffordanceNet_ROOT/data/cache/GTsegmask_VOC_2012_train_images/6358_1_segmask.png; No such file or directory Traceback (most recent call last): File "/home/csce/.local/lib/python3.6/site-packages/tensorflow/python/eager/context.py", line 2102, in execution_mode yield File "/home/csce/.local/lib/python3.6/site-packages/tensorflow/python/data/ops/iterator_ops.py", line 758, in _next_internal output_shapes=self._flat_output_shapes) File "/home/csce/.local/lib/python3.6/site-packages/tensorflow/python/ops/gen_dataset_ops.py", line 2610, in iterator_get_next _ops.raise_from_not_ok_status(e, name) File "/home/csce/.local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 6843, in raise_from_not_ok_status six.raise_from(core._status_to_exception(e.code, message), None) File "", line 3, in raise_from
tensorflow.python.framework.errors_impl.NotFoundError: /home/csce/AffordanceNet_ROOT/data/cache/GTsegmask_VOC_2012_train_images/5_1_segmask.png; No such file or directory
[[{{node map/while/body/_1/map/while/ReadFile}}]] [Op:IteratorGetNext]
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "affordancenet_predictor.py", line 107, in
for i, image_data in enumerate(test_feed):
File "/home/csce/AffordanceNet_ROOT/AffordanceNet/utils/train_utils.py", line 80, in iit_generator_inference_no_resize
for image_data in dataset:
File "/home/csce/.local/lib/python3.6/site-packages/tensorflow/python/data/ops/iterator_ops.py", line 736, in next
return self.next()
File "/home/csce/.local/lib/python3.6/site-packages/tensorflow/python/data/ops/iterator_ops.py", line 772, in next
return self._next_internal()
File "/home/csce/.local/lib/python3.6/site-packages/tensorflow/python/data/ops/iterator_ops.py", line 764, in _next_internal
return structure.from_compatible_tensor_list(self._element_spec, ret)
File "/home/csce/anaconda3/envs/affordencenet/lib/python3.6/contextlib.py", line 99, in exit
self.gen.throw(type, value, traceback)
File "/home/csce/.local/lib/python3.6/site-packages/tensorflow/python/eager/context.py", line 2105, in execution_mode
executor_new.wait()
File "/home/csce/.local/lib/python3.6/site-packages/tensorflow/python/eager/executor.py", line 67, in wait
pywrap_tfe.TFE_ExecutorWaitForAllPendingNodes(self._handle)
tensorflow.python.framework.errors_impl.NotFoundError: /home/csce/AffordanceNet_ROOT/data/cache/GTsegmask_VOC_2012_train_images/5_1_segmask.png; No such file or directory
[[{{node map/while/body/_1/map/while/ReadFile}}]]
2024-03-28 15:47:22.191263: W tensorflow/core/kernels/data/generator_dataset_op.cc:103] Error occurred when finalizing GeneratorDataset iterator: Failed precondition: Python interpreter state is not initialized. The process may be terminated.
[[{{node PyFunc}}]]
I'm sorry to bother you. Could you please tell me where I can find the "GTsegmask_VOC_2012_train_images" folder?