mitmul / ssai-cnn

Semantic Segmentation for Aerial / Satellite Images with Convolutional Neural Networks including an unofficial implementation of Volodymyr Mnih's methods
http://www.ingentaconnect.com/content/ist/jist/2016/00000060/00000001/art00003
MIT License
260 stars 75 forks source link

missing files #1

Open rashaalshehhi opened 8 years ago

rashaalshehhi commented 8 years ago

batch_transform is missing in utils file?

robinkraft commented 8 years ago

You need to build the utils to get access to that function. C++ code lives here:

https://github.com/mitmul/ssai-cnn/blob/master/utils/src/transform.cpp#L100

rashaalshehhi commented 8 years ago

Thank you for your reply. I did and it works with me.

Sent from my iPhone

On Jul 21, 2016, at 1:29 AM, Robin Kraft notifications@github.com<mailto:notifications@github.com> wrote:

You need to build the utilshttps://github.com/mitmul/ssai-cnn#build-utils to get access to that function. C++ code lives here:

https://github.com/mitmul/ssai-cnn/blob/master/utils/src/transform.cpp#L100

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/mitmul/ssai-cnn/issues/1#issuecomment-234089099, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AIE9theuU0mxXA33WLiGDLHI3B93pux7ks5qXpMvgaJpZM4JOvP1.

rashaalshehhi commented 8 years ago

Two more questions?

  1. If I want to enable GPU, what I should do? Should I enable one or more GPU(s) as following: python train.py --gpu 1 or python train.py --gpu 2 ??
  2. I would like to try with 5 classes. As long as I know, imread doesn't work with image of 5 channels, so, how to run your method with five classes? Do you advise me to use CIS? each class in each image (5 images).

Rgs, Rasha


From: Robin Kraft notifications@github.com Sent: Thursday, July 21, 2016 1:29 AM To: mitmul/ssai-cnn Cc: Rasha Alshehhi; Author Subject: Re: [mitmul/ssai-cnn] missing files (#1)

You need to build the utilshttps://github.com/mitmul/ssai-cnn#build-utils to get access to that function. C++ code lives here:

https://github.com/mitmul/ssai-cnn/blob/master/utils/src/transform.cpp#L100

You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/mitmul/ssai-cnn/issues/1#issuecomment-234089099, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AIE9theuU0mxXA33WLiGDLHI3B93pux7ks5qXpMvgaJpZM4JOvP1.

zahidmadeel commented 7 years ago

Hi guys, I want to use this repo and your pre-trained models to check and see if it works well for segmentation of my data set. If not, I would do training on my dataset. So far, I cannot make out how to use pretrained models to obtain segmented images from my dataset. Is there a tutorial or something that can help me get going? Regards Adeel

SarahwXU commented 7 years ago

Also couldn't use the pre-trained model to predict. In the "Prediction" part, I can't find where "results/MnihCNN_multi_2016-02-03_03-34-58/MnihCNN_multi.py" is. Thank you

mitmul commented 7 years ago

Thank you for reporting it, you guys. I'll investigate it later. Sorry for inconvenience.

mitmul commented 6 years ago

@SarahwXU Could you explain the problem more in detail?

polars05 commented 5 years ago

@mitmul, I'm having the same issue as @SarahwXU; for the model (MnihCNN_multi.py), using the pre-trained weights (MnihCNN_multi_2016-01-20_06-22-02/epoch-400.model), the output is merely a 1433x1433x3 array of zeroes.

I've put a single image file (22828930_15.tiff) into test_sat_dir, and the other arguments in predict.py are as follows:

Are you able to advise why the model is not giving any meaningful results? Thanks!

mitmul commented 5 years ago

All the values in the model output are exactly zeros? Could you give me some statistics of the output values?

polars05 commented 5 years ago

@mitmul, yup, all the values in the output are exactly zeroes (displayed as 0.); tried to multiply by 255 as well but to no avail. In addition, ran max() on the output and it confirms that all the values in the output are zeroes.

Is it that another set of weights should be used? You seem to have provided other weight files (e.g. MnihCNN_multi_2016-01-20_06-22-02_1.372101/epoch-400.model) besides MnihCNN_multi_2016-01-20_06-22-02/epoch-400.model; do they mean something?

mitmul commented 5 years ago

OK, I actually almost forgot what my scripts are doing cause like so long time has passed after I ran my scripts last time. Well, could you provide the command you ran? I'd like to reproduce the problem first. Thanks.

polars05 commented 5 years ago

@mitmul, no worries, haha; the command I used for prediction was as per what you stated in readme.md:

python scripts/predict.py \ --model models/MnihCNN_multi.py \ --param epoch-400.model \ --test_sat_dir data/ \ --channels 3 \ --offset 8 \ --gpu -1 &

For the model argument, I used "models/MnihCNN_multi.py" instead of "results/MnihCNN_multi_2016-02-03_03-34-58/MnihCNN_multi.py" as I couldn't find the "results" folder you were referring to.

Similarly, for the param argument, I used "epoch-400.model" (downloaded from MnihCNN_multi_2016-01-20_06-22-0) as I couldn't find the "results/MnihCNN_multi_2016-02-03_03-34-58" folder you stated in readme.md.

I also set the gpu argument to -1 as I currently don't have a GPU.

polars05 commented 5 years ago

Have found the issue; the canvas which is worked on by tile_patches() is not being output into get_predict() and hence, the canvas created in get_predict() remains blank - have modified the way the multiprocessing is done to output the canvas; pls see the fork here: (https://github.com/polars05/ssai-cnn/commit/faaa66fc9f5730dddcb1f7613b837143fa250de0)