Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numpy error? #160

Open
seanmmorais opened this issue Apr 1, 2024 · 2 comments
Open

Numpy error? #160

seanmmorais opened this issue Apr 1, 2024 · 2 comments

Comments

@seanmmorais
Copy link

Hi all, trying to run train.py for coseg_seg, but keep running into this error:

C:\Users\Smorais\Anaconda3\envs\meshcnn\lib\site-packages\torch\package_directory_reader.py:17: UserWarning: Failed to initialize NumPy: No module named 'numpy.core._multiarray_umath' (Triggered internally at ..\torch\csrc\utils\tensor_numpy.cpp:68.)
dtype_to_storage = {data_type(0).dtype: data_type for data_type in storages}
------------ Options -------------
arch: meshunet
batch_size: 12
beta1: 0.9
checkpoints_dir: ./checkpoints
continue_train: False
dataroot: datasets/coseg_aliens
dataset_mode: segmentation
epoch_count: 1
export_folder:
fc_n: 100
flip_edges: 0
gpu_ids: []
init_gain: 0.02
init_type: normal
is_train: True
lr: 0.001
lr_decay_iters: 50
lr_policy: lambda
max_dataset_size: inf
name: coseg_aliens
ncf: [32, 64, 128, 256]
ninput_edges: 2280
niter: 100
niter_decay: 500
no_vis: False
norm: batch
num_aug: 20
num_groups: 16
num_threads: 3
phase: train
pool_res: [1800, 1350, 600]
print_freq: 10
resblocks: 3
run_test_freq: 1
save_epoch_freq: 1
save_latest_freq: 250
scale_verts: False
seed: None
serial_batches: False
slide_verts: 0.2
verbose_plot: False
which_epoch: latest
-------------- End ----------------
computing mean std from train data...
Traceback (most recent call last):
File "train.py", line 10, in
dataset = DataLoader(opt)
File "C:\Users\Smorais\Documents\MeshCNN\data_init
.py", line 21, in init
self.dataset = CreateDataset(opt)
File "C:\Users\Smorais\Documents\MeshCNN\data_init
.py", line 9, in CreateDataset
dataset = SegmentationData(opt)
File "C:\Users\Smorais\Documents\MeshCNN\data\segmentation_data.py", line 22, in init
self.get_mean_std()
File "C:\Users\Smorais\Documents\MeshCNN\data\base_dataset.py", line 32, in get_mean_std
for i, data in enumerate(self):
File "C:\Users\Smorais\Documents\MeshCNN\data\segmentation_data.py", line 29, in getitem
mesh = Mesh(file=path, opt=self.opt, hold_history=True, export_folder=self.opt.export_folder)
File "C:\Users\Smorais\Documents\MeshCNN\models\layers\mesh.py", line 16, in init
fill_mesh(self, file, opt)
File "C:\Users\Smorais\Documents\MeshCNN\models\layers\mesh_prepare.py", line 21, in fill_mesh
mesh2fill.ve = mesh_data['ve']
File "C:\Users\Smorais\Anaconda3\envs\meshcnn\lib\site-packages\numpy\lib\npyio.py", line 255, in getitem
raise KeyError("%s is not a file in the archive" % key)
KeyError: 've is not a file in the archive'

This is my command:
python train.py --dataroot datasets/coseg_aliens --name coseg_aliens --arch meshunet --dataset_mode segmentation --ncf 32 64 128 256 --ninput_edges 2280 --pool_res 1800 1350 600 --resblocks 3 --lr 0.001 --batch_size 12 --num_aug 20 --slide_verts 0.2

Anyone have any idea what's going on? I've tried different versions of numpy (1.15.0, 1.19) and get the same error.

@wang-hairui
Copy link

I guess that's a problem with the version update. Have you tried downgrading the numpy?
pip install numpy==1.21.6

@Broadcloak
Copy link

My Python version is 3.6.8, I reinstalled numpy 1.19.2 and it worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants