프로젝트

일반

사용자정보

개정판 af6e3ebf

IDaf6e3ebfcd30b40f1a9eadbf57f48adc23f65f45
상위 5463d731
하위 c4d3fc1e

함의성이(가) 4년 이상 전에 추가함

issue #1633: remove visdom

차이점 보기:

DTI_PID/WebServer/symbol_training/train.py
20 20
from src.vis_utils.vis_tool import visdom_bbox
21 21

  
22 22
loss_data = {'X': [], 'Y': [], 'legend_U':['total', 'coord', 'conf', 'cls']}
23
visdom = visdom.Visdom()
23
#visdom = visdom.Visdom(port='8080')
24 24

  
25 25
def get_args():
26 26
    parser = argparse.ArgumentParser("You Only Look Once: Unified, Real-Time Object Detection")
......
169 169

  
170 170
                gt_image = at.tonumpy(image[0])
171 171
                gt_image = visdom_bbox(gt_image, label[0])
172
                visdom.image(gt_image, opts=dict(title='gt_box_image'), win=3)
172
                #visdom.image(gt_image, opts=dict(title='gt_box_image'), win=3)
173 173

  
174 174
                if len(predictions) != 0:
175 175
                    image = at.tonumpy(image[0])
176 176
                    box_image = visdom_bbox(image, predictions[0])
177
                    visdom.image(box_image, opts=dict(title='box_image'), win=2)
177
                    #visdom.image(box_image, opts=dict(title='box_image'), win=2)
178 178

  
179 179
                elif len(predictions) == 0:
180 180
                    box_image = tensor2im(image)
181
                    visdom.image(box_image.transpose([2, 0, 1]), opts=dict(title='box_image'), win=2)
181
                    #visdom.image(box_image.transpose([2, 0, 1]), opts=dict(title='box_image'), win=2)
182 182

  
183 183
                loss_dict = {
184 184
                    'total' : loss.item(),
......
187 187
                    'cls' : loss_cls.item()
188 188
                }
189 189

  
190
                visdom_loss(visdom, loss_step, loss_dict)
190
                #visdom_loss(visdom, loss_step, loss_dict)
191 191
                loss_step = loss_step + 1
192 192

  
193 193
        if epoch % opt.test_interval == 0:
......
280 280
    data_path = os.path.join(os.path.dirname(os.path.realpath(__file__)) + '\\Data\\', 'VnV')
281 281
    train(name='VnV', classes=datas, root_path=data_path, pre_trained_model_path=os.path.dirname(os.path.realpath(
282 282
                                                       __file__)) + '\\pre_trained_model\\only_params_trained_yolo_voc')
283
    train(opt)

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)