omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Machine Learning

    Pythonista
    neural network machine learnin
    8
    68
    36369
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jmv38
      jmv38 @cvp last edited by

      @cvp hello
      i tried your code: it works fine on my ipad. No error.
      But i can scroll only horizontally. How could i scroll vertically too?
      thanks.

      cvp 2 Replies Last reply Reply Quote 0
      • cvp
        cvp @jmv38 last edited by

        @jmv38 I think your view does not need to scroll vertically.
        If I add a label at y=1000, vertical scroll with two fingers works

        1 Reply Last reply Reply Quote 0
        • cvp
          cvp @Matteo last edited by cvp

          @Matteo I suppose it is a problem for @jmv38 , he will need at least the line number

          1 Reply Last reply Reply Quote 0
          • cvp
            cvp @jmv38 last edited by

            @jmv38 uncomment my line

            print(w,h,wm,hm)
            

            To check vertical dimension and usage

            1 Reply Last reply Reply Quote 0
            • jmv38
              jmv38 @Matteo last edited by

              @Matteo for your request 2/: it already works. Dont press reset, just start another drawing in one of the boxes and it will replace the previous one. Then tap train.

              1 Reply Last reply Reply Quote 1
              • Matteo
                Matteo last edited by

                Hi @jmv38 , I'm sorry for the delay, I've been busy and never used Pythonista for one week..Now I tested something and solved the problem related to integer argument expected of version 14 by adding int(argument) where needed in your code and since I use python 2.7 by default, I forgot to put the command #!python3 on the first line of the script (without it I had another problem with python 2.7). Now all work well!

                For request 2 about erasing only one draw, I can't understand, sorry: if I try to draw something else on the square the old draw remains. Am I wrong?

                Anyway thank you again (also @cvp) for support.
                Regards

                cvp 1 Reply Last reply Reply Quote 0
                • cvp
                  cvp @Matteo last edited by cvp

                  @Matteo For your request 2, when you draw on an existing drawing, this one stays until you terminate your move, when your finger leaves the screen.

                  Matteo 1 Reply Last reply Reply Quote 0
                  • Matteo
                    Matteo @cvp last edited by

                    @cvp Hi, sorry but it doesn't work with me , the reason could be I use Pythonista 3.1 (301016)?
                    When I draw something on a square, leave my finger from the screen, try to draw something else on the same square by touching again the screen on the square, and leave my finger from the screen , the old draw remains, it doesn't disappear to show anly the new one.

                    But don't worry, it is not so important, the script works well now.
                    Thank you
                    Bye

                    cvp 1 Reply Last reply Reply Quote 0
                    • cvp
                      cvp @Matteo last edited by

                      @Matteo You're right, but try after a training run. If I redraw before the training, both drawings stay, if I redraw after a training, the first drawing disappears

                      Matteo 1 Reply Last reply Reply Quote 1
                      • mkeywood
                        mkeywood @jmv38 last edited by

                        @jmv38 No problem at all 😀

                        1 Reply Last reply Reply Quote 0
                        • st84
                          st84 last edited by

                          Hi @jmv38, great job!

                          Not sure if you have already known that coreML can be used in Pythonista. Snippet in OMZ’s gist.

                          Cheers.

                          jmv38 1 Reply Last reply Reply Quote 0
                          • Matteo
                            Matteo @cvp last edited by Matteo

                            @cvp Yes, in this way it works! Thank you @cvp.

                            @jmv38 and @mkeywood : can the script recognize also the same picture drew in different positions inside the three squares? I tried it but maybe I'm wrong with something because it doesn't work, I mean if I draw the same picture in different positions, I can't obtain the good choice of the picture inside the guess square.

                            Thank you
                            Regards

                            jmv38 1 Reply Last reply Reply Quote 0
                            • jmv38
                              jmv38 @st84 last edited by

                              @st84 hi. I dont see which omz post you are referring to. Can you put a link? thanks

                              cvp 1 Reply Last reply Reply Quote 0
                              • jmv38
                                jmv38 @Matteo last edited by jmv38

                                @Matteo my version ofthe script tries to recognize 3 different objects. So draw the same object in 2 boxes will not work: the software assumes they are different.
                                The initial version of mkeywood is different.

                                1 Reply Last reply Reply Quote 0
                                • cvp
                                  cvp @jmv38 last edited by

                                  @jmv38 here

                                  jmv38 1 Reply Last reply Reply Quote 0
                                  • jmv38
                                    jmv38 @cvp last edited by

                                    @cvp and @st84 thank you.
                                    it is very powerfull. But somewhat opaque.
                                    Do you know

                                    • how much memory is used? where is the model stored?
                                    • what is the NN structure?
                                    • is it fully local?
                                      Thanks
                                    cvp 1 Reply Last reply Reply Quote 0
                                    • cvp
                                      cvp @jmv38 last edited by cvp

                                      @jmv38 the models are downloaded from https://docs-assets.developer.apple.com/coreml/models/MobileNet.mlmodel and copied in a local file, then next time, it is entirely local.

                                      Big file of 170 MB

                                      jmv38 1 Reply Last reply Reply Quote 0
                                      • jmv38
                                        jmv38 @cvp last edited by

                                        @cvp thanks
                                        more in https://arxiv.org/pdf/1704.04861.pdf

                                        cvp 1 Reply Last reply Reply Quote 0
                                        • cvp
                                          cvp @jmv38 last edited by

                                          @jmv38 this is interesting

                                          jmv38 1 Reply Last reply Reply Quote 0
                                          • jmv38
                                            jmv38 @cvp last edited by

                                            @cvp thanks.

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Powered by NodeBB Forums | Contributors