NeLy-EPFL / DeepFly3D

Motion capture (markerless 3D pose estimation) pipeline and helper GUI for tethered Drosophila.
GNU Lesser General Public License v3.0
89 stars 17 forks source link

error with visualizing test data #27

Closed hanhanhan-kim closed 4 years ago

hanhanhan-kim commented 4 years ago

Hello, I am using the most recent DeepFly3D (commit 6764e08). I am trying to run the visualization block of code as specified in the docs. That is:

import matplotlib.pyplot as plt
from deepfly.GUI.CameraNetwork import CameraNetwork
camNet = CameraNetwork(image_folder=image_folder)
image_folder = './data/test/df3d'

plt.imshow(camNet[1].plot_2d())

Running this block of code results in the following error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-5-aed64e215871> in <module>
      4 image_folder = './data/test/df3d'
      5 camNet = CameraNetwork(image_folder=image_folder, 
----> 6                        output_folder=image_folder)
      7 
      8 

~/src/DeepFly3D/deepfly/GUI/CameraNetwork.py in __init__(self, image_folder, output_folder, calibration, num_images, num_joints, image_shape, heatmap_shape, cam_id_list, cid2cidread, heatmap, pred, cam_list, hm_path, pred_path)
    104 
    105             for cam_id in cam_id_list:
--> 106                 cam_id_read = cid2cidread[cam_id]
    107 
    108                 if heatmap is not None:# and type(heatmap) is np.core.memmap:

TypeError: 'NoneType' object is not subscriptable

To note, I have the following tree from ...data/test/df3d:

.
├── calib__home_hank-x299_src_DeepFly3D_data_test.pkl
├── cam_order.npy
├── heatmap_-home-hank-x299-src-DeepFly3D-data-test.pkl
├── pose_corr_-home-hank-x299-src-DeepFly3D-data-test-df3d-.pkl
├── pose_result__home_hank-x299_src_DeepFly3D_data_test.pkl
└── preds_-home-hank-x299-src-DeepFly3D-data-test.pkl

How might I address the error? Thanks

semihgunel commented 4 years ago

For future reference, we rewrote the same notebook. Let me know if such problems persist.