Commit f12633cd authored by Larkin Heintzman's avatar Larkin Heintzman

good-ish training results finally

parent 7b946751
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -17,7 +17,7 @@ hue=.1 ...@@ -17,7 +17,7 @@ hue=.1
learning_rate=0.001 learning_rate=0.001
burn_in=100 burn_in=100
max_batches = 502000 max_batches = 505000
policy=steps policy=steps
steps=40000,45000 steps=40000,45000
scales=.1,.1 scales=.1,.1
......
chart.png

68.7 KB | W: | H:

chart.png

77.6 KB | W: | H:

chart.png
chart.png
chart.png
chart.png
  • 2-up
  • Swipe
  • Onion skin
chart_yolov3-visdrone.png

68.7 KB | W: | H:

chart_yolov3-visdrone.png

77.6 KB | W: | H:

chart_yolov3-visdrone.png
chart_yolov3-visdrone.png
chart_yolov3-visdrone.png
chart_yolov3-visdrone.png
  • 2-up
  • Swipe
  • Onion skin
import argparse import argparse
import sys import sys
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
...@@ -15,34 +15,50 @@ def main(argv): ...@@ -15,34 +15,50 @@ def main(argv):
args = parser.parse_args() args = parser.parse_args()
f = open(args.log_file) f = open(args.log_file)
lines = [line.rstrip("\n") for line in f.readlines()] lines = [line.rstrip("\n") for line in f.readlines()]
numbers = {'1','2','3','4','5','6','7','8','9'} numbers = {'1','2','3','4','5','6','7','8','9'}
iters = [] iters = []
loss = [] loss = []
mAP = []
fig,ax = plt.subplots() fig,ax = plt.subplots()
prev_line = ""
for line in lines: for line in lines:
args = line.lstrip().split(' ') args = line.lstrip().split(' ')
if args[0][-1:]==':' and args[0][0] in numbers : if args[0][-1:]==':' and args[0][0] in numbers:
iters.append(int(args[0][:-1])) iters.append(int(args[0][:-1]))
loss.append(float(args[2])) loss.append(min(float(args[2]),250.0))
if args[0]=='Last':
ax.plot(iters,loss) mAP.append(float(args[4]))
plt.xlabel('iters')
plt.ylabel('loss') # make map and iters equal with zero padding
if (len(iters) > len(mAP)):
mAP = [0.0]*(len(iters) - len(mAP)) + mAP
elif (len(iters) < len(mAP)):
mAP = [0.0]*(len(mAP) - len(iters)) + mAP
axM = ax.twinx() # instantiate a second axes that shares the same x-axis
ax.plot(iters,loss, 'b')
ax.set_xlabel('iters')
ax.set_ylabel('loss', color='b')
axM.plot(iters,mAP, 'r')
axM.set_xlabel('iters')
axM.set_ylabel('mAP', color='r')
plt.grid() plt.grid()
ticks = range(0,250,10) ticks = range(0,250,10)
fig.tight_layout() # otherwise the right y-label is slightly clipped
plt.savefig('loss_plot.jpg') plt.savefig('loss_plot.jpg')
#ax.set_yticks(ticks) #ax.set_yticks(ticks)
#plt.show() #plt.show()
if __name__ == "__main__": if __name__ == "__main__":
main(sys.argv) main(sys.argv)
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment