IP Cam Talk Custom Community DeepStack Model

105437

BIT Beta Team
Joined
Jun 8, 2015
Messages
2,023
Reaction score
907
Thanks @MikeLud1! I'll find time to test this out tomorrow and report back. Again, I really appreciate what you're doing with this.
 

lcam

Getting the hang of it
Joined
Aug 29, 2018
Messages
158
Reaction score
38
Location
US
I figured out how to download the images that DeepStack used to train the object model. With these images I can start to make the community custom DeepStack model, below are the steps to create the custom model.

The first step would be to create a new DeepStack custom model using the same image that DeepStack used but removing all the labels we do not want. Below is a list of the labels that I think we should keep and a list of labels we should remove. Please let me know if I should change the lists, I am planning to create the new model this weekend so let me know by Friday if I should change the list.

The second step would be to start adding new labels with images the everyone contributes to the custom model.

Labels To Keep:
person​
bicycle​
car​
motorcycle​
bus​
truck​
bird​
cat​
dog​
horse​
sheep​
cow​
bear​

Labels To Remove:
airplane​
train​
boat​
traffic light​
fire hydrant​
stop sign​
parking meter​
bench​
elephant​
zebra​
giraffe​
backpack​
umbrella​
handbag​
tie​
suitcase​
frisbee​
skis​
snowboard​
sports ball​
kite​
baseball bat​
baseball glove​
skateboard​
surfboard​
tennis racket​
bottle​
wine glass​
cup​
fork​
knife​
spoon​
bowl​
banana​
apple​
sandwich​
orange​
broccoli​
carrot​
hot dog​
pizza​
donut​
cake​
chair​
couch​
potted plant​
bed​
dining table​
toilet​
tv​
laptop​
mouse​
remote​
keyboard​
cell phone​
microwave​
oven​
toaster​
sink​
refrigerator​
book​
clock​
vase​
scissors​
teddy bear​
hair drier​
toothbrush​
Do you remember where you got the images for DS object model? I am interested in using it for learning.
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,203
Reaction score
4,241
Location
Brooklyn, NY
Do you remember where you got the images for DS object model? I am interested in using it for learning.
Image set is COCO-2017. I used FiftyOne to download the images and to convert the COCO labels to YOLO labels that DeepStack needs to make the custom models.

COCO - Common Objects in Context
 
Last edited:

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,203
Reaction score
4,241
Location
Brooklyn, NY
I am going to start working on the animal custom model, below is the list of labels I think we should have. Let me know if we should add more animals

Animal Labels:
bird
cat
dog
horse
sheep
cow
bear
deer
rabbit
raccoon
fox
coyote
possum
skunk
squirrel
boar
 
Last edited:

sebastiantombs

Known around here
Joined
Dec 28, 2019
Messages
11,511
Reaction score
27,691
Location
New Jersey
@MikeLud1 Thanks for going to all of this work and sharing it like this! I just installed both models on my BI machine and they're working very nicely! I suspect, looking at the file sizes, that detection may remain very fast since there are fewer choices. I also suspect, have no way to prove other an empirical observation over time, that detection success may actually increase due to less "confusion" on the part of python.

Again, if you want caps with headlight bloom at night just drop me a DM. I'll even run them through step one of the model creation in advance if it helps at all. The same for deer, raccoon, a few possum or a few fox at night.
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,203
Reaction score
4,241
Location
Brooklyn, NY
I am going to make a new combined model tonight that I think I can get better accuracy. The COCO image dataset that I am using for the training is heavy on person images. The new model I am going to reduce the person images to match the car image count. I think this change will improve the accuracy on all the labels.

1639157009896.png
 
Last edited:

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,203
Reaction score
4,241
Location
Brooklyn, NY
I'll even run them through step one of the model creation in advance if it helps at all. The same for deer, raccoon, a few possum or a few fox at night.
That is my plan for when everyone starts sending me the new images to add to the custom model. I found a web tool to do the labeling so no need to install any software and it is easier to use then LabelIMG.
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,203
Reaction score
4,241
Location
Brooklyn, NY
I suspect, looking at the file sizes, that detection may remain very fast since there are fewer choices
I think GPU version of DS will see some small improvement to the speed. If you are using the CPU version of DS there should be a big improvement to the speed.
 
Last edited:

sebastiantombs

Known around here
Joined
Dec 28, 2019
Messages
11,511
Reaction score
27,691
Location
New Jersey
I'm running the GPU version. I have three cameras that monitor for street traffic. Two are on one DS instance, the third on a second DS instance. The second camera to trigger on the first instance was taking ~100 to ~120ms on the stock model. Now, with combined, it's down at ~70ms so far after a few hours of running.
 
Last edited:

