Git Product home page Git Product logo

Comments (7)

pierluigiferrari avatar pierluigiferrari commented on June 4, 2024

I'm having trouble reproducing this issue. Yes, pop() is a method of lists, not arrays, but batch_y is a list. In order to reproduce this I've changed the generator to always pop the last batch item and it works without issues. Are you using one of the Jupyter notebooks to train? Did you make any changes to the code, either in the notebook or elsewhere?

from ssd_keras.

nealzGu avatar nealzGu commented on June 4, 2024

Hi, strange ...
Here's what I changed in the code:

in [3]: weights_path = '/home/ubuntu/ssd_keras/pretrained_weights/vgg-16_ssd-fcn_ILSVRC-CLS-LOC.h5'

in [5]: # changed the beginning of the paths to /home/ubuntu/ssd_keras/... 

That's it...

in ssd_batch_generator.py, Ln 676, the scripts is turning batch_y into an array.

Could I maybe comment-out this whole for-loop which is causing the error and deactivate random cropping?

Thanks!

from ssd_keras.

nealzGu avatar nealzGu commented on June 4, 2024

Just noticed that random cropping is "False" by default. Why is this happening after all?

from ssd_keras.

nealzGu avatar nealzGu commented on June 4, 2024

not sure if thats important, but Im also getting this warnings:

/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_util.py:509: DeprecationWarning: The binary mode of fromstring is deprecated, as it behaves surprisingly on unicode inputs. Use frombuffer instead
  return np.fromstring(tensor.tensor_content, dtype=dtype).reshape(shape)

from ssd_keras.

pierluigiferrari avatar pierluigiferrari commented on June 4, 2024

Well, for starters, this implementation requires Python 3 as stated in the dependencies. I see that you are using Python 2. It makes little sense to try to spot the problem as long as something as basic as the Python version is incorrect. I would also recommend to install things like TensorFlow, Keras, and other libraries within virtual environments (e.g. Anaconda environments) rather than directly so that you can maintain multiple different environment configurations.

As for your comments above:

in ssd_batch_generator.py, Ln 676, the scripts is turning batch_y into an array.

No, it only turns the i-th element of batch_y into an array:

batch_y[i] = np.array(batch_y[i])

batch_y is still a list.

Just noticed that random cropping is "False" by default. Why is this happening after all?

Because max_crop_and_resize and full_crop_and_resize ultimately use random_crop to perform the actual cropping.

I wouldn't know why this issue would be related to the Python version (after all, a list is a list regardless of the Python version), but since I cannot reproduce the issue in Python 3, I can only suggest that you use a Python 3 environment.

from ssd_keras.

nealzGu avatar nealzGu commented on June 4, 2024

ah damnit. didn't see that.

I commented it out and training is running now. will see if the results are still fine, but afterwards I will follow your advice with the virtualenv. Since no one else seems to have this error, this might be the issue. Thanks anyway, will close this now.

from ssd_keras.

pierluigiferrari avatar pierluigiferrari commented on June 4, 2024

Yeah, commenting it out is actually a good makeshift solution. The only effect will be that some batch items might have no ground truth boxes in them after the random cropping, but this should happen very rarely and even so it likely won't impact the training at all.

from ssd_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.