Comments (11)
In short:
- Create a directory named pretrained, under the root of the enet-keras project
- Download the original pretrained weights from here
- Put the file in the newly created
pretrained
folder - Run
python from_torch.py
in order to create thetorch_enet.pkl
file.
Again, I'm sorry for the terrible documentation, but I'm going to be updating that soon; I just haven't found the time yet.
from enet-keras.
@PavlosMelissinos Thanks for quick response!
Although from_torch.py has some related path problem, but I could easily solve it.
Now I got the torch_enet.pkl file for training.
from enet-keras.
Check it out again if you will, I've reorganized the project and updated the readme. Hopefully it's much better now. Thanks!
from enet-keras.
In short:
1. Create a directory named pretrained, under the root of the enet-keras project 2. Download the original pretrained weights from [here](https://www.dropbox.com/sh/dywzk3gyb12hpe5/AAD5YkUa8XgMpHs2gCRgmCVCa) 3. Put the file in the newly created `pretrained` folder 4. Run `python from_torch.py` in order to create the `torch_enet.pkl` file.
Again, I'm sorry for the terrible documentation, but I'm going to be updating that soon; I just haven't found the time yet.
The link for torch.enet.pkl is no longer valid. Any chance you could update this?
from enet-keras.
Hey there @Anguse ,
This is an outdated ticket. I've since moved the pretrained model to github (because it's much less volatile than hosting it on my dropbox account) and created setup.sh which should download the model and run from_torch.py
automatically. It' right there on README.md
It's weird to still see interest in this project after all these years as it has not really been active for a while so I'm not promising anything but let me know if it works for you and if not I'll see what I can do! :)
from enet-keras.
Thanks for your quick response!
I tried running setup.sh but this gives the following error:
Traceback (most recent call last):
File "src/models/from_torch.py", line 68, in
with open(os.path.join(DIR_PATH, os.pardir, os.pardir, 'pretrained', './pretrained/torch_enet.pkl'), 'wb') as fout:
FileNotFoundError: [Errno 2] No such file or directory: '/home/harald/Documents/enet-keras/src/models/../../pretrained/./pretrained/torch_enet.pkl'
This is after the script downloads the model-best.net file.
I am attempting to run the network using cuda10 and tensorflow 1.13.1 since i need these for a RGB-D camera I want to use together with the network.
I understand, any help is much appreciated :D
I will brief you on my progress.
from enet-keras.
with open(os.path.join(DIR_PATH, os.pardir, os.pardir, 'pretrained', './pretrained/torch_enet.pkl'), 'wb') as fout:
Oh that looks like a bug indeed, heh
I'm not on my machine currently but try changing that line to
with open(os.path.join(DIR_PATH, os.pardir, os.pardir, 'pretrained', 'torch_enet.pkl'), 'wb') as fout:
If that works, I'll push a patch later 😄 👍
from enet-keras.
I changed it to:
with open(os.path.join(DIR_PATH, os.pardir, os.pardir, 'pretrained', 'model-best.net'), 'wb') as fout:
after which I am able to run the setup.sh script without errors.
However when I try to run test.sh:
Traceback (most recent call last): File "src/test.py", line 123, in <module> metadata = json.load(open(eval_config_json)) FileNotFoundError: [Errno 2] No such file or directory: 'config/evaluation.json'
I noticed there is a different file in the config path: evaluation.json.default
when I replace the path with this file I receive:
Traceback (most recent call last): File "src/test.py", line 135, in <module> model = load_model(h5file, model_name) File "src/test.py", line 68, in load_model model = models.select_model(model_name) File "/home/harald/Documents/enet-keras/src/models/__init__.py", line 13, in select_model raise ValueError('Unknown model {}'.format(model_name)) ValueError: Unknown model enet
I understand and respect if you dont have time to fiddle with this since the repo is abandoned. Just let me know :)
from enet-keras.
Yeah, it complains because there is no enet option here
Just change the model name in evaluation.json
to one of the valid options and you should be fine.
Do you think you could prepare a PR or two for these bugfixes?
from enet-keras.
I changed it to the enet_unpooling model but after this I received the following:
OSError: Unable to open file (unable to open file: name = 'models/mscoco/enet_unpooling/weights/enet_best.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)
Do I also need the weights?
Sure, as soon as I get it running I will post a pull request.
from enet-keras.
Can you post the full stack trace?
This is what happens when you don't test your code, kids. 😅
But yeah you need to have trained a model on mscoco before you can test it.
FYI, I decided to simplify the first steps a bit: #29
from enet-keras.
Related Issues (20)
- [Feature request] Multi-scale inputs (arbitrary shape)
- Bad results - Investigate reason HOT 22
- Add support for more datasets HOT 1
- How to save checkpoint during training? HOT 3
- Speed up inference HOT 3
- pretrained file and enet_unpooling_best.h5 missing? HOT 3
- Output shows no segmentation on a test image HOT 5
- UpSampling vs MaxUnpooling HOT 2
- COCO labels HOT 3
- about the label format HOT 2
- questioins about the bottleneck definition
- src/models/from_torch.py needs to be updated HOT 1
- SUNRGBD2Dseg = hdf5storage.loadmat(filename) HOT 1
- Fix dependencies HOT 3
- Replace conda with poetry HOT 1
- End-to-end training HOT 3
- Fix data loading from disk
- datasets.py standardization HOT 1
- Can't train on MSCOCOReduced
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from enet-keras.