Giter Site home page Giter Site logo

flyingshan / learning-polar-encodings-for-arbitrary-oriented-ship-detection-in-sar-images Goto Github PK

View Code? Open in Web Editor NEW
23.0 23.0 6.0 2.09 MB

Code for paper "Learning-Polar-Encodings-For-Arbitrary-Oriented-Ship-Detection-In-SAR-Images"

License: MIT License

Python 100.00%

learning-polar-encodings-for-arbitrary-oriented-ship-detection-in-sar-images's People

Contributors

flyingshan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

learning-polar-encodings-for-arbitrary-oriented-ship-detection-in-sar-images's Issues

assertion error

Thanks for you code, when i train the model, this error appears:
in decoder.py in polar_decode assert num_targets >0
This happens in the evaluation process, can you give some suggestions?

about your model

Hi, thank you for your work.
Can you share these two files MODEL_TO_EVALUATE.pth and MODEL_TO_DRAW_RESULTS.pth?
Looking forward for your answer.

ValueError: Points cannot contain NaN

您好,请问在运行大些的数据集(如HRSID,RSDD-SAR)时为什么总会出现这个问题:仿佛是模型不太稳定。
Traceback (most recent call last):
File "/home/Learning-Polar-Encodings-For-Arbitrary-Oriented-Ship-Detection-In-SAR-Images-master/train.py", line 199, in run_epoch
loss = criterion(pr_decs, data_dict)
File "/root/miniconda3/envs/gagale/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/Learning-Polar-Encodings-For-Arbitrary-Oriented-Ship-Detection-In-SAR-Images-master/loss.py", line 126, in forward
wh_loss, iou_loss = self.L_wh(pr_decs['wh'], gt_batch['reg_mask'], gt_batch['ind'], gt_batch['wh'])#wh_loss 和 iou_loss 分别代表宽度(width)和高度(height)的损失,由 IoUWeightedSmoothL1Loss 计算得出。
File "/root/miniconda3/envs/gagale/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/Learning-Polar-Encodings-For-Arbitrary-Oriented-Ship-Detection-In-SAR-Images-master/polar.py", line 453, in forward
ious_all_lists = self._calculate_ious(output, mask, ind, target)
File "/home/Learning-Polar-Encodings-For-Arbitrary-Oriented-Ship-Detection-In-SAR-Images-master/polar.py", line 429, in _calculate_ious
pred_bboxes = self._polar_to_bboxes(valid_pred) # [num_obj, 8]
File "/home/Learning-Polar-Encodings-For-Arbitrary-Oriented-Ship-Detection-In-SAR-Images-master/polar.py", line 354, in _polar_to_bboxes
mbb = MinimumBoundingBox(target_pts)
File "/home/Learning-Polar-Encodings-For-Arbitrary-Oriented-Ship-Detection-In-SAR-Images-master/MBB.py", line 109, in MinimumBoundingBox
hull_ordered = [points[index] for index in ConvexHull(points).vertices]
File "qhull.pyx", line 2431, in scipy.spatial.qhull.ConvexHull.init
File "qhull.pyx", line 283, in scipy.spatial.qhull._Qhull.init
ValueError: Points cannot contain NaN

TypeError: 'float' object is not iterable

I used the data you provided and run the code "python main.py --data_dir data/ssdd --num_epoch 120 --batch_size 8 --dataset ssdd --phase train --K 100" It seems that there are some data problems. And not all data could cause this.

Traceback (most recent call last):
File "main.py", line 59, in
ctrbox_obj.train_network(args)
File "/data/rocket/SGDD/Learning-Polar-Encodings-For-Arbitrary-Oriented-Ship-Detection-In-SAR-Images/train.py", line 145, in train_network
criterion=criterion)
File "/data/rocket/SGDD/Learning-Polar-Encodings-For-Arbitrary-Oriented-Ship-Detection-In-SAR-Images/train.py", line 190, in run_epoch
loss = criterion(pr_decs, data_dict)
File "/root/anaconda3/envs/mmdetection/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/data/rocket/SGDD/Learning-Polar-Encodings-For-Arbitrary-Oriented-Ship-Detection-In-SAR-Images/loss.py", line 126, in forward
wh_loss, iou_loss = self.L_wh(pr_decs['wh'], gt_batch['reg_mask'], gt_batch['ind'], gt_batch['wh'])
TypeError: 'float' object is not iterable

Thansk a lot

error code

Thanks for you code, when i eval the model, this error appears:
Traceback (most recent call last):
File "main.py", line 65, in
ctrbox_obj.evaluation(args, down_ratio=down_ratio)
File "E:\Polar-master\eval.py", line 40, in evaluation

File "E:\Polar-master\func_utils.py", line 97, in write_results
pts0, scores0 = decode_prediction(predictions, dsets, args, img_id, down_ratio)
ValueError: too many values to unpack (expected 2)

This happens in the evaluation process too, can you give some suggestions?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.