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

ERROR mask2json #39

Closed
siwalex opened this issue Aug 10, 2021 · 3 comments
Closed

ERROR mask2json #39

siwalex opened this issue Aug 10, 2021 · 3 comments

Comments

@siwalex
Copy link

siwalex commented Aug 10, 2021

python mask2json.py
Traceback (most recent call last):
File "mask2json.py", line 15, in
getMultiShapes.getMultiShapes(imgPath, maskPath, savePath) # without yaml
File "C:\Users\Siwal\AppData\Local\Programs\Python\Python37\lib\site-packages\convertmask\utils\getMultiShapes.py", line 229, in getMultiShapes
raise FileNotFoundError('mask/labeled image not found')
FileNotFoundError: mask/labeled image not found

@guchengxi1994
Copy link
Owner

it seems that your file path is different from mine. in this script, these files should be located at this filepath:
`
imgPath = 'D:\testALg\mask2json\mask2json\static\multi_objs_test.jpg'

maskPath = 'D:\\testALg\\mask2json\\mask2json\\static\\multi_objs_json\\label.png'

savePath = 'D:\\testALg\\mask2json\\mask2json\\static\\multi_objs_json\\1109\\'

yamlPath = 'D:\\testALg\\mask2json\\mask2json\\static\\multi_objs_json\\info.yaml'`

you should check whether you have this files

@siwalex
Copy link
Author

siwalex commented Aug 12, 2021

hello,

i have all the files (i dowloaded your github zip)

i changed in E:\Mega\Alexandre\car_dataset\mask2json\test_scripts\mask2json.py lines 92 to 95 by :

imgPath = 'E:\\Mega\\Alexandre\\car_datase\\mask2json\\static\\multi_objs_test.jpg'
maskPath = 'E:\\Mega\\Alexandre\\car_datase\\mask2json\\static\\multi_objs_json\\label.png'
savePath = 'E:\\Mega\\Alexandre\\car_datase\\mask2json\\static\\multi_objs_json\\1109\\'
yamlPath = 'E:\\Mega\\Alexandre\\car_datase\\mask2json\\static\\multi_objs_json\\info.yaml'

and have this error :

λ python mask2json.py
Traceback (most recent call last):
File "mask2json.py", line 98, in
getMultiShapes.getMultiShapes(imgPath, maskPath, savePath) # without yaml
File "..\convertmask\utils\methods\getMultiShapes.py", line 233, in getMultiShapes
raise FileNotFoundError('mask/labeled image not found')
FileNotFoundError: mask/labeled image not found

@guchengxi1994
Copy link
Owner

mask2json

I tested on my pc it worked well...

I noticed that you install this repo by pip, but the version on pypi has not been updated for a long time. That may be the reason you cannot run this script. It is my fault ,sorry about that. To deal with this problem, you can git clone this repo, switch to the test branch and try again.

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

2 participants