CN114092699A - Method and system for cluster pig image segmentation based on transfer learning - Google Patents

Method and system for cluster pig image segmentation based on transfer learning Download PDF

Info

Publication number
CN114092699A
CN114092699A CN202111349051.1A CN202111349051A CN114092699A CN 114092699 A CN114092699 A CN 114092699A CN 202111349051 A CN202111349051 A CN 202111349051A CN 114092699 A CN114092699 A CN 114092699A
Authority
CN
China
Prior art keywords
segmentation
network
mask
training
model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111349051.1A
Other languages
Chinese (zh)
Inventor
徐昕
吴键
田红恩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University of Science and Technology
Original Assignee
Nanjing University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing University of Science and Technology filed Critical Nanjing University of Science and Technology
Priority to CN202111349051.1A priority Critical patent/CN114092699A/en
Publication of CN114092699A publication Critical patent/CN114092699A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a method and a system for dividing images of a shoal based on transfer learning, wherein the method comprises the steps of firstly collecting video data of the shoal and intercepting the video, dividing the intercepted images into a training set and a testing set, and labeling and preprocessing the image data; secondly, establishing a pig herding segmentation model which is an improved segmentation network model based on Mask R-CNN; based on transfer learning, taking a Mask R-CNN model trained in a COCO data set as initialization of a group-rearing pig image segmentation network, taking marked data as network input, and obtaining a final example segmentation network model through continuous training adjustment; and finally, inputting the test set into the example segmentation network and outputting a segmentation result. The method has excellent performance, can realize the example segmentation of the pig group, and has better generalization capability of the network.

Description

Method and system for cluster pig image segmentation based on transfer learning
Technical Field
The invention belongs to the field of individual segmentation of live pig images, and particularly relates to a method and a system for cluster pig image segmentation based on transfer learning.
Background
The machine vision technology is one of important technical means for monitoring the health condition of the live pigs and evaluating the welfare of the live pigs, has the advantages of easiness in installation, no contact, convenience in use and the like compared with a wearable sensor for monitoring related data, and has obvious advantages in application in large-scale breeding scenes.
At present, most of live pig breeding modes belong to a group-raising feeding mode, live pigs have gathering habits, when a machine vision technology is used for tracking and monitoring the states of the pigs, the images of the pigs are adhered, so that the individual images are difficult to segment, and the problem that the target states of the live pigs are monitored by utilizing the machine vision technology is also one of the problems.
The current methods for segmenting the stuck pigs in the herd pig images are roughly divided into two types: the image is segmented based on conventional image segmentation algorithms (including segmentation algorithms based on thresholds, regions, edge detection, etc.) and using depth learning. The former is susceptible to background, illumination, noise and the like, and the generalization capability of the segmentation model is poor; the latter comprises semantic segmentation and instance segmentation, has the characteristics of self-learning images, and solves the problems of noise and non-uniformity in the images. The semantic segmentation can distinguish different categories, and the example segmentation can distinguish different example individuals in the same category on the basis of the semantic segmentation, so that the possibility is provided for individual segmentation of the herd pigs in a large-scale breeding environment. Currently, the research for dividing the example into the adherent pigs is less, and the research depends on a large amount of marking data, and the data acquisition process and the marking process are time-consuming and labor-consuming.
Disclosure of Invention
The invention aims to provide a method and a system for cluster pig image segmentation based on transfer learning, which solve the problems that the conventional cluster pig image segmentation is difficult and a manual labeling data set wastes time and labor, so that the cluster pig instance segmentation is completed by using a small amount of labeling data sets, and the subsequent distinguishing and positioning of live pig individuals are further completed.
The technical solution for realizing the purpose of the invention is as follows: a method for cluster pig image segmentation based on transfer learning comprises the following steps:
step 1, making a data set: firstly, collecting video data of a cluster pig and acquiring a sampling image, then dividing the image into a training set and a testing set according to a proportion, and labeling and preprocessing a data set;
step 2, building a segmentation network: the segmentation network is improved based on a Mask R-CNN network structure, a backbone network of a Mask R-CNN network frame is selected, and output types are adjusted;
step 3, after training is carried out on the COCO data set based on a Mask R-CNN segmentation network, parameters are migrated and used as initialization of segmentation network parameters;
step 4, inputting the training set marked in the step 1 into a segmentation network initialized by weight, and obtaining an improved segmentation model through training;
and 5, inputting the test set into the trained segmentation model, and outputting a cluster pig instance segmentation image.
The invention also provides a system for cluster pig image segmentation based on transfer learning, which comprises the following steps:
the data set manufacturing module is used for acquiring video data of the pigs and acquiring sampling images, dividing the images into a training set and a test set according to a proportion, and labeling and preprocessing the data sets;
the system comprises a segmentation network building module, a data processing module and a data processing module, wherein the segmentation network building module is used for building a segmentation network, the segmentation network is improved based on a Mask R-CNN network structure, a backbone network of a Mask R-CNN network framework is selected, and the output class is adjusted;
the parameter migration module is used for training on the COCO data set based on a Mask R-CNN segmentation network, migrating parameters and initializing the parameters of the segmentation network;
the segmentation model training module is used for inputting the marked training set into a segmentation network initialized by weight and obtaining an improved segmentation model through training;
and the output module is used for inputting the test set into the trained segmentation model and outputting the cluster pig example segmentation image.
Compared with the prior art, the invention has the following remarkable advantages:
(1) the improved Mask R-CNN-based segmentation algorithm is used for realizing example segmentation of the images of the pigs, and compared with the traditional pig swarm segmentation method, the method realizes example segmentation of the pigs, is less influenced by noise and has better generalization capability;
(2) the method is based on the theory of transfer learning, initializes the parameters of the segmentation network, avoids the dependence on a large number of labeled data sets, and has short time cost and quicker training convergence.
The present invention is described in further detail below with reference to the attached drawing figures.
Drawings
FIG. 1 is a flow chart of a method for cluster pig image segmentation based on transfer learning according to the present invention;
FIG. 2 is a schematic structural diagram of an improved Mask R-CNN split network in the present invention;
FIG. 3 is an original image of a pig herd image test set according to the present invention.
FIG. 4 is a mask of an original image of a test set of images of pigs according to the present invention.
FIG. 5 is a schematic diagram of the segmentation result of an original image of a pig herd image test set according to the present invention.
Detailed Description
As shown in fig. 1, the method for cluster pig image segmentation based on transfer learning of the present invention includes the following steps:
step 1, making a data set. Firstly, collecting video data of a cluster pig and acquiring a sampling image, then dividing the image into a training set and a testing set according to a proportion, and labeling and preprocessing a data set;
the image labeling and preprocessing steps are as follows:
reading video data, intercepting one frame of uniform sampling every 25 frames, and intercepting a picture of a pig group; labeling the edge contour of each live pig in the pig swarm image by using label points by using Labelme label software, classifying by using different label tags, and storing to generate a json file; after the marking is finished, converting the json file into a COCO data set format in batches for subsequent network training; before the image is input into the network, the image is subjected to a rotation operation for image enhancement.
And 2, building a segmentation network. The segmentation network in the invention is improved based on a Mask R-CNN network structure. Backbone networks of Mask R-CNN network frames are selected, and output types are adjusted;
the segmentation network adopts an improved Mask R-CNN model; aiming at the application scene of the group pigs, the Mask R-CNN network is adjusted and improved: 1) setting the output of the class branch as 0 and 1, representing outputting two types, namely background and live pig target; 2) aiming at the research scene and hardware configuration of the invention, selecting a backbone as ResNet-50+ FPN; the improved Mask R-CNN split network structure is shown in FIG. 2.
As shown in fig. 2, the network model mainly includes a backbone network, an RPN (target area generation network), and a network output module; the backbone network adopts ResNet50+ FPN to extract features, the extracted features are divided into two branches, one branch is used for ROIAlign pooling layer processing, the other branch is used for extracting feature information through an RPN convolution layer, and possible target candidate areas are finally generated; the output section includes the completion of prediction classes and regression box tasks via the fully-connected layer, and the mask output via the convolutional layer.
The Loss function Loss of the improved split network comprises three parts, as shown in formula (1):
L=Lcls+Lbox+Lmask (1)
wherein L represents a loss function, LclsIndicates a classification error, LboxTo representDetection error, LmaskIndicating a segmentation error. L iscls、LboxThe category to which each ROI (region of interest) belongs and the regression frame coordinate value are predicted by full-connected layer processing. L ismaskThe target for each ROI (region of interest) is segmented and a mask is assigned.
And 3, model pre-training based on transfer learning, and initializing parameters of the segmentation network. After training on a COCO data set based on a Mask R-CNN segmentation network, migrating parameters to serve as initialization of segmentation network parameters in the invention;
firstly, carrying out transfer learning by utilizing a ResNet50+ FPN instance segmentation model trained in advance on a COCO data set to obtain the input characteristic number of a classifier; secondly, replacing the head segmentation frame predictor of the trained classifier with a Fast R-CNN predictor to obtain the input feature number and the hidden layer number of the mask classifier; and finally, replacing the head code evolution predictor of the trained classifier with a Mask R-CNN predictor, and initializing a Mask R-CNN instance segmentation network model of the self.
If a network is trained from the beginning, time and labor are consumed, and network weight initialization can be realized by using transfer learning, so that the training speed is accelerated; COCO data sets are rich in types, although the research object pig target in the invention is not available, a plurality of animal data sets are contained, namely, some basic characteristics of animals are contained, therefore, the training can be accelerated by loading Mask R-CNN model weights trained on the data sets for initializing own network.
And 4, inputting the labeled data set into the segmentation model, and training the segmentation model. Inputting the training set marked in the step 1 into a segmentation network initialized by weight, and obtaining an improved segmentation model through training;
the process of training the segmentation network is as follows:
1) a pre-training stage, loading the pre-trained initial model in the step 3;
2) on the basis of pre-training, inputting the marked data set into a pre-trained improved segmentation model, and accelerating operation by using a GPU (graphics processing unit), wherein the processing speed is tens of times faster than that of a CPU (central processing unit);
3) setting model parameters, wherein the main configuration parameters of model training in the network are as follows: convolution kernel size 7 × 7; the activation function is ReLU; the optimizer model is SGD; the learning rate of the SGD optimizer is 0.002, and the learning rate adjustment rule is: the multiplication factor for updating the learning parameters is 0.1 every 3 times of training; the momentum factor is 0.9; the regularization weight attenuation coefficient is 0.0005; setting the iteration number to be 10;
4) and continuously repeating the process until the network loss function is converged, the accuracy of the training set and the test set tends to be stable, and the representative model training is finished.
And 5, inputting the test set into the trained segmentation model, and outputting a cluster pig instance segmentation image.
Further, the invention also provides a system for cluster pig image segmentation based on transfer learning, which comprises:
the data set manufacturing module is used for acquiring video data of the pigs and acquiring sampling images, dividing the images into a training set and a test set according to a proportion, and labeling and preprocessing the data sets;
the system comprises a segmentation network building module, a data processing module and a data processing module, wherein the segmentation network building module is used for building a segmentation network, the segmentation network is improved based on a Mask R-CNN network structure, a backbone network of a Mask R-CNN network framework is selected, and the output class is adjusted;
the parameter migration module is used for training on the COCO data set based on a Mask R-CNN segmentation network, migrating parameters and initializing the parameters of the segmentation network;
the segmentation model training module is used for inputting the marked training set into a segmentation network initialized by weight and obtaining an improved segmentation model through training;
and the output module is used for inputting the test set into the trained segmentation model and outputting the cluster pig example segmentation image.
The specific implementation of the above module is partially the same as the above segmentation method, and is not described herein again.
The following further describes embodiments of the present invention with reference to the accompanying drawings.
Examples
With reference to fig. 1 and 2, the method for cluster pig image segmentation based on transfer learning of the present invention comprises the following steps:
firstly, making a data set: collecting a cluster pig video, reading video data, intercepting one frame of uniform sampling every 25 frames, and intercepting 50 pictures of the cluster pig; dividing 40 pictures of the pigs as a training set, and 10 pictures of the pigs as a testing set; using Labelme labeling software to perform point tracing labeling on each live pig target in the images of the pigs according to outline boundaries, naming each live pig target differently, and storing and generating json files; after the marking is finished, converting the json file into a COCO data set format in batches for subsequent network training; before the image is input into the network, the image is subjected to a rotation operation for image enhancement.
And step two, building a segmentation network: aiming at the application scene of the group pigs, the Mask R-CNN network is adjusted and improved: 1) setting the output of the class branch as 0 and 1, representing outputting two types, namely background and live pig target; 2) aiming at the research scene and hardware configuration of the invention, selecting a backbone as ResNet-50+ FPN; the structure of the improved Mask R-CNN segmentation network is shown in figure 2.
The Mask R-CNN model mainly comprises a backbone network, an RPN (target area generation network) and a network output module; the backbone network adopts restnet50+ FPN to extract features, the extracted features are divided into two branches, one branch is used for ROIAlign pooling layer processing, the other branch is used for extracting feature information through an RPN convolution layer, and possible target candidate areas are finally generated; the output section includes the completion of prediction classes and regression box tasks via the fully-connected layer, and the mask output via the convolutional layer.
The Loss function Loss of the improved split network comprises three parts, as shown in formula (1):
L=Lcls+Lbox+Lmask (1)
wherein L represents a loss function, LclsIndicates a classification error, LboxIndicating detection errorDifference, LmaskIndicating a segmentation error. L iscls、LboxThe category to which each ROI (region of interest) belongs and the regression frame coordinate value are predicted by full-connected layer processing. L ismaskThe target for each ROI (region of interest) is segmented and a mask is assigned.
In the data of the pigs in the group collected in the invention, the number of the pigs in each graph is 2-9, according to the flow of the network structure, the pig group segmentation graph finally endows different color masks for different live pig targets, represents different individuals of the same live pig type in the graph, and realizes example segmentation.
And thirdly, initializing parameters of the segmentation network based on model pre-training of the transfer learning. After a Mask R-CNN segmentation network is trained on a COCO data set, parameters are migrated to serve as initialization of segmentation network parameters in the invention.
And fourthly, training the segmentation network. The specific training process is as follows:
1) a pre-training stage, loading the pre-trained initial model in the step 3;
2) on the basis of pre-training, inputting the marked data set into a pre-trained improved segmentation model, and accelerating the operation speed of the image by using a GPU;
3) setting model parameters, wherein the main configuration parameters of model training in the network are as follows: convolution kernel size 7 × 7; the activation function is ReLU; the optimizer model is SGD; the learning rate of the SGD optimizer is 0.002, and the learning rate adjustment rule is: the multiplication factor for updating the learning parameters is 0.1 every 3 times of training; the momentum factor is 0.9; the regularization weight attenuation coefficient is 0.0005; setting the iteration number to be 10;
4) continuously repeating the above processes until the network loss function is converged, the accuracy of the training set and the test set tends to be stable, and the representative model training is completed;
and fifthly, inputting the test set into the trained segmentation network, and outputting the segmentation result of the images of the pigs.
The hardware used in the present invention is configured as: intel (R) core (TM) i5-1135 G72.4GHz CPU; a 16G RAM; MX450 GPU; the software is configured to: based on the Anaconda3 environment; the Python version is 3.8.0; the development tool is jupyter notebook; the Pythrch version is 1.7.1; the torchversion version is 0.8.2; and a GeForce expeience GPU acceleration, cuda110, cudnn8.0 is used.
The segmentation results of the output images of the pigs in this example are shown in fig. 3-5, taking 6 live pigs as an example. Wherein FIG. 3 represents one of the test sets, the original image; FIG. 4 shows the labeled data set and names for each individual pig, representing 6 different pigs; after the improved network segmentation, fig. 5 shows the output pig herd segmentation result, and it can be seen from the figure that the method provided by the present invention can better segment different morphologically adherent pig herds, and endow each individual pig with different masks, thereby finally realizing example segmentation of the pig herd.

