Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kartikdutt18
Copy link
Member

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.

Comment on lines +72 to +73
cv::rectangle(img, lowerRightPoint, upperRightPoint,
cv::Scalar(rand() % 255, rand() % 255, rand() % 255));
Copy link
Member

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.

Copy link
Member Author

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.

Comment on lines +29 to +39
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>())
{
Copy link
Member

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.

Copy link
Member Author

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.

Comment on lines +46 to +47
for (size_t i = 0; i < image.n_cols; i++)
{
Copy link
Member

@KimSangYeon-DGU KimSangYeon-DGU Aug 22, 2020

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.

Copy link
Member Author

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.

@mlpack-bot
Copy link

mlpack-bot bot commented Sep 26, 2020

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! 👍

@mlpack-bot mlpack-bot bot added the s: stale label Sep 26, 2020
@kartikdutt18
Copy link
Member Author

Keep Open.

@mlpack-bot
Copy link

mlpack-bot bot commented Oct 26, 2020

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})
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants