Comments (4)
I suggest a small test script that loads an image, call the function with obvious parameters like half the height and an eighth the width, write out the result, and post both the original and processed images here... and maybe include the test script too in a pull request haha since it will be needed later if this is to move into keras-contrib
from keras-fcn.
Here's the test script
from keras.preprocessing.image import img_to_array, array_to_img
from utils import SegDataGenerator
from PIL import Image as PILImage
def test_crop(crop_function):
filename = 'data/1.jpg'
img = PILImage.open(filename)
crop_width = img.width / 5
crop_height = img.height / 8
print(crop_height, crop_width)
img = img_to_array(img)
result = crop_function(img, (crop_width, crop_height), 'channels_last')
result = array_to_img(result)
assert result.width == crop_width
assert result.height == crop_height
test_crop(SegDataGenerator.center_crop)
test_crop(SegDataGenerator.random_crop)
and I've created a jupyter notebook to showcase. You can find it here
Do you think this is enough, so that I can add the test and the correct code in a pull request? Mentioning @aurora95 as well.
from keras-fcn.
Yeah I see what you're saying, my usage so far was square so I didn't come across that. Maybe put that code in a /test/
folder in the pull request with the fix and I'm sure it will be good to merge. :-)
from keras-fcn.
I have submitted a PR. Not so sure about the validity of the test though. Closing the issue for the time being.
from keras-fcn.
Related Issues (20)
- AttributeError: 'SegDirectoryIterator' object has no attribute 'next' HOT 14
- error when run "python data_pascal_voc.py pascal_voc_setup" HOT 2
- sparse_categorical_crossentropy vs binary_crossentropy_with_logits
- in resize_images_bilinear(X, height_factor, width_factor, target_height, target_width, data_format) TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' HOT 4
- models.py HOT 2
- AttributeError: 'SegDirectoryIterator' object has no attribute 'next' HOT 4
- Comparison of models
- Dataset & start HOT 1
- Strange results from inference.py HOT 1
- reorganized for easier use
- checkpoint_weights.hdf5 ??? HOT 17
- could not read remote repository HOT 1
- I want to use my windows10 Ipython to run my datasets, but it shows an error : UnboundLocalError: local variable 'lr' referenced before assignment HOT 4
- Hello, I also have this problem, I want to train my data set, but the picture of my data set is jpg, the label is png, can I use this data set for training, if I can, I need the program What changes have been made, thank you HOT 1
- Unable to run 'train.py', the program ends directly
- Regarding the upsampling layer HOT 2
- ModuleNotFoundError: No module named 'tf_image_segmentation' HOT 3
- NameError: name 'transform_matrix_offset_center' is not defined HOT 2
- weights
- Inference gives black output
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keras-fcn.