Spaces:
Runtime error
Runtime error
Download PyPatchMatch/csrc/inpaint.h from bigslime/stablediffusion-infinity: direct link, hf CLI and curl.
- Browser
- Download file 959 Bytes
-
https://huggingface.co/spaces/bigslime/stablediffusion-infinity/resolve/main/PyPatchMatch/csrc/inpaint.h
- Command line
-
hf download hf://spaces/bigslime/stablediffusion-infinity/PyPatchMatch/csrc/inpaint.h
-
curl -L -o inpaint.h https://huggingface.co/spaces/bigslime/stablediffusion-infinity/resolve/main/PyPatchMatch/csrc/inpaint.h
959 Bytes
| class Inpainting { | |
| public: | |
| Inpainting(cv::Mat image, cv::Mat mask, const PatchDistanceMetric *metric); | |
| Inpainting(cv::Mat image, cv::Mat mask, cv::Mat global_mask, const PatchDistanceMetric *metric); | |
| cv::Mat run(bool verbose = false, bool verbose_visualize = false, unsigned int random_seed = 1212); | |
| private: | |
| void _initialize_pyramid(void); | |
| MaskedImage _expectation_maximization(MaskedImage source, MaskedImage target, int level, bool verbose); | |
| void _expectation_step(const NearestNeighborField &nnf, bool source2target, cv::Mat &vote, const MaskedImage &source, bool upscaled); | |
| void _maximization_step(MaskedImage &target, const cv::Mat &vote); | |
| MaskedImage m_initial; | |
| std::vector<MaskedImage> m_pyramid; | |
| NearestNeighborField m_source2target; | |
| NearestNeighborField m_target2source; | |
| const PatchDistanceMetric *m_distance_metric; | |
| }; | |