Skip to content

Commit

Permalink
Update 06_classify_image.py
Browse files Browse the repository at this point in the history
correction of classify
  • Loading branch information
jensleitloff committed Mar 25, 2019
1 parent 39e2d10 commit e956484
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions py/06_classify_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,17 @@
in_rows_half = int(input_rows/2)
in_cols_half = int(input_cols/2)

# import correct preprocessing
if input_channels is 3:
from image_functions import preprocessing_image_rgb as preprocessing_image
else:
from image_functions import preprocessing_image_ms as preprocessing_image

# pad image
image = pad(image, ((input_rows, input_rows),
(input_cols, input_cols),
(0, 0)), 'symmetric')

# don't forget to preprocess
image = preprocessing_image(image)
num_rows, num_cols, _ = image.shape
Expand Down

14 comments on commit e956484

@liaduarte
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello.

I am having dificulties to understand this script of classifying images. Can you help with that please?
How can I contact the author?

@jensleitloff
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please be more precise? Which part do you not understand?

@liaduarte
Copy link

@liaduarte liaduarte commented on e956484 Mar 30, 2020 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jensleitloff
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect results using RGB data, mostly come from wrong data normalization. This issue already addressed several times before. Please look at #1 if you want to use RGB images. If you use MS data, please check correct band order as addressed in #3 .

@liaduarte
Copy link

@liaduarte liaduarte commented on e956484 Mar 31, 2020 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@liaduarte
Copy link

@liaduarte liaduarte commented on e956484 Apr 3, 2020 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jensleitloff
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a short period I put some data and models on my Google Drive: https://drive.google.com/open?id=1QgNqfRQ7aZraO83Jv3bVCWDC9lLmZV2r

In future, please put any questions to Issues and not as comment to an commit. These comments are not intended to be used as chat ;-)

@liaduarte
Copy link

@liaduarte liaduarte commented on e956484 Apr 3, 2020 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@liaduarte
Copy link

@liaduarte liaduarte commented on e956484 Apr 3, 2020 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jensleitloff
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I have no idea. The images are not that large. I never had problems loaded images of this size. Maybe your conda environment is broken and the geotiff driver is not working correctly. A broken gdal installation can happen quite easily.

@liaduarte
Copy link

@liaduarte liaduarte commented on e956484 Apr 3, 2020 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@liaduarte
Copy link

@liaduarte liaduarte commented on e956484 May 9, 2020 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jensleitloff
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put any questions to Issues and not as comment to an commit. These comments are not intended to be used as chat.

@liaduarte
Copy link

@liaduarte liaduarte commented on e956484 May 14, 2020 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.