test_ship.py 872 B

123456789101112
  1. from mydetection import ship_detection_fun
  2. # my_path = './picture_examples/'
  3. my_path_label = 'D:/hiddz/SAR_Ship_detection_CFAR-python-20240506\\picture_labels\\P0001_1200_2000_8400_9200.txt'
  4. my_path_pic = 'D:/hiddz/SAR_Ship_detection_CFAR-python-20240506/picture_examples\\P0001_1200_2000_8400_9200.jpg'
  5. result_path = ship_detection_fun(my_path_pic, my_path_label) # my_path_pic: 原始图片路径, my_path_label: 标签路径, path: 保存结果路径
  6. print(result_path)
  7. # my_path_pic D:/hiddz/SAR_Ship_detection_CFAR-python-20240506/picture_examples
  8. # D:/hiddz/SAR_Ship_detection_CFAR-python-20240506\picture_labels
  9. # ['python', './test_data/xie\\mydetection.py',
  10. # 'D:/hiddz/SAR_Ship_detection_CFAR-python-20240506/picture_examples\\P0001_1200_2000_8400_9200.jpg',
  11. # 'D:/hiddz/SAR_Ship_detection_CFAR-python-20240506\\picture_labels\\P0001_1200_2000_8400_9200.txt']