Giter Club home page Giter Club logo

Comments (11)

PavlosMelissinos avatar PavlosMelissinos commented on August 16, 2024

Please check my answer on #15

In short:

  1. Create a directory named pretrained, under the root of the enet-keras project
  2. Download the original pretrained weights from here
  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.

from enet-keras.

HTLife avatar HTLife commented on August 16, 2024

@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.

PavlosMelissinos avatar PavlosMelissinos commented on August 16, 2024

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.

Anguse avatar Anguse commented on August 16, 2024

Please check my answer on #15

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.

PavlosMelissinos avatar PavlosMelissinos commented on August 16, 2024

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.

Anguse avatar Anguse commented on August 16, 2024

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.

PavlosMelissinos avatar PavlosMelissinos commented on August 16, 2024

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.

Anguse avatar Anguse commented on August 16, 2024

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.

PavlosMelissinos avatar PavlosMelissinos commented on August 16, 2024

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.

Anguse avatar Anguse commented on August 16, 2024

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.

PavlosMelissinos avatar PavlosMelissinos commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.