This commit is contained in:
Glenn Jocher 2019-12-13 18:52:08 -08:00
parent a4bdb8ce2e
commit 0465500b37
24 changed files with 148 additions and 122431 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +0,0 @@
classes=80
train=../coco/trainvalno5k.txt
valid=../coco/5k.txt
names=data/coco.names
backup=backup/
eval=coco

1
data/coco1.txt Normal file
View File

@ -0,0 +1 @@
../coco/images/train2017/000000109622.jpg

4
data/coco16.data Normal file
View File

@ -0,0 +1,4 @@
classes=80
train=data/coco16.txt
valid=data/coco16.txt
names=data/coco.names

16
data/coco16.txt Normal file
View File

@ -0,0 +1,16 @@
../coco/images/train2017/000000109622.jpg
../coco/images/train2017/000000160694.jpg
../coco/images/train2017/000000308590.jpg
../coco/images/train2017/000000327573.jpg
../coco/images/train2017/000000062929.jpg
../coco/images/train2017/000000512793.jpg
../coco/images/train2017/000000371735.jpg
../coco/images/train2017/000000148118.jpg
../coco/images/train2017/000000309856.jpg
../coco/images/train2017/000000141882.jpg
../coco/images/train2017/000000318783.jpg
../coco/images/train2017/000000337760.jpg
../coco/images/train2017/000000298197.jpg
../coco/images/train2017/000000042421.jpg
../coco/images/train2017/000000328898.jpg
../coco/images/train2017/000000458856.jpg

4
data/coco1cls.data Normal file
View File

@ -0,0 +1,4 @@
classes=1
train=data/coco1cls.txt
valid=data/coco1cls.txt
names=data/coco.names

16
data/coco1cls.txt Normal file
View File

@ -0,0 +1,16 @@
../coco/images/train2017/000000000901.jpg
../coco/images/train2017/000000001464.jpg
../coco/images/train2017/000000003220.jpg
../coco/images/train2017/000000003365.jpg
../coco/images/train2017/000000004772.jpg
../coco/images/train2017/000000009987.jpg
../coco/images/train2017/000000010498.jpg
../coco/images/train2017/000000012455.jpg
../coco/images/train2017/000000013992.jpg
../coco/images/train2017/000000014125.jpg
../coco/images/train2017/000000016314.jpg
../coco/images/train2017/000000016670.jpg
../coco/images/train2017/000000018412.jpg
../coco/images/train2017/000000021212.jpg
../coco/images/train2017/000000021826.jpg
../coco/images/train2017/000000030566.jpg

4
data/coco2017.data Normal file
View File

@ -0,0 +1,4 @@
classes=80
train=../coco/train2017.txt
valid=../coco/val2017.txt
names=data/coco.names

4
data/coco64.data Normal file
View File

@ -0,0 +1,4 @@
classes=80
train=data/coco64.txt
valid=data/coco64.txt
names=data/coco.names

64
data/coco64.txt Normal file
View File

