Skip to content

Commit 9378feb

Browse files
authored
Update README.md
1 parent d5b0038 commit 9378feb

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,27 @@ Example:
5959
```python
6060
import torchvision.datasets as dset
6161
import torchvision.transforms as transforms
62-
cap = dset.CocoCaptions(root = 'dir where images are', annFile = 'json annotation file', transform=transforms.ToTensor())
62+
cap = dset.CocoCaptions(root = 'dir where images are',
63+
annFile = 'json annotation file',
64+
transform=transforms.ToTensor())
6365

64-
print('Number of samples:', len(cap))
66+
print('Number of samples: ', len(cap))
6567
img, target = cap[3] # load 4th sample
6668

67-
print(img.size())
69+
print("Image Size: ", img.size())
6870
print(target)
6971
```
7072

7173
Output:
7274

7375
```
74-
('Number of samples:', 82783)
75-
(3L, 427L, 640L)
76-
[u'A plane emitting smoke stream flying over a mountain.', u'A plane darts across a bright blue sky behind a mountain covered in snow', u'A plane leaves a contrail above the snowy mountain top.', u'A mountain that has a plane flying overheard in the distance.', u'A mountain view with a plume of smoke in the background']
76+
Number of samples: 82783
77+
Image Size: (3L, 427L, 640L)
78+
[u'A plane emitting smoke stream flying over a mountain.',
79+
u'A plane darts across a bright blue sky behind a mountain covered in snow',
80+
u'A plane leaves a contrail above the snowy mountain top.',
81+
u'A mountain that has a plane flying overheard in the distance.',
82+
u'A mountain view with a plume of smoke in the background']
7783
```
7884

7985
#### Detection:

0 commit comments

Comments
 (0)