Removing Presenter From Slides

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
4
down vote

favorite
1












Often you can find slide presentation where the presenter is also shown on the same slide:



enter image description here



When no pdf slides are available, I sometimes take scree shots of the video. However, I would like to remove the presenter, if possible.



In Mathematica there is the FindFaces function. It could be used to identify the person, but then I don't know how to cut it out accurately... ?



The result should look like this:



enter image description here



Do you know how I could do that ? ... and if not in Mathematica, do you know any other software?










share|improve this question

























    up vote
    4
    down vote

    favorite
    1












    Often you can find slide presentation where the presenter is also shown on the same slide:



    enter image description here



    When no pdf slides are available, I sometimes take scree shots of the video. However, I would like to remove the presenter, if possible.



    In Mathematica there is the FindFaces function. It could be used to identify the person, but then I don't know how to cut it out accurately... ?



    The result should look like this:



    enter image description here



    Do you know how I could do that ? ... and if not in Mathematica, do you know any other software?










    share|improve this question























      up vote
      4
      down vote

      favorite
      1









      up vote
      4
      down vote

      favorite
      1






      1





      Often you can find slide presentation where the presenter is also shown on the same slide:



      enter image description here



      When no pdf slides are available, I sometimes take scree shots of the video. However, I would like to remove the presenter, if possible.



      In Mathematica there is the FindFaces function. It could be used to identify the person, but then I don't know how to cut it out accurately... ?



      The result should look like this:



      enter image description here



      Do you know how I could do that ? ... and if not in Mathematica, do you know any other software?










      share|improve this question













      Often you can find slide presentation where the presenter is also shown on the same slide:



      enter image description here



      When no pdf slides are available, I sometimes take scree shots of the video. However, I would like to remove the presenter, if possible.



      In Mathematica there is the FindFaces function. It could be used to identify the person, but then I don't know how to cut it out accurately... ?



      The result should look like this:



      enter image description here



      Do you know how I could do that ? ... and if not in Mathematica, do you know any other software?







      image-processing






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 1 hour ago









      james

      716418




      716418




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          4
          down vote













          This is an entertaining question. We'll use some neural networks from the neural network repository to attempt to solve it.



          We'll use Ademxapp model, so here's a function to evaluate the net and give us back masks for each type of object it detects.



          netevaluate[img_, device_: "CPU"] := 
          Block[net, resized, encData, dec, mean, var, prob,
          net = NetModel["Ademxapp Model A1 Trained on ADE20K Data"];
          resized = ImageResize[img, 504];
          encData = Normal@NetExtract[net, "Input"];
          dec = NetExtract[net, "Output"];
          mean, var = Lookup[encData, "MeanImage", "VarianceImage"];
          prob = NetReplacePart[
          net, "Input" ->
          NetEncoder["Image", ImageDimensions@resized,
          "MeanImage" -> mean, "VarianceImage" -> var],
          "Output" -> Automatic][resized, TargetDevice -> device];
          prob = ArrayResample[prob, Append[Reverse@ImageDimensions@img, 150]];
          dec[prob]]


          Now we'll write a function to only get data about people in the image. Now, from the documentation in the repository, I know that the label for the "person" mask is 13, and that's the only mask that we care about.



          getPeople[i_] := Map[ReplaceAll[13 -> 1, _ -> 0], netevaluate[i], 2] // Image


          getPeople example



          Now we can simply get the largest item in that mask and remove it. We could try Inpaint but it didn't work very well on this image.



          removePresenter[i_] := ImageAdd[i, Dilation[SelectComponents[getPeople[i], "Count", -1], 3]]


          removepresenter example



          Try playing with the argument to Dilation if it doesn't take enough of the presenter. I would also consider changing the neural network for others in the "Semantic Segmentation" section if this one isn't accurate enough for you.






          share|improve this answer




















            Your Answer




            StackExchange.ifUsing("editor", function ()
            return StackExchange.using("mathjaxEditing", function ()
            StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
            StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
            );
            );
            , "mathjax-editing");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "387"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f183204%2fremoving-presenter-from-slides%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            4
            down vote













            This is an entertaining question. We'll use some neural networks from the neural network repository to attempt to solve it.



            We'll use Ademxapp model, so here's a function to evaluate the net and give us back masks for each type of object it detects.



            netevaluate[img_, device_: "CPU"] := 
            Block[net, resized, encData, dec, mean, var, prob,
            net = NetModel["Ademxapp Model A1 Trained on ADE20K Data"];
            resized = ImageResize[img, 504];
            encData = Normal@NetExtract[net, "Input"];
            dec = NetExtract[net, "Output"];
            mean, var = Lookup[encData, "MeanImage", "VarianceImage"];
            prob = NetReplacePart[
            net, "Input" ->
            NetEncoder["Image", ImageDimensions@resized,
            "MeanImage" -> mean, "VarianceImage" -> var],
            "Output" -> Automatic][resized, TargetDevice -> device];
            prob = ArrayResample[prob, Append[Reverse@ImageDimensions@img, 150]];
            dec[prob]]


            Now we'll write a function to only get data about people in the image. Now, from the documentation in the repository, I know that the label for the "person" mask is 13, and that's the only mask that we care about.



            getPeople[i_] := Map[ReplaceAll[13 -> 1, _ -> 0], netevaluate[i], 2] // Image


            getPeople example



            Now we can simply get the largest item in that mask and remove it. We could try Inpaint but it didn't work very well on this image.



            removePresenter[i_] := ImageAdd[i, Dilation[SelectComponents[getPeople[i], "Count", -1], 3]]


            removepresenter example



            Try playing with the argument to Dilation if it doesn't take enough of the presenter. I would also consider changing the neural network for others in the "Semantic Segmentation" section if this one isn't accurate enough for you.






            share|improve this answer
























              up vote
              4
              down vote













              This is an entertaining question. We'll use some neural networks from the neural network repository to attempt to solve it.



              We'll use Ademxapp model, so here's a function to evaluate the net and give us back masks for each type of object it detects.



              netevaluate[img_, device_: "CPU"] := 
              Block[net, resized, encData, dec, mean, var, prob,
              net = NetModel["Ademxapp Model A1 Trained on ADE20K Data"];
              resized = ImageResize[img, 504];
              encData = Normal@NetExtract[net, "Input"];
              dec = NetExtract[net, "Output"];
              mean, var = Lookup[encData, "MeanImage", "VarianceImage"];
              prob = NetReplacePart[
              net, "Input" ->
              NetEncoder["Image", ImageDimensions@resized,
              "MeanImage" -> mean, "VarianceImage" -> var],
              "Output" -> Automatic][resized, TargetDevice -> device];
              prob = ArrayResample[prob, Append[Reverse@ImageDimensions@img, 150]];
              dec[prob]]


              Now we'll write a function to only get data about people in the image. Now, from the documentation in the repository, I know that the label for the "person" mask is 13, and that's the only mask that we care about.



              getPeople[i_] := Map[ReplaceAll[13 -> 1, _ -> 0], netevaluate[i], 2] // Image


              getPeople example



              Now we can simply get the largest item in that mask and remove it. We could try Inpaint but it didn't work very well on this image.



              removePresenter[i_] := ImageAdd[i, Dilation[SelectComponents[getPeople[i], "Count", -1], 3]]


              removepresenter example



              Try playing with the argument to Dilation if it doesn't take enough of the presenter. I would also consider changing the neural network for others in the "Semantic Segmentation" section if this one isn't accurate enough for you.






              share|improve this answer






















                up vote
                4
                down vote










                up vote
                4
                down vote









                This is an entertaining question. We'll use some neural networks from the neural network repository to attempt to solve it.



                We'll use Ademxapp model, so here's a function to evaluate the net and give us back masks for each type of object it detects.



                netevaluate[img_, device_: "CPU"] := 
                Block[net, resized, encData, dec, mean, var, prob,
                net = NetModel["Ademxapp Model A1 Trained on ADE20K Data"];
                resized = ImageResize[img, 504];
                encData = Normal@NetExtract[net, "Input"];
                dec = NetExtract[net, "Output"];
                mean, var = Lookup[encData, "MeanImage", "VarianceImage"];
                prob = NetReplacePart[
                net, "Input" ->
                NetEncoder["Image", ImageDimensions@resized,
                "MeanImage" -> mean, "VarianceImage" -> var],
                "Output" -> Automatic][resized, TargetDevice -> device];
                prob = ArrayResample[prob, Append[Reverse@ImageDimensions@img, 150]];
                dec[prob]]


                Now we'll write a function to only get data about people in the image. Now, from the documentation in the repository, I know that the label for the "person" mask is 13, and that's the only mask that we care about.



                getPeople[i_] := Map[ReplaceAll[13 -> 1, _ -> 0], netevaluate[i], 2] // Image


                getPeople example



                Now we can simply get the largest item in that mask and remove it. We could try Inpaint but it didn't work very well on this image.



                removePresenter[i_] := ImageAdd[i, Dilation[SelectComponents[getPeople[i], "Count", -1], 3]]


                removepresenter example



                Try playing with the argument to Dilation if it doesn't take enough of the presenter. I would also consider changing the neural network for others in the "Semantic Segmentation" section if this one isn't accurate enough for you.






                share|improve this answer












                This is an entertaining question. We'll use some neural networks from the neural network repository to attempt to solve it.



                We'll use Ademxapp model, so here's a function to evaluate the net and give us back masks for each type of object it detects.



                netevaluate[img_, device_: "CPU"] := 
                Block[net, resized, encData, dec, mean, var, prob,
                net = NetModel["Ademxapp Model A1 Trained on ADE20K Data"];
                resized = ImageResize[img, 504];
                encData = Normal@NetExtract[net, "Input"];
                dec = NetExtract[net, "Output"];
                mean, var = Lookup[encData, "MeanImage", "VarianceImage"];
                prob = NetReplacePart[
                net, "Input" ->
                NetEncoder["Image", ImageDimensions@resized,
                "MeanImage" -> mean, "VarianceImage" -> var],
                "Output" -> Automatic][resized, TargetDevice -> device];
                prob = ArrayResample[prob, Append[Reverse@ImageDimensions@img, 150]];
                dec[prob]]


                Now we'll write a function to only get data about people in the image. Now, from the documentation in the repository, I know that the label for the "person" mask is 13, and that's the only mask that we care about.



                getPeople[i_] := Map[ReplaceAll[13 -> 1, _ -> 0], netevaluate[i], 2] // Image


                getPeople example



                Now we can simply get the largest item in that mask and remove it. We could try Inpaint but it didn't work very well on this image.



                removePresenter[i_] := ImageAdd[i, Dilation[SelectComponents[getPeople[i], "Count", -1], 3]]


                removepresenter example



                Try playing with the argument to Dilation if it doesn't take enough of the presenter. I would also consider changing the neural network for others in the "Semantic Segmentation" section if this one isn't accurate enough for you.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 1 hour ago









                Carl Lange

                1,113216




                1,113216



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f183204%2fremoving-presenter-from-slides%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    What does second last employer means? [closed]

                    Installing NextGIS Connect into QGIS 3?

                    One-line joke