Claims (10)

1. A method for cluster pig image segmentation based on transfer learning is characterized by comprising the following steps:
step 1, making a data set: firstly, collecting video data of a cluster pig and acquiring a sampling image, then dividing the image into a training set and a testing set according to a proportion, and labeling and preprocessing a data set;
step 2, building a segmentation network: the segmentation network is improved based on a Mask R-CNN network structure, a backbone network of a Mask R-CNN network frame is selected, and output types are adjusted;
step 3, after training is carried out on the COCO data set based on a Mask R-CNN segmentation network, parameters are migrated and used as initialization of segmentation network parameters;
step 4, inputting the training set marked in the step 1 into a segmentation network initialized by weight, and obtaining an improved segmentation model through training;
and 5, inputting the test set into the trained segmentation model, and outputting a cluster pig instance segmentation image.
2. The method for image segmentation of herds pigs based on transfer learning as claimed in claim 1, wherein the image labeling and preprocessing steps in step 1 are as follows:
reading video data, intercepting one frame of uniform sampling every 25 frames, and intercepting a picture of a pig group; labeling the edge contour of each live pig in the pig swarm image by using label points by using Labelme label software, classifying by using different label tags, and storing to generate a json file; after the marking is finished, converting the json file into a COCO data set format in batches for subsequent network training; before the image is input into the network, the image is subjected to a rotation operation for image enhancement.
3. The method for cluster pig image segmentation based on transfer learning as claimed in claim 1, wherein the segmentation network in step 2 adopts a Mask R-CNN model based on improvement, and the improvement is as follows: 1) setting the output of the class branch as 0 and 1, representing outputting two types, namely background and live pig target; 2) selecting backbone as ResNet-50+ FPN;
the network model mainly comprises a backbone, an RPN and a network output module; the backbone network adopts restnet50+ FPN to extract features, the extracted features are divided into two branches, one branch is used for ROIAlign pooling layer processing, the other branch is used for extracting feature information through an RPN convolution layer, and possible target candidate areas are finally generated; the output part comprises a mask which is output by the convolution layer and used for completing the tasks of the prediction category and the regression frame through the full connection layer;
the loss function of the improved split network includes three parts, as shown in equation (1):
L=Lcls+Lbox+Lmask (1)
wherein L represents a loss function, LclsIndicates a classification error, LboxIndicates a detection error, LmaskRepresenting a segmentation error; l iscls、LboxPredicting the category and regression frame coordinate value of each ROI by utilizing full-connection layer processing; l ismaskThe target for each ROI is segmented and given a mask.
4. The method for image segmentation of herds pigs based on migratory learning according to claim 1, wherein the migration of model weights based on migratory learning in step 3:
firstly, carrying out transfer learning by utilizing a ResNet50+ FPN instance segmentation model trained in advance on a COCO data set to obtain the input characteristic number of a classifier;
secondly, replacing the head segmentation frame predictor of the trained classifier with a Fast R-CNN predictor to obtain the input feature number and the hidden layer number of the mask classifier;
and finally, replacing the head code evolution predictor of the trained classifier with a Mask R-CNN predictor, and initializing a Mask R-CNN instance segmentation network model of the self.
5. The method for image segmentation of herds pigs based on transfer learning of claim 1, wherein the process of training the segmentation network in step 4 comprises:
1) a pre-training stage, loading the pre-trained initial model in the step 3;
2) on the basis of pre-training, inputting the marked data set into a pre-trained improved segmentation model;
3) setting model parameters, wherein the main configuration parameters of model training in the network are as follows: convolution kernel size 7 × 7; the activation function is ReLU; the optimizer model is SGD; the learning rate of the SGD optimizer is 0.002, and the learning rate adjustment rule is: the multiplication factor for updating the learning parameters is 0.1 every 3 times of training; the momentum factor is 0.9; the regularization weight attenuation coefficient is 0.0005; setting the iteration number to be 10;
4) and continuously repeating the process until the network loss function is converged, the accuracy of the training set and the test set tends to be stable, and the representative model training is finished.
6. A system for cluster pig image segmentation based on transfer learning, comprising:
the data set manufacturing module is used for acquiring video data of the pigs and acquiring sampling images, dividing the images into a training set and a test set according to a proportion, and labeling and preprocessing the data sets;
the system comprises a segmentation network building module, a data processing module and a data processing module, wherein the segmentation network building module is used for building a segmentation network, the segmentation network is improved based on a Mask R-CNN network structure, a backbone network of a Mask R-CNN network framework is selected, and the output class is adjusted;
the parameter migration module is used for training on the COCO data set based on a Mask R-CNN segmentation network, migrating parameters and initializing the parameters of the segmentation network;
the segmentation model training module is used for inputting the marked training set into a segmentation network initialized by weight and obtaining an improved segmentation model through training;
and the output module is used for inputting the test set into the trained segmentation model and outputting the cluster pig example segmentation image.
7. The system for image segmentation of herds pigs based on migration learning according to claim 6, wherein the labeling and preprocessing of the data set comprises: reading video data, intercepting one frame of uniform sampling every 25 frames, and intercepting a picture of a pig group; labeling the edge contour of each live pig in the pig swarm image by using label points by using Labelme label software, classifying by using different label tags, and storing to generate a json file; after the marking is finished, converting the json file into a COCO data set format in batches for subsequent network training; before the image is input into the network, the image is subjected to a rotation operation for image enhancement.
8. The system for image segmentation of herds of pigs based on migration learning as claimed in claim 6, wherein the segmentation network employs a modified Mask R-CNN based model, modified as follows: 1) setting the output of the class branch as 0 and 1, representing outputting two types, namely background and live pig target; 2) selecting backbone as ResNet-50+ FPN;
the network model mainly comprises a backbone, an RPN and a network output module; the backbone network adopts restnet50+ FPN to extract features, the extracted features are divided into two branches, one branch is used for ROIAlign pooling layer processing, the other branch is used for extracting feature information through an RPN convolution layer, and possible target candidate areas are finally generated; the output part comprises a mask which is output by the convolution layer and used for completing the tasks of the prediction category and the regression frame through the full connection layer;
the loss function of the improved split network includes three parts, as shown in equation (1):
L=Lcls+Lbox+Lmask (1)
wherein L represents a loss function, LclsIndicates a classification error, LboxIndicates a detection error, LmaskRepresenting a segmentation error; l iscls、LboxPredicting the category and regression frame coordinate value of each ROI by utilizing full-connection layer processing; l ismaskThe target for each ROI is segmented and given a mask.
9. The system for image segmentation of herds pigs based on migration learning as claimed in claim 6, wherein the parameters are migrated in a specific manner as follows: carrying out transfer learning by utilizing a ResNet50+ FPN instance segmentation model trained in advance on a COCO data set to obtain the input characteristic number of the classifier; replacing the head segmentation frame predictor of the trained classifier with a Fast R-CNN predictor to obtain the input characteristic number and the hidden layer number of the mask classifier; and replacing the head code evolution predictor of the trained classifier with a Mask R-CNN predictor, and initializing a Mask R-CNN instance segmentation network model of the self.
10. The system for image segmentation of herds of pigs based on migratory learning of claim 6, wherein the process of training the segmentation network is:
in the pre-training stage, loading a pre-trained initial model;
on the basis of pre-training, inputting the marked data set into a pre-trained improved segmentation model;
setting model parameters, wherein the main configuration parameters of model training in the network are as follows: convolution kernel size 7 × 7; the activation function is ReLU; the optimizer model is SGD; the learning rate of the SGD optimizer is 0.002, and the learning rate adjustment rule is: the multiplication factor for updating the learning parameters is 0.1 every 3 times of training; the momentum factor is 0.9; the regularization weight attenuation coefficient is 0.0005; setting the iteration number to be 10;
and continuously repeating the process until the network loss function is converged, the accuracy of the training set and the test set tends to be stable, and the representative model training is finished.
CN202111349051.1A 2021-11-15 2021-11-15 Method and system for cluster pig image segmentation based on transfer learning Pending CN114092699A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111349051.1A CN114092699A (en) 2021-11-15 2021-11-15 Method and system for cluster pig image segmentation based on transfer learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111349051.1A CN114092699A (en) 2021-11-15 2021-11-15 Method and system for cluster pig image segmentation based on transfer learning

Publications (1)

Publication Number Publication Date
CN114092699A true CN114092699A (en) 2022-02-25

Family

ID=80300820

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111349051.1A Pending CN114092699A (en) 2021-11-15 2021-11-15 Method and system for cluster pig image segmentation based on transfer learning

Country Status (1)

Country Link
CN (1) CN114092699A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115116026A (en) * 2022-05-26 2022-09-27 江苏大学 Automatic tracking method and system for logistics carrying robot
CN116703897A (en) * 2023-08-02 2023-09-05 青岛兴牧畜牧科技发展有限公司 Pig weight estimation method based on image processing

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115116026A (en) * 2022-05-26 2022-09-27 江苏大学 Automatic tracking method and system for logistics carrying robot
CN115116026B (en) * 2022-05-26 2024-04-09 江苏大学 Automatic tracking method and system for logistics transfer robot
CN116703897A (en) * 2023-08-02 2023-09-05 青岛兴牧畜牧科技发展有限公司 Pig weight estimation method based on image processing
CN116703897B (en) * 2023-08-02 2023-10-13 青岛兴牧畜牧科技发展有限公司 Pig weight estimation method based on image processing

Similar Documents

Publication Publication Date Title
Zhou et al. Evaluation of fish feeding intensity in aquaculture using a convolutional neural network and machine vision
CN111178197B (en) Mass R-CNN and Soft-NMS fusion based group-fed adherent pig example segmentation method
CN112163465B (en) Fine-grained image classification method, fine-grained image classification system, computer equipment and storage medium
CN112131927B (en) Sow delivery time prediction system based on gesture conversion characteristics in late gestation period
CN114092699A (en) Method and system for cluster pig image segmentation based on transfer learning
CN111199202B (en) Human body action recognition method and recognition device based on circulating attention network
CN112613428B (en) Resnet-3D convolution cattle video target detection method based on balance loss
CN113591671B (en) Fish growth identification detection method based on Mask-Rcnn
CN113139977B (en) Mouth cavity curve image wisdom tooth segmentation method based on YOLO and U-Net
CN110853070A (en) Underwater sea cucumber image segmentation method based on significance and Grabcut
CN111079837B (en) Method for detecting, identifying and classifying two-dimensional gray level images
CN115115830A (en) Improved Transformer-based livestock image instance segmentation method
Junaidi et al. Image classification for EGG incubator using transfer learning of VGG16 and VGG19
CN115578423A (en) Fish key point detection, individual tracking and biomass estimation method and system based on deep learning
CN113643297B (en) Computer-aided age analysis method based on neural network
Wang et al. Pig face recognition model based on a cascaded network
McLeay et al. Deep convolutional neural networks with transfer learning for waterline detection in mussel farms
CN117253192A (en) Intelligent system and method for silkworm breeding
CN115497021A (en) Method for identifying fine granularity of sow lactation behavior based on computer vision
CN115272956A (en) Chicken health degree monitoring method based on improved YOLOv5
Han et al. Mask_LaC R-CNN for measuring morphological features of fish
CN116596167B (en) Livestock breeding scheme optimization method based on data deep fusion processing
CN115641466B (en) Method for discriminating sick cattle based on video data
CN113723456B (en) Automatic astronomical image classification method and system based on unsupervised machine learning
CN115482419B (en) Data acquisition and analysis method and system for marine fishery products

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination