Ugness / PiCANet-Implementation

Pytorch Implementation of PiCANet: Learning Pixel-wise Contextual Attention for Saliency Detection
MIT License
180 stars 40 forks source link

dataset problem #26

Open 18718277909 opened 4 years ago

18718277909 commented 4 years ago

Please follow the steps in the Execution Guideline in README.md. https://github.com/Ugness/PiCANet-Implementation#execution-guide You can put the files anywhere, but you should give the directory as command-line options.

If you meet any problem while following the guidelines, please comment again with an explanation about your problem.

Thank you.

Originally posted by @Ugness in https://github.com/Ugness/PiCANet-Implementation/issues/25#issuecomment-667837487

18718277909 commented 4 years ago

I follow the steps in the Execution Guideline in README.md. And I have created two files named mask and image to put the dataset in it. But why it give me the error: train.py: error: the following arguments are required: --dataset. Can you give me more guidelines?

Thank you.

18718277909 commented 4 years ago

I follow the steps in the Execution Guideline in README.md. And I have created two files named mask and image to put the dataset in it. But why it give me the error: train.py: error: the following arguments are required: --dataset. Can you give me more guidelines?

Thank you.

18718277909 commented 4 years ago

I follow the steps in the Execution Guideline in README.md. And I have created two files named mask and image to put the dataset in it. But why it give me the error: train.py: error: the following arguments are required: --dataset. Can you give me more guidelines?

Thank you.

18718277909 commented 4 years ago

I follow the steps in the Execution Guideline in README.md. And I have created two files named mask and image to put the dataset in it. But why it give me the error: train.py: error: the following arguments are required: --dataset. Can you give me more guidelines?

Thanks.

18718277909 commented 4 years ago

I follow the steps in the Execution Guideline in README.md. And I have created two files named mask and image to put the dataset in it. But why it give me the error: train.py: error: the following arguments are required: --dataset. Can you give me more guidelines?

Thanks.

18718277909 commented 4 years ago

I follow the steps in the Execution Guideline in README.md. And I have created two files named mask and image to put the dataset in it. But why it give me the error: train.py: error: the following arguments are required: --dataset. Can you give me more guidelines?

Thanks.

18718277909 commented 4 years ago

I follow the steps in the Execution Guideline in README.md. And I have created two files named mask and image to put the dataset in it. But why it give me the error: train.py: error: the following arguments are required: --dataset. Can you give me more guidelines?

Thanks.

18718277909 commented 4 years ago

I follow the steps in the Execution Guideline in README.md. And I have created two files named mask and image to put the dataset in it. But why it give me the error: train.py: error: the following arguments are required: --dataset. Can you give me more guidelines?

Thanks.

18718277909 commented 4 years ago

I follow the steps in the Execution Guideline in README.md. And I have created two files named mask and image to put the dataset in it. But why it give me the error: train.py: error: the following arguments are required: --dataset. Can you give me more guidelines?

Thanks.

18718277909 commented 4 years ago

I am so sorry about I accidentally created too many comments.

18718277909 commented 4 years ago

I am so sorry about I accidentally created too many comments.

Ugness commented 4 years ago

Can you share your command line to execute the code?? for example, python train.py Make sure that you should give the path of your dataset. Here is an example. If your data is in data/DUTS with data/DUTS/masks, data/DUTS/images,

python train.py --dataset data/DUTS --batch_size 2 --epoch 100 --lr 0.001 {other optional arguments}

Please do not contain '/' at the end of your path.

In addition, you can give any arguments with python train.py --[argument-key-word] [argument-value]

    usage: train.py [-h] [--load LOAD] --dataset DATASET [--cuda CUDA]
                    [--batch_size BATCH_SIZE] [--epoch EPOCH] [-lr LEARNING_RATE]
                    [--lr_decay LR_DECAY] [--decay_step DECAY_STEP]
                    [--display_freq DISPLAY_FREQ]
    optional arguments:
      -h, --help            show this help message and exit
      --load LOAD           Directory of pre-trained model, you can download at
                            https://drive.google.com/file/d/109a0hLftRZ5at5hwpteRfO1A6xLzf8Na/view?usp=sharing
                            None --> Do not use pre-trained model. Training will start from random initialized model
      --dataset DATASET     Directory of your Dataset
      --cuda CUDA           'cuda' for cuda, 'cpu' for cpu, default = cuda
      --batch_size BATCH_SIZE
                            batchsize, default = 1
      --epoch EPOCH         # of epochs. default = 20
      -lr LEARNING_RATE, --learning_rate LEARNING_RATE
                            learning_rate. default = 0.001
      --lr_decay LR_DECAY   Learning rate decrease by lr_decay time per decay_step, default = 0.1
      --decay_step DECAY_STEP
                            Learning rate decrease by lr_decay time per decay_step,  default = 7000
      --display_freq DISPLAY_FREQ
                            display_freq to display result image on Tensorboard

Feel free to ask questions, but please comment in this thread if you have similar issues to make other people find the issue easily. In addition, I recommend you to read about some "python argparse examples". If you are not familiar with the python argparse module.