Comments (3)
modify inference.py
like below
def show_det_result_meshlab(data,
result,
out_dir,
score_thr=0.0,
show=False,
snapshot=False
):
"""Show 3D detection result by meshlab."""
points = data['points'][0][0].cpu().numpy()
pts_filename = data['img_metas'][0][0]['pts_filename']
file_name = osp.split(pts_filename)[-1].split('.')[0]
if 'pts_bbox' in result[0].keys():
pred_bboxes = result[0]['pts_bbox']['boxes_3d'].tensor.numpy()
pred_scores = result[0]['pts_bbox']['scores_3d'].numpy()
else:
pred_bboxes = result[0]['boxes_3d'].corners.numpy() # without corners, when visualized the predicted bounding boxes are distorted.
pred_scores = result[0]['scores_3d'].numpy()
pred_labels = result[0]['labels_3d'].numpy() # pred_label is an essential parameter when executing _write_oriented_bbox.
# filter out low score bboxes for visualization
if score_thr > 0:
inds = pred_scores > score_thr
pred_bboxes = pred_bboxes[inds]
# for now we convert points into depth mode
box_mode = data['img_metas'][0][0]['box_mode_3d']
if box_mode != Box3DMode.DEPTH:
points = points[..., [1, 0, 2]]
points[..., 0] *= -1
show_bboxes = Box3DMode.convert(pred_bboxes, box_mode, Box3DMode.DEPTH)
else:
show_bboxes = deepcopy(pred_bboxes)
show_result(
points,
None,
None, # extra None is essential
show_bboxes,
pred_labels, # pred_label is an essential parameter when executing _write_oriented_bbox
out_dir,
file_name,
show=show,
snapshot=snapshot)
return file_name
from fcaf3d.
Please follow #27 .
from fcaf3d.
could you please tell me how to modify it in detail?It was succeseful when I run the test.py,but when I run the pcd_demo.py,it throws the question. Thanks!
from fcaf3d.
Related Issues (20)
- ModuleNotFoundError: No module named 'mmdet3d.ops.pcdet_nms'
- visualization question HOT 7
- train.py: error: unrecognized arguments: --load-from fully_conv_s3dis.pth HOT 1
- Can MinkowskiGenerativeConvolutionTranspose from fcaf3d_neck_with_head.py replaced? HOT 4
- output all predict bbox coordinate position HOT 4
- log information HOT 1
- mAP result question HOT 2
- Performance on ScanNet HOT 4
- The error about training the S3DIS dataset HOT 5
- resume-from
- Performance on SUN RGB-D HOT 5
- Concatenate different feature levels to one level before passing data to the heads HOT 2
- terminate called after throwing an instance of 'c10::CUDAError' HOT 1
- Generalization of FCAF3D HOT 2
- FCAF3D evaluation result mAP question HOT 2
- Training with Custom Dataset HOT 1
- Welcome update to OpenMMLab 2.0 HOT 1
- How to solve the error reported during the training trial HOT 3
- problem when install mmdet3d HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fcaf3d.