@ -0,0 +1,64 @@
../coco/images/train2017/000000109622.jpg
../coco/images/train2017/000000160694.jpg
../coco/images/train2017/000000308590.jpg
../coco/images/train2017/000000327573.jpg
../coco/images/train2017/000000062929.jpg
../coco/images/train2017/000000512793.jpg
../coco/images/train2017/000000371735.jpg
../coco/images/train2017/000000148118.jpg
../coco/images/train2017/000000309856.jpg
../coco/images/train2017/000000141882.jpg
../coco/images/train2017/000000318783.jpg
../coco/images/train2017/000000337760.jpg
../coco/images/train2017/000000298197.jpg
../coco/images/train2017/000000042421.jpg
../coco/images/train2017/000000328898.jpg
../coco/images/train2017/000000458856.jpg
../coco/images/train2017/000000073824.jpg
../coco/images/train2017/000000252846.jpg
../coco/images/train2017/000000459590.jpg
../coco/images/train2017/000000273650.jpg
../coco/images/train2017/000000331311.jpg
../coco/images/train2017/000000156326.jpg
../coco/images/train2017/000000262985.jpg
../coco/images/train2017/000000253580.jpg
../coco/images/train2017/000000447976.jpg
../coco/images/train2017/000000378077.jpg
../coco/images/train2017/000000259913.jpg
../coco/images/train2017/000000424553.jpg
../coco/images/train2017/000000000612.jpg
../coco/images/train2017/000000267625.jpg
../coco/images/train2017/000000566012.jpg
../coco/images/train2017/000000196664.jpg
../coco/images/train2017/000000363331.jpg
../coco/images/train2017/000000057992.jpg
../coco/images/train2017/000000520047.jpg
../coco/images/train2017/000000453903.jpg
../coco/images/train2017/000000162083.jpg
../coco/images/train2017/000000268516.jpg
../coco/images/train2017/000000277436.jpg
../coco/images/train2017/000000189744.jpg
../coco/images/train2017/000000041128.jpg
../coco/images/train2017/000000527728.jpg
../coco/images/train2017/000000465269.jpg
../coco/images/train2017/000000246833.jpg
../coco/images/train2017/000000076784.jpg
../coco/images/train2017/000000323715.jpg
../coco/images/train2017/000000560463.jpg
../coco/images/train2017/000000006263.jpg
../coco/images/train2017/000000094701.jpg
../coco/images/train2017/000000521359.jpg
../coco/images/train2017/000000302903.jpg
../coco/images/train2017/000000047559.jpg
../coco/images/train2017/000000480583.jpg
../coco/images/train2017/000000050025.jpg
../coco/images/train2017/000000084512.jpg
../coco/images/train2017/000000508913.jpg
../coco/images/train2017/000000093708.jpg
../coco/images/train2017/000000070493.jpg
../coco/images/train2017/000000539270.jpg
../coco/images/train2017/000000474402.jpg
../coco/images/train2017/000000209842.jpg
../coco/images/train2017/000000028820.jpg
../coco/images/train2017/000000154257.jpg
../coco/images/train2017/000000342499.jpg

View File

@ -1,6 +0,0 @@
classes=80
train=./data/coco_16img.txt
valid=./data/coco_16img.txt
names=data/coco.names
backup=backup/
eval=coco

View File

@ -1,16 +0,0 @@
../coco/images/COCO_train2014_000000000009.jpg
../coco/images/COCO_train2014_000000000025.jpg
../coco/images/COCO_train2014_000000000030.jpg
../coco/images/COCO_train2014_000000000034.jpg
../coco/images/COCO_train2014_000000000036.jpg
../coco/images/COCO_train2014_000000000049.jpg
../coco/images/COCO_train2014_000000000061.jpg
../coco/images/COCO_train2014_000000000064.jpg
../coco/images/COCO_train2014_000000000071.jpg
../coco/images/COCO_train2014_000000000072.jpg
../coco/images/COCO_train2014_000000000077.jpg
../coco/images/COCO_train2014_000000000078.jpg
../coco/images/COCO_train2014_000000000081.jpg
../coco/images/COCO_train2014_000000000086.jpg
../coco/images/COCO_train2014_000000000089.jpg
../coco/images/COCO_train2014_000000000092.jpg

View File

@ -1,6 +0,0 @@
classes=1
train=./data/coco_1cls.txt
valid=./data/coco_1cls.txt
names=data/coco.names
backup=backup/
eval=coco

View File

@ -1,5 +0,0 @@
../coco/images/COCO_val2014_000000013992.jpg
../coco/images/COCO_val2014_000000047226.jpg
../coco/images/COCO_val2014_000000050324.jpg
../coco/images/COCO_val2014_000000121497.jpg
../coco/images/COCO_val2014_000000001464.jpg

View File

@ -1 +0,0 @@
../coco/images/COCO_val2014_000000581886.jpg

View File

@ -1,6 +0,0 @@
classes=80
train=./data/coco_64img.txt
valid=./data/coco_64img.txt
names=data/coco.names
backup=backup/
eval=coco

View File

