MCPcopy Create free account
hub / github.com/chenhaoxing/HDNet / __init__

Method __init__

util/image_pool.py:12–21  ·  view source on GitHub ↗

Initialize the ImagePool class Parameters: pool_size (int) -- the size of image buffer, if pool_size=0, no buffer will be created

(self, pool_size)

Source from the content-addressed store, hash-verified

10 """
11
12 def __init__(self, pool_size):
13 """Initialize the ImagePool class
14
15 Parameters:
16 pool_size (int) -- the size of image buffer, if pool_size=0, no buffer will be created
17 """
18 self.pool_size = pool_size
19 if self.pool_size > 0: # create an empty pool
20 self.num_imgs = 0
21 self.images = []
22
23 def query(self, images):
24 """Return an image from the pool.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected