Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
🎉 Add: Check Data
Browse files Browse the repository at this point in the history
  • Loading branch information
Zerohertz committed Mar 23, 2023
1 parent 3c53f60 commit 16255ba
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions checkData.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import os


def checkData(target):
os.chdir(init + '/FlickrLogos-v2')
try:
os.chdir('images/' + target)
except:
print('경로가 없어용 ~')

imgDir = os.getcwd()
img = os.listdir()

labDir = imgDir.replace('images', 'labels')
lab = os.listdir()

tmpi = []
for i in img:
tmpi.append(i[:-4])

tmpj = []
for i in lab:
tmpj.append(i[:-4])

for i in tmpi:
if not i in tmpj and not 'ipynb' in i:
print('NG: ', i)

for i in tmpj:
if not i in tmpi and not 'ipynb' in i:
print('NG: ', i)

print('='*20, target, '='*20)
print('Images: ', len(img))
print('Ground Truth: ', len(lab))
print('='*20, target, '='*20)

if __name__ == "__main__":
os.chdir('..')
init = os.getcwd()
try:
os.chdir(init + '/FlickrLogos-v2')
except:
print('경로가 없어용 ~')

checkData('train')
checkData('val')
checkData('test')

0 comments on commit 16255ba

Please sign in to comment.