@ -1,64 +0,0 @@
../coco/images/COCO_train2014_000000000009.jpg
../coco/images/COCO_train2014_000000000025.jpg
../coco/images/COCO_train2014_000000000030.jpg
../coco/images/COCO_train2014_000000000034.jpg
../coco/images/COCO_train2014_000000000036.jpg
../coco/images/COCO_train2014_000000000049.jpg
../coco/images/COCO_train2014_000000000061.jpg
../coco/images/COCO_train2014_000000000064.jpg
../coco/images/COCO_train2014_000000000071.jpg
../coco/images/COCO_train2014_000000000072.jpg
../coco/images/COCO_train2014_000000000077.jpg
../coco/images/COCO_train2014_000000000078.jpg
../coco/images/COCO_train2014_000000000081.jpg
../coco/images/COCO_train2014_000000000086.jpg
../coco/images/COCO_train2014_000000000089.jpg
../coco/images/COCO_train2014_000000000092.jpg
../coco/images/COCO_train2014_000000000094.jpg
../coco/images/COCO_train2014_000000000109.jpg
../coco/images/COCO_train2014_000000000110.jpg
../coco/images/COCO_train2014_000000000113.jpg
../coco/images/COCO_train2014_000000000127.jpg
../coco/images/COCO_train2014_000000000138.jpg
../coco/images/COCO_train2014_000000000142.jpg
../coco/images/COCO_train2014_000000000144.jpg
../coco/images/COCO_train2014_000000000149.jpg
../coco/images/COCO_train2014_000000000151.jpg
../coco/images/COCO_train2014_000000000154.jpg
../coco/images/COCO_train2014_000000000165.jpg
../coco/images/COCO_train2014_000000000194.jpg
../coco/images/COCO_train2014_000000000201.jpg
../coco/images/COCO_train2014_000000000247.jpg
../coco/images/COCO_train2014_000000000260.jpg
../coco/images/COCO_train2014_000000000263.jpg
../coco/images/COCO_train2014_000000000307.jpg
../coco/images/COCO_train2014_000000000308.jpg
../coco/images/COCO_train2014_000000000309.jpg
../coco/images/COCO_train2014_000000000312.jpg
../coco/images/COCO_train2014_000000000315.jpg
../coco/images/COCO_train2014_000000000321.jpg
../coco/images/COCO_train2014_000000000322.jpg
../coco/images/COCO_train2014_000000000326.jpg
../coco/images/COCO_train2014_000000000332.jpg
../coco/images/COCO_train2014_000000000349.jpg
../coco/images/COCO_train2014_000000000368.jpg
../coco/images/COCO_train2014_000000000370.jpg
../coco/images/COCO_train2014_000000000382.jpg
../coco/images/COCO_train2014_000000000384.jpg
../coco/images/COCO_train2014_000000000389.jpg
../coco/images/COCO_train2014_000000000394.jpg
../coco/images/COCO_train2014_000000000404.jpg
../coco/images/COCO_train2014_000000000419.jpg
../coco/images/COCO_train2014_000000000431.jpg
../coco/images/COCO_train2014_000000000436.jpg
../coco/images/COCO_train2014_000000000438.jpg
../coco/images/COCO_train2014_000000000443.jpg
../coco/images/COCO_train2014_000000000446.jpg
../coco/images/COCO_train2014_000000000450.jpg
../coco/images/COCO_train2014_000000000471.jpg
../coco/images/COCO_train2014_000000000490.jpg
../coco/images/COCO_train2014_000000000491.jpg
../coco/images/COCO_train2014_000000000510.jpg
../coco/images/COCO_train2014_000000000514.jpg
../coco/images/COCO_train2014_000000000529.jpg
../coco/images/COCO_train2014_000000000531.jpg

33
data/get_coco2014.sh Executable file
View File

@ -0,0 +1,33 @@
#!/bin/bash
# Zip coco folder
# zip -r coco.zip coco
# tar -czvf coco.tar.gz coco
# Download labels from Google Drive, accepting presented query
filename="coco2014labels.zip"
fileid="1s6-CmF5_SElM28r52P1OUrCcuXZN-SFo"
curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}" > /dev/null
curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=${fileid}" -o ${filename}
rm ./cookie
# Unzip labels
unzip -q ${filename} # for coco.zip
# tar -xzf ${filename} # for coco.tar.gz
rm ${filename}
# Download images
cd coco/images
wget -c http://images.cocodataset.org/zips/train2014.zip
wget -c http://images.cocodataset.org/zips/val2014.zip
# Unzip images
unzip -q train2014.zip
unzip -q val2014.zip
# (optional) Delete zip files
rm -rf *.zip
# cd out
cd ../..