eeeeesh

BIT Beta Team
Joined
Jan 5, 2017
Messages
412
Reaction score
681
Deepstack newby here.

What do we do with these files?

This is what my DeepStack folder currently looks like that has .pt files. Do I just add the two new files (combined.pt and general.pt) to this folder or do I delete the 3 existing .pt files first?

TRI-224.jpg
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,821
Reaction score
48,395
Location
USA
Deepstack newby here.

What do we do with these files?

This is what my DeepStack folder currently looks like that has .pt files. Do I just add the two new files (combined.pt and general.pt) to this folder or do I delete the 3 existing .pt files first?

View attachment 111512
Per the help file, all custom models need to be in it's own separate folder or DeepStack will go wonky. It defaults as MyModels folder.
 

eeeeesh

BIT Beta Team
Joined
Jan 5, 2017
Messages
412
Reaction score
681
Per the help file, all custom models need to be in it's own separate folder or DeepStack will go wonky. It defaults as MyModels folder.
Geeez - did you really expect me to read the help file/manual??????

Just kidding, thanks for the help
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,821
Reaction score
48,395
Location
USA
Geeez - did you really expect me to read the help file/manual??????

Just kidding, thanks for the help
LOL - one thing we found with DeepStack is sometimes the help file is wrong and takes some revisions to catch up LOL. But this is one item it is LOL.
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,203
Reaction score
4,241
Location
Brooklyn, NY
I just started train the phase one animal model it should be done in the morning. I was going to make a new combined model but ran into some issue organizing the images, I figured out what I need to do so I will make a new combined model that should have better accuracy.

I will also post instruction on how to prepare the images with labels sometime this weekend so we can start adding new labels.

1639199232135.png
 

LopezEL

Getting the hang of it
Joined
Sep 30, 2019
Messages
97
Reaction score
90
Location
SC
I can't get Blue Iris to stop using the default "objects" model. So far, I have downloaded the combined model from Mike above. Placed it into the following directory and have pointed BI to the same directory in the global AI settings. C:\DeepStack\Custom DS

Afterward, I went into each camera setting and added the following string under custom models objects:0,combined

My detection speed is reduced for this model but overall it takes longer since it's still using the "objects" model.

Is there any way we can delete the objects model or move it without causing issues with Deepstack responding/detecting?
Anything else I should try to force BI to stop using default "objects" model?

1639233188697.png
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,203
Reaction score
4,241
Location
Brooklyn, NY
I can't get Blue Iris to stop using the default "objects" model. So far, I have downloaded the combined model from Mike above. Placed it into the following directory and have pointed BI to the same directory in the global AI settings. C:\DeepStack\Custom DS

Afterward, I went into each camera setting and added the following string under custom models objects:0,combined

My detection speed is reduced for this model but overall it takes longer since it's still using the "objects" model.

Is there any way we can delete the objects model or move it without causing issues with Deepstack responding/detecting?
Anything else I should try to force BI to stop using default "objects" model?

View attachment 111602
In the blue iris settings did you enable Use custom model folder or may since you did not use the default folder name (C:\DeepStack\MyModels) could be the issue. Try using the default folder name.

1639233637667.png
 

LopezEL

Getting the hang of it
Joined
Sep 30, 2019
Messages
97
Reaction score
90
Location
SC
I figured it out. It is working properly with the settings I listed above.

My issue was that I was using the analyze with deepstack setting on BI.
Apparently, if you push a clip through while using that feature, it automatically uses all of the deepstack models.

I went outside and triggered my driveway camera and it looks like it's only using the "combined" model on new triggers per my settings.

1639234470760.png1639234708451.png
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,203
Reaction score
4,241
Location
Brooklyn, NY
I figured it out. It is working properly with the settings I listed above.

My issue was that I was using the analyze with deepstack setting on BI.
Apparently, if you push a clip through while using that feature, it automatically uses all of the deepstack models.

I went outside and triggered my driveway camera and it looks like it's only using the "combined" model on new triggers per my settings.

View attachment 111605View attachment 111606
Are you using the CPU version of DeepStack, if so how much of an improvement are you seeing to the speed?
 

LopezEL

Getting the hang of it
Joined
Sep 30, 2019
Messages
97
Reaction score
90
Location
SC
I am using CPU version. It seems to be much quicker.
The minimum speed using default object detection on my intel I5 10400 was ~400ms.
The custom "combined" model is closer is 130ms.

This is a very small sample from AItool. I ran a couple images just to test it out.
The 10.0.0.6 address is for another computer I have on my LAN that helps out well. It is an older i5 4570 processor.

1639236011799.png



Are you using the CPU version of DeepStack, if so how much of an improvement are you seeing to the speed?
 
Top