feat: Implement cutout tool and depth generation features
- Added a new cutout tool for selecting regions in images, allowing users to choose mesh shapes based on selected areas. - Introduced depth generation capabilities for rasterized images, including normal data extraction. - Created jobs for generating depth planes and region data, enhancing the AI data generation workflow. - Developed a selection refinement process for cutout regions, improving accuracy in generated outputs. - Established a new region module for handling rasterized image regions and their associated AI generation tasks. - Enhanced node graph builders for asset generation, facilitating smoother integration of new features.
This commit is contained in:
@@ -927,6 +927,13 @@ class WorkerTest(unittest.TestCase):
|
||||
self.assertEqual(result.mode, "RGBA")
|
||||
self.assertEqual(result.size, (20, 12))
|
||||
alpha = np.asarray(result.getchannel("A"))
|
||||
expected_alpha = np.asarray(
|
||||
Image.fromarray(pixels[:, :, 3], mode="L").resize(
|
||||
result.size,
|
||||
Image.Resampling.LANCZOS,
|
||||
)
|
||||
)
|
||||
np.testing.assert_array_equal(alpha, expected_alpha)
|
||||
self.assertLess(
|
||||
int(alpha[:, 0].max()),
|
||||
int(alpha[:, -1].min()),
|
||||
|
||||
Reference in New Issue
Block a user