-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bounding Box Visualizer #31
base: master
Are you sure you want to change the base?
Conversation
cv::rectangle(img, lowerRightPoint, upperRightPoint, | ||
cv::Scalar(rand() % 255, rand() % 255, rand() % 255)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion, it seems to be better for users to be able to choose a color of the bounding box.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how we would want to do this. There might be multiple objects in the image belonging to different class so either we could take input a map where each label corresponded to a tuple. Kindly let me know if this makes sense.
static void VisualizeBoundingBoxes( | ||
ImageType& images, | ||
arma::field<arma::vec>& boundingBoxes, | ||
const size_t imageWidth = 224, | ||
const size_t imageHeight = 224, | ||
const size_t imageDepth = 3, | ||
const bool cornerRepresentation = true, | ||
const bool plot = false, | ||
const bool saveImages = false, | ||
const std::vector<std::string> imagePath = std::vector<std::string>()) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the method name might be simplified into one like DrawBBox
. I think it is not too ambiguous. Kindly let me know what you think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I'll change it.
for (size_t i = 0; i < image.n_cols; i++) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it processes a set of images sequentially, why don't you set this method to get an image, not a set of images? Users can extend this feature by calling it multiple times in their codes. Of course, we can create two methods, one is for a single image and the other is for multiple images. I'm just worried about this API may constrain the flexibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure that makes sense. Will make the changes.
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions! 👍 |
Keep Open. |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions! 👍 |
|
||
set(MODELS_LIBRARIES ${MLPACK_LIBRARY} | ||
${ARMADILLO_LIBRARIES} | ||
${Boost_LIBRARIES}) | ||
# ${OpenCV_LIBS}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this is commented out?
Hey everyone,
This PR aims to add visualisation tools to the repository. This comes with an addition opencv dependency. Below there is a function to add bounding boxes. I plan to add one more function that also handles labels in bounding boxes.
Regards,
Kartik.