View File

@ -1,39 +0,0 @@
#!/bin/bash
# CREDIT: https://github.com/pjreddie/darknet/tree/master/scripts/get_coco_dataset.sh
# Clone COCO API
git clone https://github.com/pdollar/coco && cd coco
# Download Images
mkdir images && cd images
wget -c https://pjreddie.com/media/files/train2014.zip
wget -c https://pjreddie.com/media/files/val2014.zip
# Unzip
unzip -q train2014.zip
unzip -q val2014.zip
# (optional) Delete zip files
rm -rf *.zip
cd ..
# Download COCO Metadata
wget -c https://pjreddie.com/media/files/instances_train-val2014.zip
wget -c https://pjreddie.com/media/files/coco/5k.part
wget -c https://pjreddie.com/media/files/coco/trainvalno5k.part
wget -c https://pjreddie.com/media/files/coco/labels.tgz
tar xzf labels.tgz
unzip -q instances_train-val2014.zip
# Set Up Image Lists
paste <(awk "{print \"$PWD\"}" <5k.part) 5k.part | tr -d '\t' > 5k.txt
paste <(awk "{print \"$PWD\"}" <trainvalno5k.part) trainvalno5k.part | tr -d '\t' > trainvalno5k.txt
# get xview training data
# wget -O train_images.tgz 'https://d307kc0mrhucc3.cloudfront.net/train_images.tgz?Expires=1530124049&Signature=JrQoxipmsETvb7eQHCfDFUO-QEHJGAayUv0i-ParmS-1hn7hl9D~bzGuHWG82imEbZSLUARTtm0wOJ7EmYMGmG5PtLKz9H5qi6DjoSUuFc13NQ-~6yUhE~NfPaTnehUdUMCa3On2wl1h1ZtRG~0Jq1P-AJbpe~oQxbyBrs1KccaMa7FK4F4oMM6sMnNgoXx8-3O77kYw~uOpTMFmTaQdHln6EztW0Lx17i57kK3ogbSUpXgaUTqjHCRA1dWIl7PY1ngQnLslkLhZqmKcaL-BvWf0ZGjHxCDQBpnUjIlvMu5NasegkwD9Jjc0ClgTxsttSkmbapVqaVC8peR0pO619Q__&Key-Pair-Id=APKAIKGDJB5C3XUL2DXQ'
# tar -xvzf train_images.tgz
# sudo rm -rf train_images/._*
# lastly convert each .tif to a .bmp for faster loading in cv2
# ./coco/images/train2014/COCO_train2014_000000167126.jpg # corrupted image

View File

@ -1,17 +0,0 @@
#!/bin/bash
# Zip coco folder
# zip -r coco.zip coco
# tar -czvf coco.tar.gz coco
# Set fileid and filename
filename="coco.zip"
fileid="1WQT6SOktSe8Uw6r10-2JhbEhMY5DJaph" # coco.zip
# Download from Google Drive, accepting presented query
curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}" > /dev/null
curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=${fileid}" -o ${filename}
rm ./cookie
# Unzip
unzip -q ${filename} # for coco.zip
# tar -xzf ${filename} # for coco.tar.gz

File diff suppressed because it is too large Load Diff

View File

@ -282,7 +282,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing
# Rectangular Training https://github.com/ultralytics/yolov3/issues/232
if self.rect:
# Read image shapes
sp = 'data' + os.sep + path.replace('.txt', '.shapes').split(os.sep)[-1] # shapefile path
sp = path.replace('.txt', '.shapes') # shapefile path
try:
with open(sp, 'r') as f: # read existing shapefile
s = [x.split() for x in f.read().splitlines()]

View File

@ -658,7 +658,7 @@ def coco_class_count(path='../coco/labels/train2014/'):
print(i, len(files))
def coco_only_people(path='../coco/labels/val2014/'):
def coco_only_people(path='../coco/labels/train2017/'): # from utils.utils import *; coco_only_people()
# Find images with only people
files = sorted(glob.glob('%s/*.*' % path))
for i, file in enumerate(files):