Giter Site home page Giter Site logo

requirements.txt is broken about pixel-decoder HOT 4 OPEN

geoyi avatar geoyi commented on August 29, 2024
requirements.txt is broken

from pixel-decoder.

Comments (4)

paumillet avatar paumillet commented on August 29, 2024 1

Thank you @Geoyi, it solved my problem!

from pixel-decoder.

Geoyi avatar Geoyi commented on August 29, 2024

@chelm, pretty cool that you tried it out and filed the first issue ever on this repo. I fixed the dependencies on requirement.txt, do you want to give another try?

from pixel-decoder.

paumillet avatar paumillet commented on August 29, 2024

Hello,

Thanks for sharing your project!

I still got conflict versions with the update of requirements.txt
Here are the bugs I met:

  • Conflicting versions of decorator

    pkg_resources.ContextualVersionConflict: (decorator 4.1.2 (/usr/local/lib/python3.6/dist-packages), Requirement.parse('decorator>=4.3.0'), {'networkx'})
    

    fixed by upgrading decorator to 4.3.0 and changing the corresponding line in requirements.txt

  • Missing packages

    ModuleNotFoundError: No module named 'tensorflow'
    

    and

    ModuleNotFoundError: No module named 'cv2'
    

    so I installed tensorflow and opencv-python

  • I was using Keras 2.2.2 but

    from keras.applications.imagenet_utils import _obtain_input_shape
    ImportError: cannot import name '_obtain_input_shape'
    

    I turned keras.applications.imagenet_utils to keras_applications.imagenet_utils, it seems to do the trick.
    There are also conflicts with tensorflow 1.11.0:

    keras 2.2.2 has requirement keras-applications==1.0.4, but you'll have keras-applications 1.0.5 which is incompatible.
    keras 2.2.2 has requirement keras-preprocessing==1.0.2, but you'll have keras-preprocessing 1.0.3 which is incompatible.
    

    So I downgraded tensorflow to version 1.10.0

I was then able to start the training. But I got another error then... I'm not sure if it's from the changes I made or something else. It happens when it will start the 1st epoch training. Here is the complete error, tell me whether it worth opening a new issue:

Traceback (most recent call last):
  File "/home/pauline/Documents/POCteledetection/pixel-decoder/venv/bin/pixel_decoder", line 11, in <module>
    load_entry_point('pixel-decoder', 'console_scripts', 'pixel_decoder')()
  File "/home/pauline/Documents/POCteledetection/pixel-decoder/pixel_decoder/main.py", line 75, in cli
    main(args.pop('command'), **args)
  File "/home/pauline/Documents/POCteledetection/pixel-decoder/pixel_decoder/main.py", line 56, in main
    train(**kwargs)
  File "/home/pauline/Documents/POCteledetection/pixel-decoder/pixel_decoder/train.py", line 70, in train
    callbacks=[model_checkpoint])
  File "/home/pauline/Documents/POCteledetection/pixel-decoder/venv/lib/python3.6/site-packages/keras/legacy/interfaces.py", line 91, in wrapper
    return func(*args, **kwargs)
  File "/home/pauline/Documents/POCteledetection/pixel-decoder/venv/lib/python3.6/site-packages/keras/engine/training.py", line 1415, in fit_generator
    initial_epoch=initial_epoch)
  File "/home/pauline/Documents/POCteledetection/pixel-decoder/venv/lib/python3.6/site-packages/keras/engine/training_generator.py", line 213, in fit_generator
    class_weight=class_weight)
  File "/home/pauline/Documents/POCteledetection/pixel-decoder/venv/lib/python3.6/site-packages/keras/engine/training.py", line 1215, in train_on_batch
    outputs = self.train_function(ins)
  File "/home/pauline/Documents/POCteledetection/pixel-decoder/venv/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 2666, in __call__
    return self._call(inputs)
  File "/home/pauline/Documents/POCteledetection/pixel-decoder/venv/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 2636, in _call
    fetched = self._callable_fn(*array_vals)
  File "/home/pauline/Documents/POCteledetection/pixel-decoder/venv/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1382, in __call__
    run_metadata_ptr)
  File "/home/pauline/Documents/POCteledetection/pixel-decoder/venv/lib/python3.6/site-packages/tensorflow/python/framework/errors_impl.py", line 519, in __exit__
    c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.InvalidArgumentError: Incompatible shapes: [786432] vs. [262144]
         [[Node: metrics/dice_coef/mul = Mul[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"](metrics/dice_coef/Reshape, metrics/dice_coef/Reshape_1)]]

from pixel-decoder.

Geoyi avatar Geoyi commented on August 29, 2024

@paumillet, thanks for posting the issue.
Can you make a pull request to the requirement.txt on what you've installed for tensorflow and opencv-python?
The error you got was from the label data, and you may want to look into another issue, I posted a solution there. Hope that is helpful if you keep getting error, let me know.

from pixel-decoder.

Related Issues (3)

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.