Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,5 @@ ENV/

# PyCharm
.idea/
research/demo_data/images
research/demo_data/annotations/xmls
20 changes: 20 additions & 0 deletions research/demo_data/annotations/process_labelImg_xml.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import os
import xml.etree.ElementTree as ET
import sys

def append_jpg_extension(directory):
# appends ".jpg" to all of the xml files inside the given directory at data["filename"]
for filename in os.listdir(directory):
if os.path.splitext(filename)[1] == ".xml":
tree = ET.parse(os.path.join(directory, filename))
root = tree.getroot()
filename_text = root[1].text
if os.path.splitext(filename_text)[1] != ".jpg":
root[1].text = filename_text + ".jpg"
tree.write(os.path.join(directory, filename))

def main():
append_jpg_extension(sys.argv[1])

if __name__ == "__main__":
main()
241 changes: 241 additions & 0 deletions research/demo_data/annotations/trainval.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,241 @@
2018-03-01T02-19-54-064624_exo183CGE-574231519870794064624_343 1 1 1
2018-03-01T02-19-54-564622_exo183CGE-574231519870794564622_344 1 1 1
2018-03-01T02-19-55-064628_exo183CGE-574231519870795064628_345 1 1 1
2018-03-01T02-19-55-564699_exo183CGE-574231519870795564699_346 1 1 1
2018-03-01T02-19-56-064632_exo183CGE-574231519870796064632_347 1 1 1
2018-03-01T02-19-56-564691_exo183CGE-574231519870796564691_348 1 1 1
2018-03-01T02-19-57-064796_exo183CGE-574231519870797064796_349 1 1 1
2018-03-01T02-19-57-564672_exo183CGE-574231519870797564672_350 1 1 1
2018-03-01T02-19-58-064745_exo183CGE-574231519870798064745_351 1 1 1
2018-03-01T02-19-58-564756_exo183CGE-574231519870798564756_352 1 1 1
2018-03-01T02-19-59-064701_exo183CGE-574231519870799064701_353 1 1 1
2018-03-01T02-19-59-564733_exo183CGE-574231519870799564733_354 1 1 1
2018-03-01T02-20-00-064774_exo183CGE-574231519870800064774_355 1 1 1
2018-03-01T02-20-00-564740_exo183CGE-574231519870800564740_356 1 1 1
2018-03-01T02-20-01-064768_exo183CGE-574231519870801064768_357 1 1 1
2018-03-01T02-20-01-564808_exo183CGE-574231519870801564808_358 1 1 1
2018-03-01T02-20-02-064754_exo183CGE-574231519870802064754_359 1 1 1
2018-03-01T02-20-02-564773_exo183CGE-574231519870802564773_360 1 1 1
2018-03-01T02-20-03-064855_exo183CGE-574231519870803064855_361 1 1 1
2018-03-01T02-20-03-564855_exo183CGE-574231519870803564855_362 1 1 1
2018-03-01T02-20-04-064815_exo183CGE-574231519870804064815_363 1 1 1
2018-03-01T02-20-04-564831_exo183CGE-574231519870804564831_364 1 1 1
2018-03-01T02-20-05-064895_exo183CGE-574231519870805064895_365 1 1 1
2018-03-01T02-20-05-564836_exo183CGE-574231519870805564836_366 1 1 1
2018-03-01T02-20-06-064877_exo183CGE-574231519870806064877_367 1 1 1
2018-03-01T02-20-06-564919_exo183CGE-574231519870806564919_368 1 1 1
2018-03-01T02-20-07-064847_exo183CGE-574231519870807064847_369 1 1 1
2018-03-01T02-20-07-564879_exo183CGE-574231519870807564879_370 1 1 1
2018-03-01T02-20-08-064918_exo183CGE-574231519870808064918_371 1 1 1
2018-03-01T02-20-08-564898_exo183CGE-574231519870808564898_372 1 1 1
2018-03-01T02-20-09-064942_exo183CGE-574231519870809064942_373 1 1 1
2018-03-01T02-20-09-564893_exo183CGE-574231519870809564893_374 1 1 1
2018-03-01T02-20-10-064959_exo183CGE-574231519870810064959_375 1 1 1
2018-03-01T02-20-10-564996_exo183CGE-574231519870810564996_376 1 1 1
2018-03-01T02-20-11-064989_exo183CGE-574231519870811064989_377 1 1 1
2018-03-01T02-20-11-564928_exo183CGE-574231519870811564928_378 1 1 1
2018-03-01T02-20-12-064983_exo183CGE-574231519870812064983_379 1 1 1
2018-03-01T02-20-12-564965_exo183CGE-574231519870812564965_380 1 1 1
2018-03-01T02-20-13-064988_exo183CGE-574231519870813064988_381 1 1 1
2018-03-01T02-20-13-565022_exo183CGE-574231519870813565022_382 1 1 1
2018-03-01T02-20-14-065044_exo183CGE-574231519870814065044_383 1 1 1
2018-03-01T02-20-14-565062_exo183CGE-574231519870814565062_384 1 1 1
2018-03-01T02-20-15-065014_exo183CGE-574231519870815065014_385 1 1 1
2018-03-01T02-20-15-565031_exo183CGE-574231519870815565031_386 1 1 1
2018-03-01T02-20-16-065036_exo183CGE-574231519870816065036_387 1 1 1
2018-03-01T02-20-16-565072_exo183CGE-574231519870816565072_388 1 1 1
2018-03-01T02-20-17-065102_exo183CGE-574231519870817065102_389 1 1 1
2018-03-01T02-20-17-565048_exo183CGE-574231519870817565048_390 1 1 1
2018-03-01T02-20-18-065103_exo183CGE-574231519870818065103_391 1 1 1
2018-03-01T02-20-18-565071_exo183CGE-574231519870818565071_392 1 1 1
2018-03-01T02-20-19-065122_exo183CGE-574231519870819065122_393 1 1 1
2018-03-01T02-20-19-565149_exo183CGE-574231519870819565149_394 1 1 1
2018-03-01T02-20-20-065160_exo183CGE-574231519870820065160_395 1 1 1
2018-03-01T02-20-20-565128_exo183CGE-574231519870820565128_396 1 1 1
2018-03-01T02-20-21-065182_exo183CGE-574231519870821065182_397 1 1 1
2018-03-01T02-20-21-565172_exo183CGE-574231519870821565172_398 1 1 1
2018-03-01T02-20-22-065140_exo183CGE-574231519870822065140_399 1 1 1
2018-03-01T02-20-22-565203_exo183CGE-574231519870822565203_400 1 1 1
2018-03-01T02-20-23-065219_exo183CGE-574231519870823065219_401 1 1 1
2018-03-01T02-20-23-565171_exo183CGE-574231519870823565171_402 1 1 1
2018-03-01T02-20-24-065229_exo183CGE-574231519870824065229_403 1 1 1
2018-03-01T02-20-24-565235_exo183CGE-574231519870824565235_404 1 1 1
2018-03-01T02-20-25-065244_exo183CGE-574231519870825065244_405 1 1 1
2018-03-01T02-20-25-565191_exo183CGE-574231519870825565191_406 1 1 1
2018-03-01T02-20-26-065249_exo183CGE-574231519870826065249_407 1 1 1
2018-03-01T02-20-26-565256_exo183CGE-574231519870826565256_408 1 1 1
2018-03-01T02-20-27-065224_exo183CGE-574231519870827065224_409 1 1 1
2018-03-01T02-20-27-565273_exo183CGE-574231519870827565273_410 1 1 1
2018-03-01T02-20-28-065271_exo183CGE-574231519870828065271_411 1 1 1
2018-03-01T02-20-28-565255_exo183CGE-574231519870828565255_412 1 1 1
2018-03-01T02-20-29-065282_exo183CGE-574231519870829065282_413 1 1 1
2018-03-01T02-20-29-565309_exo183CGE-574231519870829565309_414 1 1 1
2018-03-01T02-20-30-065285_exo183CGE-574231519870830065285_415 1 1 1
2018-03-01T02-20-30-565285_exo183CGE-574231519870830565285_416 1 1 1
2018-03-01T02-20-31-065289_exo183CGE-574231519870831065289_417 1 1 1
2018-03-01T02-20-31-565340_exo183CGE-574231519870831565340_418 1 1 1
2018-03-01T02-20-32-065309_exo183CGE-574231519870832065309_419 1 1 1
2018-03-01T02-20-32-565352_exo183CGE-574231519870832565352_420 1 1 1
2018-03-01T02-20-33-065333_exo183CGE-574231519870833065333_421 1 1 1
2018-03-01T02-20-33-565377_exo183CGE-574231519870833565377_422 1 1 1
2018-03-01T02-20-34-065411_exo183CGE-574231519870834065411_423 1 1 1
2018-03-01T02-20-34-565354_exo183CGE-574231519870834565354_424 1 1 1
2018-03-01T02-20-35-065369_exo183CGE-574231519870835065369_425 1 1 1
2018-03-01T02-20-35-565392_exo183CGE-574231519870835565392_426 1 1 1
2018-03-01T02-20-36-065566_exo183CGE-574231519870836065566_427 1 1 1
2018-03-01T02-20-36-565397_exo183CGE-574231519870836565397_428 1 1 1
2018-03-01T02-20-37-065426_exo183CGE-574231519870837065426_429 1 1 1
2018-03-01T02-20-37-565440_exo183CGE-574231519870837565440_430 1 1 1
2018-03-01T02-20-38-065449_exo183CGE-574231519870838065449_431 1 1 1
2018-03-01T02-20-38-565443_exo183CGE-574231519870838565443_432 1 1 1
2018-03-01T02-43-58-991936_exo183CGE-574231519872238991936_3284 1 1 1
2018-03-01T02-43-59-491969_exo183CGE-574231519872239491969_3285 1 1 1
2018-03-01T02-43-59-991939_exo183CGE-574231519872239991939_3286 1 1 1
2018-03-01T02-44-00-491920_exo183CGE-574231519872240491920_3287 1 1 1
2018-03-01T02-44-00-991922_exo183CGE-574231519872240991922_3288 1 1 1
2018-03-01T02-44-01-991943_exo183CGE-574231519872241991943_3289 1 1 1
2018-03-01T02-44-02-491911_exo183CGE-574231519872242491911_3290 1 1 1
2018-03-01T02-44-02-991954_exo183CGE-574231519872242991954_3291 1 1 1
2018-03-01T02-44-03-328612_exo183CGE-574231519872243328612_3292 1 1 1
2018-03-01T02-44-03-578604_exo183CGE-574231519872243578604_3293 1 1 1
2018-03-01T02-44-03-828574_exo183CGE-574231519872243828574_3294 1 1 1
2018-03-01T02-44-04-078620_exo183CGE-574231519872244078620_3295 1 1 1
2018-03-01T02-44-04-328614_exo183CGE-574231519872244328614_3296 1 1 1
2018-03-01T02-44-04-828627_exo183CGE-574231519872244828627_3297 1 1 1
2018-03-01T02-44-05-078602_exo183CGE-574231519872245078602_3298 1 1 1
2018-03-01T02-44-05-578580_exo183CGE-574231519872245578580_3299 1 1 1
2018-03-01T02-44-05-828602_exo183CGE-574231519872245828602_3300 1 1 1
2018-03-01T02-44-06-328584_exo183CGE-574231519872246328584_3301 1 1 1
2018-03-01T02-44-06-578637_exo183CGE-574231519872246578637_3302 1 1 1
2018-03-01T02-44-06-828600_exo183CGE-574231519872246828600_3303 1 1 1
2018-03-01T02-44-07-078562_exo183CGE-574231519872247078562_3304 1 1 1
2018-03-01T02-44-07-578597_exo183CGE-574231519872247578597_3305 1 1 1
2018-03-01T02-44-07-828576_exo183CGE-574231519872247828576_3306 1 1 1
2018-03-01T02-45-15-828707_exo183CGE-574231519872315828707_3437 1 1 1
2018-03-01T02-45-16-328639_exo183CGE-574231519872316328639_3438 1 1 1
2018-03-01T02-45-16-828816_exo183CGE-574231519872316828816_3439 1 1 1
exo183CGETR-629001520289499305166_31 1 1 1
exo183CGETR-629001520289512303963_44 1 1 1
exo183CGETR-629001520289523267341_54 1 1 1
exo183CGETR-629001520289529650440_62 1 1 1
exo183CGETR-629001520289533117658_66 1 1 1
exo183CGETR-629001520382157009968_97 1 1 1
exo183CGETR-629001520382165511131_110 1 1 1
exo183CGETR-629001520382175012266_121 1 1 1
exo183CGETR-629001520382181513120_130 1 1 1
exo183CGETR-629001520382185511644_136 1 1 1
exo183CGETR-629001520382195505420_149 1 1 1
exo183CGETR-629001520382202501289_160 1 1 1
exo183CGETR-629001520382203500843_161 1 1 1
exo183CGETR-629001520382208498179_168 1 1 1
exo183CGETR-629001520382214994634_176 1 1 1
exo183CGETR-629001520382227988423_191 1 1 1
exo183CGETR-629001520382232986214_199 1 1 1
exo183CGETR-629001520382242482248_211 1 1 1
exo183CGETR-629001520382245980854_215 1 1 1
exo183CGETR-629001520382256476960_230 1 1 1
exo183CGETR-629001520382262474905_237 1 1 1
exo183CGETR-629001520382333457218_61 1 1 1
exo183CGETR-629001520382418447057_200 1 1 1
exo183CGETR-629001520382423946721_210 1 1 1
exo183CGETR-629001520382430946280_220 1 1 1
exo183CGETR-629001520382438945749_231 1 1 1
exo183CGETR-629001520382448445290_245 1 1 1
exo183CGETR-629001520382519443311_340 1 1 1
exo183CGETR-629001520382523943155_348 1 1 1
exo183CGETR-629001520382533443040_365 1 1 1
exo183CGETR-629001520382539943016_375 1 1 1
exo183CGETR-629001520382547443067_386 1 1 1
exo183CGETR-629001520382559443033_404 1 1 1
exo183CGETR-629001520382564943026_412 1 1 1
exo183CGETR-629001520382569443079_419 1 1 1
exo183CGETR-629001520382578443065_435 1 1 1
exo183CGETR-629001520382585443070_448 1 1 1
exo183CGETR-629001520382594443232_461 1 1 1
exo183CGETR-629001520382596943268_465 1 1 1
exo183CGETR-629001520382601443346_471 1 1 1
exo183CGETR-629001520382603943318_475 1 1 1
exo183CGETR-629001520382606943427_481 1 1 1
exo183CGETR-629001520382609443403_485 1 1 1
exo183CGETR-629001520382611443390_489 1 1 1
exo183CGETR-629001520545633619991_39 1 1 1
exo183CGETR-629001520545642119430_51 1 1 1
exo183CGETR-629001520545649119629_62 1 1 1
exo183CGETR-629001520545656120128_70 1 1 1
exo183CGETR-629001520545656620176_71 1 1 1
exo183CGETR-629001520545668121499_87 - Copy 1 1 1
exo183CGETR-629001520545679621567_98 - Copy 1 1 1
exo183CGETR-629001520545688122498_111 - Copy 1 1 1
exo183CGETR-629001520546262146854_973 - Copy 1 1 1
exo183CGETR-629001520546268146710_981 - Copy 1 1 1
exo183CGETR-629001520546274646741_991 1 1 1
exo183CGETR-629001520546281646886_1002 1 1 1
exo183CGETR-629001520546289647310_1012 1 1 1
exo183CGETR-629001520546999158528_259 1 1 1
exo183CGETR-629001520547006657170_272 1 1 1
exo183CGETR-629001520547013657104_282 1 1 1
exo183CGETR-629001520547019657131_292 1 1 1
exo183CGETR-629001520547021157139_295 1 1 1
exo183CGETR-629001520547027657028_307 1 1 1
exo183CGETR-629001520547032657151_315 1 1 1
exo183CGETR-629001520547035157249_319 1 1 1
exo183CGETR-629001520547038657279_325 1 1 1
exo183CGETR-629001520547047656882_339 1 1 1
exo183CGETR-629001520547055656740_353 1 1 1
exo183CGETR-629001520547063156949_367 1 1 1
exo183CGETR-629001520547069157047_377 1 1 1
exo183CGETR-629001520547709659781_49 1 1 1
exo183CGETR-629001520547716658603_60 1 1 1
exo183CGETR-629001520547722157928_69 1 1 1
exo183CGETR-629001520547730657041_82 1 1 1
exo183CGETR-629001520547737656247_90 1 1 1
exo183CGETR-629001520547751155166_104 1 1 1
exo183CGETR-629001520547763654243_118 1 1 1
exo183CGETR-629001520547776153115_132 1 1 1
exo183CGETR-629001520547780652626_137 1 1 1
exo183CGETR-629001520547782652492_141 1 1 1
exo183CGETR-629001520547791651630_154 1 1 1
exo183CGETR-629001520547807150203_176 1 1 1
exo183CGETR-629001520547808650127_178 1 1 1
exo304MGETR-638221520044541587365_2392 1 1 1
exo304MGETR-638221520044542087308_2393 1 1 1
exo304MGETR-638221520044542587396_2394 1 1 1
exo304MGETR-638221520044543087332_2395 1 1 1
exo304MGETR-638221520044543587325_2396 1 1 1
exo304MGETR-638221520044544087347_2397 1 1 1
exo304MGETR-638221520044544587296_2398 1 1 1
exo304MGETR-638221520044545087375_2399 1 1 1
exo304MGETR-638221520044545587328_2400 1 1 1
exo304MGETR-638221520044546087307_2401 1 1 1
exo304MGETR-638221520044546587337_2402 1 1 1
exo304MGETR-638221520044547587326_2403 1 1 1
exo304MGETR-638221520044548087328_2404 1 1 1
exo304MGETR-638221520044548587330_2405 1 1 1
exo304MGETR-638221520044549087301_2406 1 1 1
exo304MGETR-638221520044549587367_2407 1 1 1
exo304MGETR-638221520044550087334_2408 1 1 1
exo304MGETR-638221520044550587373_2409 1 1 1
exo304MGETR-638221520044551087354_2410 1 1 1
exo304MGETR-638221520044551587368_2411 1 1 1
exo304MGETR-638221520044552087352_2412 1 1 1
exo304MGETR-638221520044552587332_2413 1 1 1
exo304MGETR-638221520044553087361_2414 1 1 1
exo304MGETR-638221520044553587348_2415 1 1 1
exo304MGETR-638221520044554087314_2416 1 1 1
exo304MGETR-638221520044554587319_2417 1 1 1
exo304MGETR-638221520044555087294_2418 1 1 1
exo304MGETR-638221520047497166908_8233 1 1 1
exo304MGETR-638221520047499166659_8237 1 1 1
exo304MGETR-638221520047500666425_8240 1 1 1
exo304MGETR-638221520047502166274_8243 1 1 1
exo304MGETR-638221520047504166056_8247 1 1 1
exo304MGETR-638221520047505665772_8250 1 1 1
exo304MGETR-638221520047507165593_8253 1 1 1
exo304MGETR-638221520047508665446_8256 1 1 1
exo304MGETR-638221520047510165196_8259 1 1 1
ext-1520280592537-exo183CGETR-629001520289496803415_29-0-1520289497607927938 1 1 1
ext-1520379505933-exo183CGETR-629001520382153009540_94-1-1520382153778460076 1 1 1
ext-1520379505933-exo183CGETR-629001520382157510059_98-0-1520382158502503707 1 1 1
ext-1520379505933-exo183CGETR-629001520382189009358_139-1-1520382189782750164 1 1 1
ext-1520542201255-exo183CGETR-629001520547744655744_97-0-1520547745411355328 1 1 1
ext-1520542201255-exo183CGETR-629001520547775153168_131-0-1520547776131305715 1 1 1
Binary file added research/demo_data/images/Person_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added research/demo_data/images/Person_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added research/demo_data/images/demo_data_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions research/demo_data/label_map.pbtxt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
item {
id: 1
name: 'person'
}

