Object Detection with Deep Learning on Aerial Imagery

I am trying to work on the code given at “https://medium.com/data-from-the-trenches/object-detection-with-deep-learning-on-aerial-imagery-2465078db8a9

It gave me error as

class DfGenerator(CSVGenerator):

NameError: name ‘CSVGenerator’ is not defined

So, I imported Keras-retinanet from github. (https://github.com/fizyr/keras-retinanet/blob/master/keras_retinanet/preprocessing/csv_generator.py)

But i am find error as

from .generator import Generator

ModuleNotFoundError: No module named ‘__main__.generator’; ‘__main__’ is not a package

I even imported Generator.py from the same-github

The error Is----from …utils.anchors import (anchor_targets_bbox,anchors_for_shape, guess_shapes)

ValueError: attempted relative import beyond top-level package

Should i import all this files (libraries) in the keras folder under site-packages?

I am working on windows 7 64-bit using anaconda3.

Please let me know where i am doing wrong.


1 Like

You can either import all the files, or perform the install as described in the readme. As you’ve already found, you can’t pull files “piece by piece”: by the time you chase down and import every dependency, it’d be faster to import / install everything.

1 Like