Closed leo-hao closed 3 years ago
You need to add the parent directory of the repository to PYTHONPATH. That will be ~/Documents/code in your case.
Dear doctor Nirkin, thank you for your reply on this question. In fact, I added the following sentence into the environment variable before training export PYTHONPATH=$PYTHONPATH:/home/data/userleo/Documents/code
And I just tried to add export PYTHONPATH=$PYTHONPATH:~/Documents/code export PYTHONPATH=$PYTHONPATH:/Documents/code Then, I source ~/.bashrc
run the test order But still the same error.
Looking forward to your reply!
Dear doctor Nirkin, I found the error after reading the code. The test command you gave in the README.md file does not require an underscore.
I fixed the README, thanks!
Hi, I have the same problem, how did you add the directory to the PythonPath, please?
Because the training failed, I tried to download cityscapes_efficientnet_b1_hyperseg-m.pth to hyperseg/weights, and renamed it to model_best.pth, I try python test.py 'weights' \ -td "hyper_seg.datasets.cityscapes.CityscapesDataset('data/cityscapes',split='val',mode='fine')"\ -it "seg_transforms.LargerEdgeResize([512,1024])" \ --gpus 0 Looking forward to your reply!