item {
id: 2
name: 'car'
}
Binary file not shown.
Empty file.
6 changes: 4 additions & 2 deletions research/object_detection/data_decoders/tf_example_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ def __init__(self,
slim_example_decoder.Image(
image_key='image/encoded',
format_key='image/format',
channels=3,
dct_method=dct_method),
channels=3),
fields.InputDataFields.source_id: (
slim_example_decoder.Tensor('image/source_id')),
fields.InputDataFields.key: (
Expand Down Expand Up @@ -160,10 +159,13 @@ def __init__(self,
default_value=-1)
# If the label_map_proto is provided, try to use it in conjunction with
# the class text, and fall back to a materialized ID.
"""
label_handler = slim_example_decoder.BackupHandler(
slim_example_decoder.LookupTensor(
'image/object/class/text', table, default_value=''),
slim_example_decoder.Tensor('image/object/class/label'))
"""
label_handler = slim_example_decoder.Tensor('image/object/class/label')
else:
label_handler = slim_example_decoder.Tensor('image/object/class/label')
self.items_to_handlers[
Expand Down
34 changes: 18 additions & 16 deletions research/object_detection/dataset_tools/create_pet_tf_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@
import os
import random
import re
import math

from lxml import etree
import numpy as np
import PIL.Image
import tensorflow as tf

import sys; print sys.path
from object_detection.utils import dataset_util
from object_detection.utils import label_map_util

Expand Down Expand Up @@ -110,18 +111,18 @@ def dict_to_tf_example(data,
raise ValueError('Image format not JPEG')
key = hashlib.sha256(encoded_jpg).hexdigest()

with tf.gfile.GFile(mask_path, 'rb') as fid:
encoded_mask_png = fid.read()
encoded_png_io = io.BytesIO(encoded_mask_png)
mask = PIL.Image.open(encoded_png_io)
if mask.format != 'PNG':
raise ValueError('Mask format not PNG')
# with tf.gfile.GFile(mask_path, 'rb') as fid:
# encoded_mask_png = fid.read()
# encoded_png_io = io.BytesIO(encoded_mask_png)
# mask = PIL.Image.open(encoded_png_io)
# if mask.format != 'PNG':
# raise ValueError('Mask format not PNG')

mask_np = np.asarray(mask)
nonbackground_indices_x = np.any(mask_np != 2, axis=0)
nonbackground_indices_y = np.any(mask_np != 2, axis=1)
nonzero_x_indices = np.where(nonbackground_indices_x)
nonzero_y_indices = np.where(nonbackground_indices_y)
# mask_np = np.asarray(mask)
# nonbackground_indices_x = np.any(mask_np != 2, axis=0)
# nonbackground_indices_y = np.any(mask_np != 2, axis=1)
# nonzero_x_indices = np.where(nonbackground_indices_x)
# nonzero_y_indices = np.where(nonbackground_indices_y)

width = int(data['size']['width'])
height = int(data['size']['height'])
Expand Down Expand Up @@ -157,7 +158,8 @@ def dict_to_tf_example(data,
ymins.append(ymin / height)
xmaxs.append(xmax / width)
ymaxs.append(ymax / height)
class_name = get_class_name_from_filename(data['filename'])
class_name = obj['name']
# class_name = get_class_name_from_filename(data['filename']) # Really? This is how you do it? In the future will need to be able to have multiple different kinds of classes in an image
classes_text.append(class_name.encode('utf8'))
classes.append(label_map_dict[class_name])
truncated.append(int(obj['truncated']))
Expand Down Expand Up @@ -272,7 +274,7 @@ def main(_):
random.seed(42)
random.shuffle(examples_list)
num_examples = len(examples_list)
num_train = int(0.7 * num_examples)
num_train = int(math.ceil(0.7 * num_examples))
train_examples = examples_list[:num_train]
val_examples = examples_list[num_train:]
logging.info('%d training and %d validation examples.',
Expand All @@ -282,9 +284,9 @@ def main(_):
val_output_path = os.path.join(FLAGS.output_dir, 'pet_val.record')
if FLAGS.faces_only:
train_output_path = os.path.join(FLAGS.output_dir,
'pet_train_with_masks.record')
'lattice_train_with_masks.record')
val_output_path = os.path.join(FLAGS.output_dir,
'pet_val_with_masks.record')
'lattice_val_with_masks.record')
create_tf_record(
train_output_path,
label_map_dict,
Expand Down
Loading