mirror of
https://github.com/yunjey/pytorch-tutorial.git
synced 2025-07-13 23:42:21 +08:00
readme added
This commit is contained in:
@ -4,6 +4,9 @@
|
|||||||
#### 1. Clone the repositories
|
#### 1. Clone the repositories
|
||||||
```bash
|
```bash
|
||||||
$ git clone https://github.com/pdollar/coco.git
|
$ git clone https://github.com/pdollar/coco.git
|
||||||
|
$ cd coco/PythonAPI/
|
||||||
|
$ make
|
||||||
|
$ cd ../../
|
||||||
$ git clone https://github.com/yunjey/pytorch-tutorial.git
|
$ git clone https://github.com/yunjey/pytorch-tutorial.git
|
||||||
$ cd pytorch-tutorial/tutorials/09 - Image Captioning
|
$ cd pytorch-tutorial/tutorials/09 - Image Captioning
|
||||||
```
|
```
|
||||||
@ -19,7 +22,8 @@ $ ./donwload.sh
|
|||||||
#### 3. Preprocessing
|
#### 3. Preprocessing
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ python vocab.py
|
$ python build_vocab.py
|
||||||
|
$ python resize.py
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 4. Train the model
|
#### 4. Train the model
|
||||||
@ -32,11 +36,11 @@ $ python train.py
|
|||||||
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ python sample.py --image=sample_image.jpg
|
$ python sample.py --image='path_for_image'
|
||||||
```
|
```
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
## Pretrained model
|
## Pretrained model
|
||||||
|
|
||||||
If you do not want to train the model yourself, you can use a pretrained model. I have provided the pretrained model as a zip file. You can download the file [here](https://www.dropbox.com/s/cngzozkk73imjdh/trained_model.zip?dl=0) and extract it to `model` directory.
|
If you do not want to train the model yourself, you can use a pretrained model. I have provided the pretrained model as a zip file. You can download the file [here](https://www.dropbox.com/s/btubjo73dc953zo/trained_model.egg?dl=0) and extract it to `./models/` directory.
|
||||||
|
Reference in New Issue
Block a user