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

Logging and mask updates, resize speedup #8

Merged
merged 6 commits into from
Mar 1, 2024
Merged

Conversation

slimbuck
Copy link
Member

@slimbuck slimbuck commented Mar 1, 2024

This PR:

  • updates logging so the script can log its invocations to stdout without the invoked functions spamming stdout.
  • change mask handling to be a bit more robust
  • speedup resize by a factor of 2 by using imagemagick more effectively (this change was submitted upstream too Resize 2x speedup graphdeco-inria/gaussian-splatting#680).

@slimbuck slimbuck added the enhancement New feature or request label Mar 1, 2024
@slimbuck slimbuck requested review from gdudovitch-sc and a team March 1, 2024 10:49
@slimbuck slimbuck self-assigned this Mar 1, 2024
@slimbuck slimbuck changed the title Resize speedup Logging and mask updates, resize speedup Mar 1, 2024
subprocess.check_call(cmd, stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT, shell=True)
except subprocess.CalledProcessError as e:
logging.error(f"Command failed with code {e.returncode}. Exiting.")
exit(e.returncode)
Copy link

Choose a reason for hiding this comment

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

is this less than 256?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep. The problem before was actually os.system which returns a 16-bit number on unix "whose low byte is the signal number that killed the process, and whose high byte is the exit status". This was causing the strange numbers.

subprocess.check_call doesn't do this, but supplies returncode directly in the exception.

@slimbuck slimbuck merged commit 34f8c9c into main Mar 1, 2024
@slimbuck slimbuck deleted the resize-speedup branch March 1, 2024 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants