Project: Using AI recognition on biological specimens, specifically hair.  

  RSS

Anibal
(@anibal)
Eminent Member
Joined: 4 months ago
Posts: 33
2020-02-12 5:52 am  

Goal: Identify biological specimens to the specie level.

Approach: I use an inexpensive AmScope microscope to study, analyze and identify hair specimens. For starters I am looking at Complimentary Metal Oxide Semiconductor (CMOS) image sensor that the microscope uses.

Concerns are for enough detail to allow for clear identification of diagnostic landmarks and features without worry of depth of field one would encounter in a photographic platform.

I do have thousands of mammalian hair samples gathered from an accurately professionally curated museum collection. Represented are thousands of species so the sample is very large and unique.

I am new to AI and I have discovered a website (Clarifai) to learn and explore. Another approach I am considering is to scan the specimen (surface) sample possibly by laser with AI learning the hair morphology of hair. My thought is to “read” the hair surface very much like a laser CD reader reads a disc. In fact I may want to hack the mechanics and electronics of a Video CD player or printer scanner or any device that can read and collect information, process and translate that information into an image while AI identifies the specimen(s).

I have been binge watching all of the DroneBot electronics videos and others on the Dronebot website learning and studying each one. It’s a long and discipline process but one of the great benefits of retirement.

To avoid the risk of turning this “proposal” I made to myself into a 20 page rant I hope to ask those of you out there in the DroneBot community who may have intimate knowledge or experience with AI and associated imagining electronics for advice and guidance to help me think about my approach and of course the science of this idea. I am of course looking to see if I can use an Arduino/Raspberry Pi as I want to make a device that is as simple and basic as possible and affordable. I am now at the Research and Development stage of my project. I have of course watched with great interest the excellent video Bill produced on the NVIDIA Jetson Nano Development KIT, which I now have.

Thank you,

Anibal

 


Quote
Robo Pi
(@robo-pi)
Robotics Engineer Moderator
Joined: 10 months ago
Posts: 1602
2020-02-12 7:05 am  

Hi Anibal,

I find your proposed project to be quite fascinating and hope you'll continue to post updates as you progress. I too have an interest in AI, but I am far from knowledgeable in the field.

Posted by: @anibal

I have of course watched with great interest the excellent video Bill produced on the NVIDIA Jetson Nano Development KIT, which I now have.

From what I've learned thus far the Jetson Nano does appear to be the best development board for this type of project in the price range.   I have two Nanos and I'm loving them.   I too am hoping to learn AI techniques.   As you probably already know, there are many different aspects to AI.

If you haven't see Paul McWhorter's course on AI on the Jetson Nano I strongly recommend it.  Although, he's not really focusing on the type of things you are planning.  None the less, his course can help you get started with Python and OpenCV which may be helpful to your application in the long haul.  I would imagine that you would most likely want to get into TensorFlow for your specific purpose.  I'm not sure whether Paul will cover TensorFlow eventually or not.

If you'd be interested in watching his course it can be found here AI on the Jetson Nano. His focus right now is simple object recognition and tracking.    You may wish to diverge from his course at some point, but it still may be useful for initial set up.  He'll get you all set up with Python, Numpy, OpenCV and a nice code editor called OSS.

If you find any courses that focus more on your goals I'd like to hear about them.  I'm interested in all aspects of AI and I am hoping to learn more about it.  But as I've said, other than wanting to learn, I can't say that I have any real knowledge of it at this point.  Especially with respect to your intended purpose.

Just the same I'll be very interested in hearing your progress.  So please keep us updated on what you discover in your journey.

DroneBot Workshop Robotics Engineer
James


ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer Moderator
Joined: 10 months ago
Posts: 1602
2020-02-12 7:26 am  

By the way, you might find these lectures quite interesting.   These are math lectures on how to reduce the dimensions of high dimensional data sets.

She has at least three courses, probably more you can check their YouTube channel for more lectures:

One course is on Dimensionality Reduction: High Dimensional Data:

A second course is on Dimensionality Reduction: Principal Components Analysis:

And one is on Dimensionality Reduction: Eigenpets

I found these lectures to be very well done.  She explains things very clearly.  This type of information would certainly be useful in your proposed project to be sure. ? 

DroneBot Workshop Robotics Engineer
James


ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer Moderator
Joined: 10 months ago
Posts: 1602
2020-02-12 8:13 am  
Posted by: @anibal

I do have thousands of mammalian hair samples gathered from an accurately professionally curated museum collection. Represented are thousands of species so the sample is very large and unique.

Is it your plan to create a data set from taking photos of these hair samples through your AmScope microscope?

That would indeed be a quite interesting project.   In addition to the AI analysis of the resulting data, you would first want to build an automated system to take those photos.   That part of the project wouldn't require AI, but it would require the use of a microcontroller or SBC like a Raspberry Pi.

If you are planning on doing that you might want to consider taking several photos of each sample under different types of lighting etc.   This will add to the richness of your data set. 

You could have front-lit, side-lit, and back-lit, as well as possibly IR and UV lighting as well.   Once you got the sample positioned on the microscope stage you could automate the process to take all these different lighting situations very rapidly.

I'm just guessing here of course.  But it sounds like a very interesting project for sure. ? 

DroneBot Workshop Robotics Engineer
James


ReplyQuote
Anibal
(@anibal)
Eminent Member
Joined: 4 months ago
Posts: 33
2020-02-12 1:48 pm  

@robo-pi

Thank you Robo Pi for your kind words of support. I have indeed assembled hundreds of microscope slide mounted by conventional microscopy technique. In addition, mounted also are hairs harvested from different parts of the body such as hair from the forehead, shoulders, belly, neck etc. Also, I have indeed incorporated IR & UV.

This idea was born from the need to properly identify ivory, bone, horn and other related materials, which I as an archeological museum technician have specialized.

The ivory angle is important but not necessary more important than hair as far as the approach to identification is concerned. . Hair is just much more easy and available to deal with because hair is shed from the animal and one does not need to have materials from a deceased animal in order to identify its place in the animal kingdom. Like hair, all ivories (elephant and its extinct cousins the mammoth & mastodon, sperm whale, walrus and any other ivory bearing creatures have diagnostic features used by the specialist in science, forensic, biology and even art and law enforcement.

In addition I am hoping to apply my technique to the requirements by law of CITES (Convention on the International Trade in Endangered Species) and ESA (Endangered Species Act). One major issue for example in the identification of elephant ivory is that the African specie can not be told apart from the Asian species by visual inspection instead only that it’s ivory from the elephant family and not from the walrus or whale family for example. So hair I think is a much easier and vital material to research and experiment with being ubiquitous even if I did not have available exotic specimens. Cat, dog, cow and horse are readily available domesticated animals from which to obtain samples from.

So, in closing my response to your comment, which is so appreciated and encouraging, I know and accept the large amount of research and development ahead. Much study and experimentation and for sure a multidisciplinary approach is a requirement and to be utilized. Ideas I do not lack.

Best,

Anibal

image

 


ReplyQuote
Anibal
(@anibal)
Eminent Member
Joined: 4 months ago
Posts: 33
2020-02-12 1:59 pm  

@robo-pi

Thank you so much for this tip and for directing me to the video on Dimensionality....

I am indeed familiar with Paul McWhorter and used his Arduino course and will continue to do so. I have so much yet to learn. I will let you know if I find particularly interesting  or helpful sites or videos. 

Best,

Anibal


ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer Moderator
Joined: 10 months ago
Posts: 1602
2020-02-12 5:55 pm  
Posted by: @anibal

Thank you Robo Pi for your kind words of support. I have indeed assembled hundreds of microscope slide mounted by conventional microscopy technique. In addition, mounted also are hairs harvested from different parts of the body such as hair from the forehead, shoulders, belly, neck etc. Also, I have indeed incorporated IR & UV.

Super impressive! ? 

Sounds like you're light-years ahead of my suggestions. ? 

I find these kinds of scientific projects fascinating.   I think you'll find Bing Brunton's courses on dimentionality reduction quite useful for your specific goals.   I watched all her courses with great interest just for fun.  Unfortunately I don't have anything that I can currently apply the techniques to,... yet.

The Paul McWhorter course, as you probably already know, is currently looking at methods of extracting specific features using thresholding and masking.    Between using video AI methods like this and applying Bing's dimensional reduction techniques you should be able to build a system that can identify the hairs using AI methods.  I would guess that you'll also need to learn TensorFlow as this is probably the tool you would use to employ the math that Bing is teaching into an actual AI algorithm.   I haven't yet learned TensorFlow myself, but from what I've read about it this is exactly what it is designed to be used for.  Having the math that Bing is teaching under your belt would certainly help you with TensorFlow since you would actually know ahead of time exactly what it is that you want TensorFlow to do.

In any case, these are just my crude ideas base on my own extremely limited knowledge in this field.  You're probably already way beyond me on all of this.   I've only recently learned what is going on in the field of AI.   So I'm far from an expert to be sure.   There are no doubt many other tools and techniques that I'm not even aware exist.

In fact, I'm currently studying how to create and design individual perceptrons.   So that's where I'm at.  I'm not even interested in moving on to more complex neural networks until I have an in-depth understanding of perceptrons.  Perceptrons are fascinating as they are not simple and there are actually many different ways to design perceptrons.   I could probably study perceptrons for the rest of my life.  That's how rich the topic is.   Fortunately, I'll be happy to just understand some of the more basic configurations of perceptrons.  Then I can move on to applying them to more complex neural networks.

Anyway, I don't want to side-track your thread into being about what I'm studying. You wouldn't need to study perceptrons for what you are doing.  You can just jump straight into using neural networks using TensorFlow.  Let the peceptrons take care of themselves. ?

DroneBot Workshop Robotics Engineer
James


ReplyQuote
Anibal
(@anibal)
Eminent Member
Joined: 4 months ago
Posts: 33
2020-02-12 7:40 pm  

@robo-pi

Hi adobo Pi

I took a look at the Paul McWhorther Jetson Nano video. I sat through the first video for beginners and I’m glad I did. Excellent that he presents it with warts and all. I like that kind of honest raw presentation simply because he shares the difficulties and mistakes.

I will definitely sit through the entire set of videos. My MO is to always view the tutorial or instructional videos from start to finish before I jump into the project . Sometimes I watch a video 2 or 3 times.

Again thank you for pointing me to Paul Whorthres site. 

Best,

Anibal 


ReplyQuote
Anibal
(@anibal)
Eminent Member
Joined: 4 months ago
Posts: 33
2020-03-01 9:38 pm  

Hi Dronebot;

I have now successfully loaded the Jetson Nano and is working as it should. However, I now want to download the Arduino IDE onto my Jetson Nano desktop and my installation of the Arduino IDE says the installation was successful. It seems however I cannot open the IDE or do I have nor can I find how to add the Arduino icon to my desktop. Please help. 

Thank you,

Anibal


ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer Moderator
Joined: 10 months ago
Posts: 1602
2020-03-01 11:53 pm  

I've been having trouble with this myself.  I managed to get the Arduino IDE installed with a desktop icon.  The installation process created that desktop icon automatically I think.   Although it doesn't show up as installed software, nor does it show up when I search for Arduino.   So if not for the desktop icon I wouldn't have a clue how to launch it.

The IDE launches without a problem on my Jetson Nano, but I'm using the cheaper Arduinos that require the CH340 USB interface and I haven't been able to get that to work yet.  I've actually given up on this for a while.  I think I need to start all over again from scratch with a new install.  If I do that I'll try to keep track of all the steps I went though.  It's been a while since I had installed this so I don't remember exactly how I installed it the first time.  I think I just downloaded it, then extracted it, and then ran install.sh.  I think that's all I had to do.  But I can't remember exactly.

I'll  have to try to reinstall it to see if I can remember everything I did.   But like I say, even though the IDE launches, I couldn't get it to recognize the board via the USB port.

DroneBot Workshop Robotics Engineer
James


ReplyQuote
Spyder
(@spyder)
Honorable Member
Joined: 10 months ago
Posts: 668
2020-03-02 12:56 am  
Posted by: @robo-pi

I think I just downloaded it, then extracted it, and then ran install.sh.  I think that's all I had to do

That's the accepted procedure. Although it is available via the software boutique, the software boutique is not recommended because, for some reason, the software boutique seems to always have an older, outdated version than the one you get from the arduino website.

Probably due to the time it takes to slipstream it into their installer thingy


ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer Moderator
Joined: 10 months ago
Posts: 1602
2020-03-02 1:03 am  

@spyder

I'm installing it on a different system SD card.  I'm doing it differently this time.  Last time I downloaded the IDE from Arduino.  This time I'm using a script from the JetsonHacksNano GitHub page.   It's currently downloading and taking forever.   It's 84% done.  I'll know pretty soon whether this worked or not.

Just for information, here's the Jetson Hacks video for this installation method:

It's done downloading and currently installing the program.  It also says that it's adding a shortcut to the desktop.  I'll need to reboot before launching it.  I go do that now and I should be back very shortly. ? 

DroneBot Workshop Robotics Engineer
James


ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer Moderator
Joined: 10 months ago
Posts: 1602
2020-03-02 1:18 am  

It working.  This time there was no problem with the USB serial connection.   It's recognizing the board.  I have my boards set up to display information about what program is on them and that information is displayed on the serial monitor.  So apparently it's working just fine.

I'll have to uninstall it from the other SD card and try reinstalling it this way and see if that helps with the USB connection over there. 

It also shows up in the Search window when I type in Arduino.   It wasn't showing up there on my other installation.   However, it still isn't showing up on the Installed Software list in the software installer shopping bag.

But it does appear to be working. 

Let me try to upload a Blink sketch just to be sure,......

Yep, she's blinking away. ? 

So all systems go so far!

It's probably best to use the Jetson Hacks Github script. They should know what's best for their own stuff.

The link is in the video.

Or you can just search for "GitHub InstallArduinoIDE" that should bring it up too.

DroneBot Workshop Robotics Engineer
James


ReplyQuote
Anibal
(@anibal)
Eminent Member
Joined: 4 months ago
Posts: 33
2020-03-05 7:19 pm  

@robo-pi

Hi Robo-pi;

I am viewing the Paul McWhorter's course on AI on the Jetson Nano and also his course on Python. Part of my research into hair is also identification of elephant ivory from both extinct and extant species and all the other ivories. In fact ivory, bone, horn and related materials is my specialty and  area of expertise. I have found that I should and need to write a code in Python and or C on Helicoid architecture as the structure of ivory is a Heliocoidial. The success of my idea rest on math. Unfortunately I'm not a math guy but I have taken up an interest in math in the last few years so it won't be painful to learn applied math for my project. I'm just not wired for math but I have accepted that long ago. I did set up my Jatson Nano and works except that can't seem to put an Icon for the Arduino IDE on the desktop, Also a note; while installing the wifi connection to the module, I had to replace the connects as I put much too much pressure and ruined the first contacts. Second time around I was carful and no problems. Also, I have not yet but the You Tube tip on Data set and Dimentionality is definitely  on my to do list. For sure I need to concentrate on learning Python and C and that is where my focus is now. Pyhton and math. I found 3 excellent papers but one in particular seems to be promising on Simple 3D Visualization of Some Common Mathematical Minimal Surfaces using MATLAB. 

Anyway, that where I am, sort of the R&D stage and loving every minute. It's the code writing and math I need to master and that's my focus along with the tutorials from teachers like Bill, Paul McWhorter et al. Bill if you have any suggestions they would  be greatly appreciated. I think I may reach to Paul McWhorter as he is a math teacher.  

Best,

Anibal


ReplyQuote

Please Login or Register