Articles on sakshamarora's Bloghttps://blogs.python-gsoc.orgUpdates on different articles published on sakshamarora's BlogenMon, 31 Aug 2020 16:27:58 +0000Final Work Report - Last Weekly Check-inhttps://blogs.python-gsoc.org/en/sakshamaroras-blog/final-work-report-last-weekly-check-in/<h1><span style="color: #4e5f70;"><span style="font-size: 26px;"><strong>End of my GSoC journey - 31/08/2020</strong></span></span></h1> <p><span style="font-size: 14px;"><span>My GSoC'20 journey end today. </span></span><span style="font-size: 14px;">This summer was a truly an amazing journey and surely an unforgettable one!</span></p> <p><span style="font-size: 14px;">I would like to thank my mentors <a href="https://github.com/pdxjohnny">John Andersen</a> for guiding me and being a very patient &amp; supportive mentor, <a href="https://github.com/yashlamba">Yash Lamba</a> for being supportive &amp; understanding and <a href="https://github.com/sudharsana-kjl">Sudharsana</a> for being helpful throughout my journey. Their guidance and support is the reason why this project was successful. I have learnt a ton of important things from them.</span></p> <p><span style="font-size: 14px;">I'd also like to thank my fellow GSoC students <a href="http://github.com/0dust">Himanshu Tripathi</a> and <a href="http://github.com/aghinsa">Aghin Shah Alin</a> for helping me during the summer.</span></p> <p><span style="font-size: 14px;">Thank you to Google and Python Software Foundation for providing this opportunity!</span></p> <h2><br> <span style="color: #4e5f70;"><span style="font-size: 18px;"><u><strong>What did you do this week?</strong></u></span></span></h2> <p><span style="font-size: 14px;"><span>I finalized the <a href="https://github.com/intel/dffml/pull/839">Custom Neural Networks PR</a>, so to summarize what this PR adds are the following stuff:</span></span></p> <p><span style="font-size: 14px;"><span>1. Create custom neural networks using config files for performing image processing tasks. </span><br> <span>2. Replace last layer of torchvision pre-trained models to perform classification using powerful architectures.</span><br> <span>3. Entrypoint style loading of Loss functions to modify their parameters.</span><br> <span>4. Accommodate image processing tasks other than image classification.</span><br> <span>5. Tests and example tutorial for creating networks using DFFML to classify Rock Paper Scissors hand poses.</span></span></p> <p> </p> <h1><span style="font-size: 26px;"><span style="color: #4e5f70;"><strong>Final Report and Future Work</strong></span></span></h1> <h2>Aim</h2> <p><span style="font-size: 14px;">Add ways of training and testing machine learning models in DFFML on image datasets and perform image processing and computer vision tasks via DFFML.</span></p> <p><span style="font-size: 14px;">The project is divided into 2 parts:</span></p> <ol> <li><span style="font-size: 14px;">Wrapping the image processing libraries namely OpenCV and Scikit-Image.</span></li> <li><span style="font-size: 14px;">High Level Operation Workflow, i.e., Custom Operations which will act as high level operations implementing a predefined flow of OpenCV and Scikit-Image functions.</span></li> </ol> <p> </p> <h2>Modifications to the proposal and scope of the project</h2> <p><span style="font-size: 14px;">During the summer, the proposed work was modified to achieve better results. The finalized work done in the project:</span></p> <ol> <li><span style="font-size: 14px;">Wrapping important image pre-processing functions as DFFML operations.</span></li> <li><span style="font-size: 14px;">PyTorch based pre-trained Convolutional Networks for image classification.</span></li> <li><span style="font-size: 14px;">Custom Neural Networks for image pre-processing and classification tasks via DFFML.</span></li> </ol> <p> </p> <h2>Project Tasks Completed</h2> <ul> <li> <p><span style="font-size: 14px;">Sources for reading and pre-processing of image datasets</span></p> <p><span style="font-size: 14px;">To enable working with image datasets and pre-process these datasets, the Directory source and DataFlow pre-processing source were added. The Directory source is used to read images stored in a directory format and DataFlow pre-processing source is used to modify the data using DFFML operations and creating a flow of operations to run the data through. The edit command uses DataFlow pre-processing Source to modify records using operations and provides an option to overwrite modified records on old records.</span></p> <p><span style="font-size: 14px;"><strong>Related Links:</strong></span></p> <ul> <li><span style="font-size: 14px;"><a href="https://github.com/intel/dffml/pull/604">https://github.com/intel/dffml/pull/604</a></span> <ul> <li><span style="font-size: 14px;">DataFlow pre-processing Source</span></li> </ul> </li> <li><span style="font-size: 14px;"><a href="https://github.com/intel/dffml/pull/824">https://github.com/intel/dffml/pull/824</a></span> <ul> <li><span style="font-size: 14px;">Doctestable Example for DataFlow pre-processing Source</span></li> </ul> </li> <li><span style="font-size: 14px;"><a href="https://github.com/intel/dffml/pull/644">https://github.com/intel/dffml/pull/644</a></span> <ul> <li><span style="font-size: 14px;">Edit command to edit records present in a source</span></li> <li><span style="font-size: 14px;"><a href="https://intel.github.io/dffml/master/cli.html#all">https://intel.github.io/dffml/master/cli.html#all</a></span></li> </ul> </li> <li><span style="font-size: 14px;"><a href="https://github.com/intel/dffml/pull/718">https://github.com/intel/dffml/pull/718</a></span> <ul> <li><span style="font-size: 14px;">Directory Source</span></li> </ul> </li> </ul> </li> <li> <p><span style="font-size: 14px;">Image Processing Operations</span></p> <p><span style="font-size: 14px;">Added DFFML operations that wrap functions from OpenCV for pre-processing images after reading the image dataset from the source provided. The operations are put in a flow through which the image data runs by and is pre-processed before they are feeded to a machine learning model in DFFML for performing various tasks such as image classification!</span></p> <p><span style="font-size: 14px;"><strong>Related Links:</strong></span></p> <ul> <li><span style="font-size: 14px;"><a href="https://github.com/intel/dffml/pull/709">https://github.com/intel/dffml/pull/709</a></span> <ul> <li><span style="font-size: 14px;">Added OpenCV functions as DFFML operations</span></li> <li><span style="font-size: 14px;"><strong>PyPi:</strong> <a href="https://pypi.org/project/dffml-operations-image/">https://pypi.org/project/dffml-operations-image/</a></span></li> </ul> </li> <li><span style="font-size: 14px;"><a href="https://github.com/intel/dffml/pull/731">https://github.com/intel/dffml/pull/731</a></span> <ul> <li><span style="font-size: 14px;">Added more pre-processing functions and support for default values in operations</span></li> </ul> </li> </ul> </li> <li> <p><span style="font-size: 14px;">Convolutional Neural Networks</span></p> <p><span style="font-size: 14px;">Visual data being very complex and containing high dimensions of features of same type in different orientation can be very hard to classify using classification models such as RandomForestClassifier, KNearestNeighbours, etc. This is where powerful deep learning models come into the picture. Deep learning networks like Convolutional Neural Networks offer great accuracy and versatility for tasks such as image classification, object detections, etc.</span></p> <p><span style="font-size: 14px;">By adding Convolutional Neural Networks to DFFML, it becomes very easy to perform image processing techniques and get great results by using Transfer Learning or creating custom networks.</span></p> <p><span style="font-size: 14px;"><strong>Related Links:</strong></span></p> <ul> <li><span style="font-size: 14px;"><a href="https://github.com/intel/dffml/pull/784">https://github.com/intel/dffml/pull/784</a></span> <ul> <li><span style="font-size: 14px;">Transfer learning PyTorch based models with dynamic loading for image classification &amp; add documentations and tests for the same</span></li> <li><span style="font-size: 14px;"><strong>PyPi:</strong> <a href="https://pypi.org/project/dffml-model-pytorch/">https://pypi.org/project/dffml-model-pytorch/</a></span></li> </ul> </li> <li><span style="font-size: 14px;"><a href="https://github.com/intel/dffml/pull/777">https://github.com/intel/dffml/pull/777</a></span> <ul> <li><span style="font-size: 14px;">Added example usages for classifying flower species using OpenCV and Transfer Learning approach and added tests for the examples</span></li> </ul> </li> <li><span style="font-size: 14px;"><a href="https://github.com/intel/dffml/pull/839">https://github.com/intel/dffml/pull/839</a></span> <ul> <li><span style="font-size: 14px;">Custom Neural Networks, custom layer addition support, loss entrypoint classes along with their example usage and tests</span></li> </ul> </li> </ul> </li> <li> <p><span style="font-size: 14px;">Many other important features that aided the addition and proper functioning of image processing tasks in DFFML are listed below:</span></p> <p><span style="font-size: 14px;"><strong>Related Links:</strong></span></p> <ul> <li><span style="font-size: 14px;"><a href="https://github.com/intel/dffml/pull/708">https://github.com/intel/dffml/pull/708</a></span> <ul> <li><span style="font-size: 14px;">Improve String Representation for better viewing of image records</span></li> </ul> </li> <li><span style="font-size: 14px;"><a href="https://github.com/intel/dffml/pull/768">https://github.com/intel/dffml/pull/768</a></span> <ul> <li><span style="font-size: 14px;">Added support for loading images from fle formats namely JPEG, PNG and TIFF</span></li> <li><span style="font-size: 14px;"><strong>PyPi:</strong> <a href="https://pypi.org/project/dffml-config-image/">https://pypi.org/project/dffml-config-image/</a></span></li> </ul> </li> <li><span style="font-size: 14px;"><a href="https://github.com/intel/dffml/pull/771">https://github.com/intel/dffml/pull/771</a></span> <ul> <li><span style="font-size: 14px;">Add ability to add operations while creating a dataflow with different names so as to use same operations for different tasks in a single dataflow</span></li> </ul> </li> <li><span style="font-size: 14px;"><a href="https://github.com/intel/dffml/pull/838">https://github.com/intel/dffml/pull/838</a></span> <ul> <li><span style="font-size: 14px;">Ability to load YAML/JSON file formats as dictionaries via DFFML CLI</span></li> </ul> </li> </ul> </li> </ul> <p> </p> <h2>Future Work</h2> <p><span style="font-size: 14px;">DFFML is a machine learning based project which aligns with my interest in the field, so I will be more than happy to stay a part of the community to keep contributing and learning!</span></p> <p><span style="font-size: 14px;">Goals for future contributions:</span></p> <ol> <li><span style="font-size: 14px;">Adding more image processing techniques.</span></li> <li><span style="font-size: 14px;">Adding image processing examples via DFFML's PyTorch model plugin such as image colorization.</span></li> <li><span style="font-size: 14px;">Connecting Transfer Learning models with custom Neural Networks to use powerful architectures for different Computer Vision tasks.</span></li> <li><span style="font-size: 14px;">Contribute to DFFML's Web UI.</span></li> </ol> <p> </p> <p><span style="font-size: 14px;"><span>Link to read the complete final report: </span><a href="http://gist.github.com/sakshamarora1/642308f70bdd761d902a608582d16979"><span>GSoC2020FinalReport.md</span></a></span></p> <p><br> <span style="font-size: 14px;"><span><em>Thank you for reading!</em></span></span></p>sakshamarora1001@gmail.com (sakshamarora)Mon, 31 Aug 2020 16:27:58 +0000https://blogs.python-gsoc.org/en/sakshamaroras-blog/final-work-report-last-weekly-check-in/The Final Week - Weekly Check-in 13https://blogs.python-gsoc.org/en/sakshamaroras-blog/the-final-week-weekly-check-in-13/<p><span style="color: #4e5f70;"><span style="font-size: 26px;"><strong>End of Week 12  - 24/08/2020</strong></span></span></p> <p><br> <span style="color: #4e5f70;"><span style="font-size: 18px;"><u><strong>What did you do this week?</strong></u></span></span></p> <p><span style="font-size: 16px;">I added Entrypoints for loss functions in PyTorch to expose their parameters for tweaking. The optimizer functions in the official PyTorch library don't have parameter annotations as they are still working on adding annotations to everything in the PyTorch library, so I will be adding PyTorch optimizer entrypoints when a new <em>torch</em> release comes out! Now onto the final report! :D </span><br> <br> <span style="color: #4e5f70;"><span style="font-size: 18px;"><u><strong>What is coming up next?</strong></u></span></span></p> <p><span style="font-size: 16px;">As the coding period has officially ended, I will be writing my Final Submission Report this week!</span><br> <br> <span style="color: #4e5f70;"><span style="font-size: 18px;"><strong><u>Did you get stuck anywhere?</u></strong></span></span></p> <p><span style="font-size: 16px;">I got stuck with the entrypoint loading in DFFML while adding options to choose loss and optimizer functions and tweak their parameters. After discussion with the mentor we figured out and solved the problem!</span></p> <p><br> <span style="font-size: 16px;"><em>Thank you for reading!</em></span></p>sakshamarora1001@gmail.com (sakshamarora)Mon, 24 Aug 2020 16:35:52 +0000https://blogs.python-gsoc.org/en/sakshamaroras-blog/the-final-week-weekly-check-in-13/Custom Neural Networks - Weekly Check-in 12https://blogs.python-gsoc.org/en/sakshamaroras-blog/custom-neural-networks-weekly-check-in-12/<p><span style="color: #4e5f70;"><span style="font-size: 26px;"><strong>End of Week 11  - 17/08/2020</strong></span></span></p> <p><br> <span style="font-size: 18px;"><span style="color: #4e5f70;"><u><strong>What did you do this week?</strong></u></span></span></p> <p><span style="font-size: 16px;">This week I worked on polishing the way one can create a use a custom neural network using DFFML. I will continue working on it and discussing with mentors on this front this week and then move onto the various applications of neural networks! </span><br> <br> <span style="color: #4e5f70;"><span style="font-size: 18px;"><u><strong>What is coming up next?</strong></u></span></span></p> <p><span style="font-size: 16px;">Continuing from last week's plans, I will work on making the code flexible to extend applications of CNNs in DFFML beyond classification tasks and support other neural network applications.</span><br> <br> <span style="color: #4e5f70;"><span style="font-size: 18px;"><strong><u>Did you get stuck anywhere?</u></strong></span></span></p> <p><span style="font-size: 16px;">I am currently working on making the PyTorch model plugin code flexible. Getting stuck at a few places but tackling all the issues one by one. :D</span></p> <p><br> <span style="font-size: 16px;"><em>Thank you for reading!</em></span></p>sakshamarora1001@gmail.com (sakshamarora)Mon, 17 Aug 2020 17:32:41 +0000https://blogs.python-gsoc.org/en/sakshamaroras-blog/custom-neural-networks-weekly-check-in-12/Extending CNNs beyond classification - Weekly Check-in 11https://blogs.python-gsoc.org/en/sakshamaroras-blog/extending-cnns-beyond-classification-weekly-check-in-11/<p><span style="color: #4e5f70;"><span style="font-size: 26px;"><strong>End of Week 10  - 10/08/2020</strong></span></span></p> <p><br> <span style="color: #4e5f70;"><span style="font-size: 18px;"><u><strong>What did you do this week?</strong></u></span></span></p> <p><span style="font-size: 16px;">Iterating on last week's trial and error work on making it easier to add and connect Neural Networks (using the PyTorch library), this week, I made progress on that part! After discussions with the mentors, I devised a way to create and connect Neural networks that will make playing with neural networks easy and accessible to everyone! I am currently working on extending the applications of CNNs beyond classification and have support for various tasks that use CNNs. </span><br> <br> <span style="color: #4e5f70;"><span style="font-size: 18px;"><u><strong>What is coming up next?</strong></u></span></span></p> <p><span style="font-size: 16px;">I will continue working on Computer Vision related Custom Neural Networks and work on making the code flexible so as to not be confined to only classification applications of CNNs which is currently the case in the <a href="https://pypi.org/project/dffml-model-pytorch">DFFML PyTorch model plugin</a>.</span><br> <br> <span style="font-size: 18px;"><span style="color: #4e5f70;"><strong><u>Did you get stuck anywhere?</u></strong></span></span></p> <p><span style="font-size: 16px;">Yes, I got stuck at finding a way to make adding the neural networks using JSON and YAML files as flexible as possible so as to make adding neural networks more user friendly. I will discuss my doubts and ideas to tackle this in the next Weekly Sync meeting with the mentors.</span></p> <p><br> <span style="font-size: 16px;"><em>Thank you for reading!</em></span></p>sakshamarora1001@gmail.com (sakshamarora)Mon, 10 Aug 2020 18:05:57 +0000https://blogs.python-gsoc.org/en/sakshamaroras-blog/extending-cnns-beyond-classification-weekly-check-in-11/Phase 3 - Weekly Check-in 10https://blogs.python-gsoc.org/en/sakshamaroras-blog/phase-3-weekly-check-in-10/<p><span style="color: #4e5f70;"><span style="font-size: 26px;"><strong>End of Week 9  - 03/08/2020</strong></span></span></p> <p><br> <span style="color: #4e5f70;"><span style="font-size: 18px;"><u><strong>What did you do this week?</strong></u></span></span></p> <p><span style="font-size: 16px;">This week, I planned on how DFFML will be able to provide a way that will make it very easy to work with Deep Neural Networks. I will be having further discussions with the mentors regarding how we can add support for connecting neural networks and make advanced and intricate architectures.</span> <br> <br> <span style="color: #4e5f70;"><span style="font-size: 18px;"><u><strong>What is coming up next?</strong></u></span></span></p> <p><span style="font-size: 16px;">Next, I will working be on Custom Neural Networks mainly focused on Computer Vision based experiments and examples!</span><br> <br> <span style="font-size: 18px;"><span style="color: #4e5f70;"><strong><u>Did you get stuck anywhere?</u></strong></span></span></p> <p><span style="font-size: 16px;">No, this week was mostly planning for the project ahead.</span></p> <p><br> <span style="font-size: 16px;"><em>Thank you for reading!</em></span></p>sakshamarora1001@gmail.com (sakshamarora)Mon, 03 Aug 2020 18:27:45 +0000https://blogs.python-gsoc.org/en/sakshamaroras-blog/phase-3-weekly-check-in-10/Dynamic Loading - Weekly Check-in 9https://blogs.python-gsoc.org/en/sakshamaroras-blog/dynamic-loading-weekly-check-in-9/<p><span style="color: #4e5f70;"><span style="font-size: 26px;"><strong>End of Week 8  - 27/07/2020</strong></span></span></p> <p><br> <span style="color: #4e5f70;"><span style="font-size: 18px;"><u><strong>What did you do this week?</strong></u></span></span></p> <p><span style="font-size: 16px;">Picking up from last week, I implemented dynamic loading of all the pre-trained torchvision models for image classification. This method creates the ``Model`` classes on the fly using <span style="background-color: #dddddd;">type(), sys.modules and setattr()</span> and loads the weights only for the model that is being used! I discussed with my mentor on more computer vision operations and examples that will be a great addition to DFFML.</span> <br> <br> <span style="font-size: 18px;"><span style="color: #4e5f70;"><u><strong>What is coming up next?</strong></u></span></span></p> <p><span style="font-size: 16px;">After having a discussion with my mentor, we decided that we will work on exposing the optimization and loss function options available in PyTorch and layer support for making custom neural networks in a separate pull request next!</span><br> <br> <span style="color: #4e5f70;"><span style="font-size: 18px;"><strong><u>Did you get stuck anywhere?</u></strong></span></span></p> <p><span style="font-size: 16px;">No, this week went by smoothly!</span></p> <p><br> <span style="font-size: 16px;"><em>Thank you for reading!</em></span></p>sakshamarora1001@gmail.com (sakshamarora)Mon, 27 Jul 2020 15:46:45 +0000https://blogs.python-gsoc.org/en/sakshamaroras-blog/dynamic-loading-weekly-check-in-9/Convolutional Neural Networks - Weekly Check-in 8https://blogs.python-gsoc.org/en/sakshamaroras-blog/convolutional-neural-networks-weekly-check-in-8/<p><span style="color: #4e5f70;"><span style="font-size: 26px;"><strong>End of Week 7  - 20/07/2020</strong></span></span></p> <p><br> <span style="font-size: 18px;"><span style="color: #4e5f70;"><u><strong>What did you do this week?</strong></u></span></span></p> <p><span style="font-size: 16px;">This week I started working on adding pre-trained Convolutional Neural Networks using the PyTorch Library! I have currently added VGG16 and ResNet18 pre-trained Models and will add more after further discussion with my mentor. </span><br> <br> <span style="font-size: 18px;"><span style="color: #4e5f70;"><u><strong>What is coming up next?</strong></u></span></span></p> <p><span style="font-size: 16px;">I will work on exposing the optimizing options available in the PyTorch library through DFFML to get the best results using the added models .</span><br> <br> <span style="font-size: 18px;"><span style="color: #4e5f70;"><strong><u>Did you get stuck anywhere?</u></strong></span></span></p> <p><span style="font-size: 16px;">I got a little confused on whether to split the train data into training and validation sets or not. Eventually I went with providing a splitting argument to split train data into validation and training data sets.</span></p> <p><br> <span style="font-size: 16px;"><em>Thank you for reading!</em></span></p>sakshamarora1001@gmail.com (sakshamarora)Mon, 20 Jul 2020 15:38:08 +0000https://blogs.python-gsoc.org/en/sakshamaroras-blog/convolutional-neural-networks-weekly-check-in-8/Image Classification - Weekly Check-in 7https://blogs.python-gsoc.org/en/sakshamaroras-blog/image-classification-weekly-check-in-7/<p><span style="font-size: 28px;"><span style="color: #4e5f70;"><strong>End of Week 6  - 13/07/2020</strong></span></span></p> <p><br> <span style="font-size: 18px;"><span style="color: #4e5f70;"><u><strong>What did you do this week?</strong></u></span></span></p> <p><span style="font-size: 16px;">I added example usage for using the OpenCV image processing operations to pre-process data before feeding into a Scikit-Learn classification model using DFFML's Command Line Interface. The dataset I used is the FLOWER17 dataset, to classify 17 flower species using their color, shape and texture as their feature maps to feed to the model! Although the accuracy isn't quiet good right now but it can get better if more pre-processing is done on the dataset especially if it's a multi-label classification problem. I've also started working to add pre-trained Convolutional Neural Networks.</span><br> <br> <span style="color: #4e5f70;"><span style="font-size: 18px;"><u><strong>What is coming up next?</strong></u></span></span></p> <p><span style="font-size: 16px;">Next, I will be adding pre-trained CNNs for the purpose of Image classification using Transfer Learning to DFFML.</span><br> <br> <span style="color: #4e5f70;"><span style="font-size: 18px;"><strong><u>Did you get stuck anywhere?</u></strong></span></span></p> <p><span style="font-size: 18px;">I had some issues with the performance of my laptop while training and testing on a large dataset of images. I have since shifted to using the Google Cloud Platform as suggested by my mentor and things have been going a lot smoother and faster now! :D</span></p> <p><br> <span style="font-size: 16px;"><em>Thank you for reading!</em></span></p>sakshamarora1001@gmail.com (sakshamarora)Mon, 13 Jul 2020 16:52:25 +0000https://blogs.python-gsoc.org/en/sakshamaroras-blog/image-classification-weekly-check-in-7/Phase 2 - Weekly Check-in 6https://blogs.python-gsoc.org/en/sakshamaroras-blog/phase-2-weekly-check-in-6/<p><span style="font-size: 28px;"><span style="color: #4e5f70;"><strong>End of Week 5  - 06/07/2020</strong></span></span></p> <p><span style="font-size: 16px;">The first phase of GSoC ended and I'm very happy that I passed my first evaluation! At the beginning I was scared and unsure about a lot of things but I was able to make it through thanks to the very supportive mentors and fellow students who helped me! I always tried to give my best in any kind of task and I will continue giving my best in the upcoming weeks!</span></p> <p><br> <span style="color: #4e5f70;"><span style="font-size: 18px;"><u><strong>What did you do this week?</strong></u></span></span></p> <p><span style="font-size: 16px;">This week was a little slow but I did a lot of research on how we can get better accuracy with traditional Computer Vision techniques and what all processing operations are important to achieve this.</span><br> <br> <span style="color: #4e5f70;"><span style="font-size: 18px;"><u><strong>What is coming up next?</strong></u></span></span></p> <p><span style="font-size: 16px;">Next task is to discuss with my mentors and suggest on how the project will be going forward in this phase! I will be adding image processing operations if necessary and will discuss on the possibility of adding deep learning or OpenCV based models to get the best results while doing different computer vision tasks.</span><br> <br> <span style="font-size: 18px;"><span style="color: #4e5f70;"><strong><u>Did you get stuck anywhere?</u></strong></span></span></p> <p><span style="font-size: 16px;">As I was busy making my road-map ahead for the second phase, so I didn't have any major places I got stuck except some errors related to OpenCV functions but I eventually fixed them or went into the depths of internet to find the solution. :P</span></p> <p><br> <span style="font-size: 16px;"><em>Thank you for reading!</em></span></p>sakshamarora1001@gmail.com (sakshamarora)Mon, 06 Jul 2020 18:29:46 +0000https://blogs.python-gsoc.org/en/sakshamaroras-blog/phase-2-weekly-check-in-6/Image Processing Operations Continued - Weekly Check-in 5https://blogs.python-gsoc.org/en/sakshamaroras-blog/image-processing-operations-continued-weekly-check-in-5/<p><span style="color: #4e5f70;"><span style="font-size: 28px;"><strong>End of Week 4  - 29/06/2020</strong></span></span></p> <p><br> <span style="font-size: 18px;"><span style="color: #4e5f70;"><u><strong>What did you do this week?</strong></u></span></span></p> <p><span style="font-size: 16px;">I worked on adding the ability to use default parameters in operations to deal with optional parameters in OpenCV functions and wrote new image processing operations for performing various tasks such as extracting features like shape, color, texture, etc. With the directory source added last week, DFFML can now perform image classification on image datasets present in a directory format using the image processing operations to extract feature vectors to train and test on!</span><br> <br> <span style="color: #4e5f70;"><span style="font-size: 18px;"><u><strong>What is coming up next?</strong></u></span></span></p> <p><span style="font-size: 16px;">I'll continue to add operations and work on documenting how image classification can be done in DFFML using different image processing operations and their combinations to extract suitable feature vectors. For now, the next step is to add local feature extraction techniques such as ORB, KAZE, HOG, and more!</span><br> <br> <span style="font-size: 18px;"><span style="color: #4e5f70;"><strong><u>Did you get stuck anywhere?</u></strong></span></span></p> <p><span style="font-size: 16px;">Just some minor errors here and there. Nothing in particular. :)</span></p> <p><br> <span style="font-size: 16px;"><em>Thank you for reading!</em></span></p>sakshamarora1001@gmail.com (sakshamarora)Mon, 29 Jun 2020 10:07:10 +0000https://blogs.python-gsoc.org/en/sakshamaroras-blog/image-processing-operations-continued-weekly-check-in-5/Image Processing Operations - Weekly Check-in 4https://blogs.python-gsoc.org/en/sakshamaroras-blog/image-processing-operations-weekly-check-in-4/<p><span style="color: #4e5f70;"><span style="font-size: 28px;"><strong>End of Week 3  - 22/06/2020</strong></span></span></p> <p><br> <span style="color: #4e5f70;"><span style="font-size: 18px;"><u><strong>What did you do this week?</strong></u></span></span></p> <p><span style="font-size: 16px;">I worked on finishing up the directory source for reading images and its test cases. The directory source will be able to read images for performing unsupervised classification too! Next, I have started writing new image processing operations for performing various tasks such as extracting features like shape, color, edges and more! </span><br> <br> <span style="font-size: 18px;"><span style="color: #4e5f70;"><u><strong>What is coming up next?</strong></u></span></span></p> <p><span style="font-size: 16px;">I'll continue to add image operations and start working on documenting how image classification will be performed using these operations in DFFML in the coming weeks!</span><br> <br> <span style="font-size: 18px;"><span style="color: #4e5f70;"><strong><u>Did you get stuck anywhere?</u></strong></span></span></p> <p><span style="font-size: 16px;">Got stuck at how the image operations may deal with default and optional parameters, but after discussions with my mentor things got clear.</span></p> <p><br> <span style="font-size: 16px;"><em>Thank you for reading!</em></span></p>sakshamarora1001@gmail.com (sakshamarora)Mon, 22 Jun 2020 15:30:43 +0000https://blogs.python-gsoc.org/en/sakshamaroras-blog/image-processing-operations-weekly-check-in-4/Images Images Images - Weekly Check-in 3https://blogs.python-gsoc.org/en/sakshamaroras-blog/images-images-images-weekly-check-in-3/<p><span style="color: #4e5f70;"><span style="font-size: 28px;"><strong>End of Week 2  - 15/06/2020</strong></span></span></p> <p><br> <span style="font-size: 18px;"><span style="color: #4e5f70;"><u><strong>What did you do this week?</strong></u></span></span></p> <div><span style="font-size: 16px;">I worked on getting the images stored in a directory to enter the network. For training data, the directory source reads the images and labels them with the same name as the sub-folder they are present in inside the train folder. The directory structure looks like this for training (supervised classification) :-</span></div> <div> <p><span style="font-size: 16px;">| -- dataset<br> | -- | -- train<br> | -- | -- | -- label_1<br> | -- | -- | -- | -- image_1.png<br> | -- | -- | -- | -- image_2.png<br> | -- | -- | -- | -- .....<br> | -- | -- | -- label_2<br> | -- | -- | -- | -- image_1.png<br> | -- | -- | -- | -- image_2.png<br> | -- | -- | -- | -- .....</span><span style="font-size: 16px;"> </span></p> </div> <div><span style="font-size: 16px;">I recently added a resize operation which would resize every image to be resized to the given provided new dimensions using the OpenCV resize function which will be reviewed by my mentor soon. I added a new flag to the CLI commands to display record data in a tabular format instead of JSON dumping them so as to make it easy to with long image arrays in a better way! </span><br> <br> <span style="color: #4e5f70;"><span style="font-size: 18px;"><u><strong>What is coming up next?</strong></u></span></span></div> <p><span style="font-size: 16px;">I will be working on finalising the directory source to accommodate for unsupervised classification too and on adding more functions from the OpenCV library to manipulate the image arrays and extract their features.</span><br> <br> <span style="color: #4e5f70;"><span style="font-size: 18px;"><strong><u>Did you get stuck anywhere?</u></strong></span></span></p> <p><span style="font-size: 16px;">Found out that the existing scikit models in DFFML are not able to train on features that are not single valued. So, I am trying to find a way to fix this bug for now.</span></p> <p><br> <span style="font-size: 16px;"><em>Thank you for reading!</em></span></p>sakshamarora1001@gmail.com (sakshamarora)Mon, 15 Jun 2020 09:56:45 +0000https://blogs.python-gsoc.org/en/sakshamaroras-blog/images-images-images-weekly-check-in-3/Brainstorming ideas - Weekly Check-in 2https://blogs.python-gsoc.org/en/sakshamaroras-blog/brainstorming-ideas-weekly-check-in-2/<p><span style="font-size: 28px;"><span style="color: #4e5f70;"><strong>End of Week 1  - 08/06/2020</strong></span></span></p> <p><br> <span style="font-size: 18px;"><span style="color: #4e5f70;"><u><strong>What did you do this week?</strong></u></span></span></p> <p><span style="font-size: 16px;">I had a lot of brainstorming sessions to decide on a well thought out layout for the project. Read lots of research papers, stack overflow answers, documentations and articles on image classification, pre-processing and feature extraction techniques. Tried out various image processing algorithms and feature extraction techniques and compiled a list of techniques and datasets I will be dealing with in the project. I had an individual meeting with the mentor where we discussed and decided upon the various ways we can go about the project. Also discussed the ways datasets would be handled by DFFML and what other possibilities there might be.</span><br> <br> <span style="font-size: 18px;"><span style="color: #4e5f70;"><u><strong>What is coming up next?</strong></u></span></span></p> <p><span style="font-size: 16px;">I will be starting on implementing ways to get the images from a dataset into the network and start wrapping various functions from the OpenCV library.</span><br> <br> <span style="color: #4e5f70;"><span style="font-size: 18px;"><strong><u>Did you get stuck anywhere?</u></strong></span></span></p> <p><span style="font-size: 16px;">Got stuck at lots of places like how will the image datasets get into the network and how will they be manipulated before finally extracting their features and feeding into a classification model, but got a clearer view on how things may work out after having discussions with my mentor.</span></p> <p><br> <span style="font-size: 16px;"><em>Thank you for reading!</em></span></p>sakshamarora1001@gmail.com (sakshamarora)Mon, 08 Jun 2020 07:13:33 +0000https://blogs.python-gsoc.org/en/sakshamaroras-blog/brainstorming-ideas-weekly-check-in-2/Beginning of Coding Period - Weekly Check-in 1https://blogs.python-gsoc.org/en/sakshamaroras-blog/beginning-of-coding-period-weekly-check-in-1/<div> <p><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: 16px;">&gt;&gt;&gt; import Introduction<br> &gt;&gt;&gt; Introduction.display()<br> Hello World! My name is Saksham Arora. I'm a 2nd year undergraduate student from India pursuing B. Tech in Information Technology. This is my blog for GSoC 2020 @ PSF! </span></span></p> </div> <div><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: 16px;">Over the summer, I'll be working with DFFML under the umbrella of Python Software Foundation. My project for the summer is to <strong>Integrate Image Processing into DFFML!</strong></span></span></div> <div> </div> <div> </div> <div><span style="font-size: 28px;"><span style="color: #4e5f70;"><span style="font-family: Arial,Helvetica,sans-serif;"><strong>GSoC 2020 Weekly Check-in 1 (End of Community Bonding Period - 01/06/2020)</strong></span></span></span></div> <div><br> <span style="color: #4e5f70;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: 18px;"><u><strong>What did you do this week?</strong></u></span></span></span></div> <p><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: 16px;">Since it was the last week of Community Bonding period, I worked on finishing a few pending issues assigned to me, researched and brushed up on important topics related to my GSoC project. In the community bonding period, we had virtual meetings (also called Weekly Syncs) twice a week where I interacted with the mentors to discuss about new features and enhancements for the project. Also, I went through a few videos and documentation on asynchronous functions in python which was recommended by one of the mentors as a part of understanding the codebase better!</span><br> <br> <span style="color: #4e5f70;"><span style="font-size: 18px;"><u><strong>What is coming up next?</strong></u></span></span></span></p> <p><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: 16px;">I will be adding the capability to normalize the MNIST dataset and pre-process any image provided for prediction on the dataset using the CLI before feeding it to a machine learning model. I will be discussing with the mentors on the best approach to get started on my project and start working on wrapping the OpenCV library with DFFML this week!</span><br> <br> <span style="color: #4e5f70;"><span style="font-size: 18px;"><strong><u>Did you get stuck anywhere?</u></strong></span></span></span></p> <p><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: 16px;">I briefly got stuck at a unittesting error where it was trying to create a test class out of a decorator function which it shouldn't be doing, I was eventually able to figure it out after thoroughly going through the importing section in the Python documentation.</span></span></p> <p> </p> <p><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: 16px;">I'm very excited to get started on this journey. I hope everyone does great this summer!<br> <em>Thank you for reading!</em></span></span></p>sakshamarora1001@gmail.com (sakshamarora)Mon, 01 Jun 2020 01:29:01 +0000https://blogs.python-gsoc.org/en/sakshamaroras-blog/beginning-of-coding-period-weekly-check-in-1/