Let S be a set of n intervals in R, and let (S, +) be any commutative semigroup. We assign a weight ω(s) ∈ S to each interval in S. For a point x ∈ R, let S(x) ⊆ S be the set of intervals that contain x. Given a point q ∈ R, the stabbing-semigroup query asks for computing s∈S(q) ω(s). We propose a linear-size dynamic data structure, under the pointermachine model, that answers queries in worst-case O(log n) time, and supports both insertions and deletions of intervals in amortized O(log n) time. It is the first data structure that attains the optimal O(log n) bound for all three operations. Furthermore, our structure can easily be adapted to external memory, where we obtain a linear-size structure that answers queries and supports updates in O(log B n) I/Os, where B is the disk block size.For the restricted case of nested family of intervals (every pair of intervals are either disjoint or one contains the other), we present a simpler solution based on dynamic trees.
Text-driven image generation methods have shown impressive results recently, allowing casual users to generate high quality images by providing textual descriptions. However, similar capabilities for editing existing images are still out of reach. Text-driven image editing methods usually need edit masks, struggle with edits that require significant visual changes and cannot easily keep specific details of the edited portion. In this paper we make the observation that image-generation models can be converted to image-editing models simply by fine-tuning them on a single image. We also show that initializing the stochastic sampler with a noised version of the base image before the sampling and interpolating relevant details from the base image after sampling further increase the quality of the edit operation. Combining these observations, we propose UniTune, a novel image editing method. UniTune gets as input an arbitrary image and a textual edit description, and carries out the edit while maintaining high fidelity to the input image. UniTune does not require additional inputs, like masks or sketches, and can perform multiple edits on the same image without retraining. We test our method using the Imagen model in a range of different use cases. We demonstrate that it is broadly applicable and can perform a surprisingly wide range of expressive editing operations, including those requiring significant visual changes that were previously impossible.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.