azavea / raster-vision-examples

Examples of using Raster Vision on open datasets
Other
173 stars 33 forks source link

Question regarding the pretrained models... #54

Closed buroa closed 5 years ago

buroa commented 5 years ago

These models look like Tensorflow exported object detection models (with scores, classes ... etc tensors)

If I run rastervision predict https://s3.amazonaws.com/azavea-research-public-data/raster-vision/examples/model-zoo/xview-vehicle-od/predict_package.zip https://s3.amazonaws.com/azavea-research-public-data/raster-vision/examples/model-zoo/xview-vehicle-od/1677.tif s3://mybucket/1047-raster.tiff

The output is a Geojson file containing all of the detected objects. It's quite accurate.

If I take the same model and use it in Tensorflow natively, it detects nothing on that picture.

Why?

lewfish commented 5 years ago

My hunch is that the image is being normalized differently when being fed in by RV vs. using TF directly. The image has byte values between 0-255 when RV feeds it into the model. Maybe you're converting to floats between 0 and 1? Some of the models in RV do a normalization step where statistics are used to transform non-byte values to byte values, but that isn't the case for the xView model.