add anime segmentation
This commit is contained in:
@@ -687,6 +687,15 @@ export default function Editor() {
|
||||
}
|
||||
}, [runRenderablePlugin])
|
||||
|
||||
useEffect(() => {
|
||||
emitter.on(PluginName.AnimeSeg, () => {
|
||||
runRenderablePlugin(PluginName.AnimeSeg)
|
||||
})
|
||||
return () => {
|
||||
emitter.off(PluginName.AnimeSeg)
|
||||
}
|
||||
}, [runRenderablePlugin])
|
||||
|
||||
useEffect(() => {
|
||||
emitter.on(PluginName.GFPGAN, () => {
|
||||
runRenderablePlugin(PluginName.GFPGAN)
|
||||
|
||||
@@ -147,7 +147,7 @@ const Header = () => {
|
||||
}}
|
||||
accept="image/png, image/jpeg"
|
||||
/>
|
||||
Mask
|
||||
M
|
||||
</Button>
|
||||
</label>
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
ChevronRightIcon,
|
||||
FaceIcon,
|
||||
HobbyKnifeIcon,
|
||||
PersonIcon,
|
||||
MixIcon,
|
||||
} from '@radix-ui/react-icons'
|
||||
import { useToggle } from 'react-use'
|
||||
@@ -20,6 +21,7 @@ import Button from '../shared/Button'
|
||||
|
||||
export enum PluginName {
|
||||
RemoveBG = 'RemoveBG',
|
||||
AnimeSeg = 'AnimeSeg',
|
||||
RealESRGAN = 'RealESRGAN',
|
||||
GFPGAN = 'GFPGAN',
|
||||
RestoreFormer = 'RestoreFormer',
|
||||
@@ -32,6 +34,10 @@ const pluginMap = {
|
||||
IconClass: HobbyKnifeIcon,
|
||||
showName: 'RemoveBG',
|
||||
},
|
||||
[PluginName.AnimeSeg]: {
|
||||
IconClass: PersonIcon,
|
||||
showName: 'Anime Segmentation',
|
||||
},
|
||||
[PluginName.RealESRGAN]: {
|
||||
IconClass: BoxModelIcon,
|
||||
showName: 'RealESRGAN 4x',
|
||||
@@ -46,7 +52,7 @@ const pluginMap = {
|
||||
},
|
||||
[PluginName.InteractiveSeg]: {
|
||||
IconClass: CursorArrowRaysIcon,
|
||||
showName: 'Interactive Seg',
|
||||
showName: 'Interactive Segmentation',
|
||||
},
|
||||
[PluginName.MakeGIF]: {
|
||||
IconClass: GifIcon,
|
||||
|
||||
Reference in New Issue
Block a user