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

Bug fixs #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions generate_sky_masks.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ def extract_sky_mask(network, image_paths, mask_folder):
def process_folder(folder_to_process, colmap_img_root, mask_path, pic_ext, verbose=False, batchsize=8, **env):
network = prepare_network()
folders = [folder_to_process] + list(folder_to_process.walkdirs())

for folder in folders:

mask_folder = mask_path/colmap_img_root.relpathto(folder)
Expand All @@ -84,7 +83,6 @@ def process_folder(folder_to_process, colmap_img_root, mask_path, pic_ext, verbo
del network
torch.cuda.empty_cache()


parser = ArgumentParser(description='sky mask generator using ENet trained on cityscapes',
formatter_class=ArgumentDefaultsHelpFormatter)

Expand All @@ -105,3 +103,4 @@ def process_folder(folder_to_process, colmap_img_root, mask_path, pic_ext, verbo
file_exts = ['jpg', 'JPG']

process_folder(args.img_dir, args.colmap_img_root, args.mask_root, file_exts, True, args.batchsize)

Copy link

Choose a reason for hiding this comment

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

The EOF should be a single blank line

Pattern explanation 👈 Adding a blank line as End of File (EOF) is a convention for file processing to mark the end of a character sequence. For more details, feel free to check this resource.

Suggestion

Perhaps we could handle this like so:

Suggested change

Quack feedback loop 👍👎 This comment is about [invalid-eof]. Add the following reactions on this comment to let us know if:
- 👍 that comment was on point
- 👀 that doesn't seem right
- 👎 this isn't important for you right now
- 😕 that explanation wasn't clear

1 change: 1 addition & 0 deletions main_pipeline_no_lidar.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def main():
if i not in args.skip_step:
print_step(i, "First thorough photogrammetry")
env["thorough_recon"].makedirs_p()
print(env["video_frame_list_thorough"])
Copy link

Choose a reason for hiding this comment

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

Let's avoid print calls in production-ready code

Pattern explanation 👈 print calls can be useful for developping and debugging. But moving to a production-ready system, users can select the logging level they want to display but prints don't offer that flexibility. For more details, feel free to check this resource.

Code example

Here is an example of how this is typically handled:

# print("The payload is empty!")
import logging

logging.warning("The payload is empty!")

Quack feedback loop 👍👎 This comment is about [print-statement]. Add the following reactions on this comment to let us know if:
- 👍 that comment was on point
- 👀 that doesn't seem right
- 👎 this isn't important for you right now
- 😕 that explanation wasn't clear

colmap.extract_features(image_list=env["video_frame_list_thorough"], more=args.more_sift_features)
colmap.index_images(vocab_tree_output=env["indexed_vocab_tree"], vocab_tree_input=args.vocab_tree)
if env["match_method"] == "vocab_tree":
Expand Down
2 changes: 1 addition & 1 deletion pcl_util/pointcloud_subsampler.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ typename pcl::PointCloud<PointT>::Ptr filter(typename pcl::PointCloud<PointT>::P
pcl::VoxelGrid<PointT> vox;
vox.setLeafSize (resolution, resolution, resolution);

for (auto it = octree.leaf_begin(); it != octree.leaf_end(); ++it) {
for (auto it = octree.leaf_depth_begin(); it != octree.leaf_depth_end(); ++it) {
pcl::octree::OctreeContainerPointIndices& container = it.getLeafContainer();

pcl::IndicesPtr indexVector(new std::vector<int>);
Expand Down