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

Nbuono/implement symphony dataset parser #333

Merged
merged 14 commits into from
Nov 25, 2024

Conversation

ewfuentes
Copy link
Owner

No description provided.

experimental/learn_descriptors/symphony_lake_parser.hh Outdated Show resolved Hide resolved
Comment on lines 8 to 13
if (std::filesystem::exists(image_root_dir)) {
surveys_.load(image_root_dir.string(), survey_list);
} else {
throw std::runtime_error("Error: The path '" + image_root_dir.string() +
"' does not exist.");
}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you add //common:check as a dependency, and #include "common/check.hh" you can replace this with:

Suggested change
if (std::filesystem::exists(image_root_dir)) {
surveys_.load(image_root_dir.string(), survey_list);
} else {
throw std::runtime_error("Error: The path '" + image_root_dir.string() +
"' does not exist.");
}
CHECK(std::filesystem::exists(image_root_dir), "Image root does not exist!", image_root_dir);
surveys_.load(image_root_dir.string(), survey_list);

This is will spit out a nice backtrace and you can add as many context variables as your want onto the end.

image = survey.loadImageByImageIndex(j);
cv::imshow("Symphony Dataset Image", image);
cv::waitKey(2);
}
}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any sanity checks you could add?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can make sure the image is the right shape and isn't all black pixels. I suppose I could also hard code getting the images myself through the directory and make sure the files are the same too

public:
DataParser(const std::filesystem::path &image_root_dir,
const std::vector<std::string> &survey_list);
~DataParser();
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the automatically generated destructor sufficient? Could probably omit declaration/definition if it is.

@ewfuentes ewfuentes merged commit 74ba6cf into main Nov 25, 2024
5 checks passed
@ewfuentes ewfuentes deleted the nbuono/implement-symphony-dataset-parser branch November 25, 2024 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants