Comments (2)
Press n to see the next sample >>> Press Esc to quit...
Traceback (most recent call last):
Overload resolution failed:
- Can't parse 'pt1'. Sequence item with index 0 has a wrong type
- Can't parse 'pt1'. Sequence item with index 0 has a wrong type
from complex-yolov4-pytorch.
There an issue with the order or structure of the coordinates passed to cv2.line(), also the corners_int are in float values.
Replace the function drawRotatedBox with the below function in the module data_process/kitti_bev_utils.py
def drawRotatedBox(img, x, y, w, l, yaw, color):
bev_corners = get_corners(x, y, w, l, yaw)
corners_int = np.round(bev_corners).astype(int) # Convert coordinates to integers
cv2.polylines(img, [corners_int], True, color, 2)
# Extract coordinates of the endpoints of the diagonal line
pt1 = (corners_int[0, 0], corners_int[0, 1]) # Top-left corner
pt2 = (corners_int[2, 0], corners_int[2, 1]) # Bottom-right corner
# Draw the diagonal line
cv2.line(img, pt1, pt2, (255, 255, 0), 2)
The modified function :
The function extracts the coordinates of the top-left and bottom-right corners from corners_int and creates tuples (x, y) for each point. These tuples are then passed as arguments pt1 and pt2 to cv2.line() to draw the diagonal line across the rotated box.
By ensuring that the coordinates are correctly structured as tuples of integers, this modification should resolve the error you're encountering when drawing the diagonal line.
from complex-yolov4-pytorch.
Related Issues (20)
- Can i get the trained models for this model?
- how to get the detected objects' coordinates? HOT 3
- Overload resolution failed HOT 2
- Clarification about Heightmap
- Doubt in density map
- How to train with a smaller kitti dataset?
- AP for Hard, medium and easy
- How to run as a live feed?
- How to show outputs in forms other than BEV? HOT 2
- How to inference with only .bin data of velodyne?
- Can i get the tensorboard logs for your training?
- Mayavi file dependencies problem
- Is it possible to test on custom data without using Kitti Dataset HOT 2
- cv2.line error HOT 3
- [INFO] No error, the convolution haven't activate linear
- ValueError: GEOSGeom_createLinearRing_r returned a NULL pointer
- test.py Runtime Error HOT 4
- Error running test.py HOT 1
- Issues with visualizing the when running test.py script 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 complex-yolov4-pytorch.