ckm3 / deep-transit Goto Github PK
View Code? Open in Web Editor NEWTransit identification based on the object detection algorithm
License: Other
Transit identification based on the object detection algorithm
License: Other
When running from the quick start:
bboxes = dt.DeepTransit(lc, is_flat=True).transit_detection(model_path)
I receive the following error:
C:\Users\peter\anaconda3\lib\site-packages\deep_transit\dt_lightcurve.py:317: UserWarning: The total number of progress bar is the upper limit.
0%| | 0/4 [00:00<?, ?it/s]
Loading Model: model_Kepler.pth
0%| | 0/4 [00:00<?, ?it/s]
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-4-efa83d90cf6f> in <module>
----> 1 bboxes = dt.DeepTransit(lc, is_flat=True).transit_detection(model_path)
~\anaconda3\lib\site-packages\deep_transit\dt_lightcurve.py in transit_detection(self, local_model_path, batch_size, confidence_threshold, nms_iou_threshold, device_str, backend)
316 rough_length = math.ceil(math.ceil((len(self.lc) * exp_time - 30) / 25 + 1) * 4 / batch_size)
317 warnings.warn('The total number of progress bar is the upper limit.')
--> 318 for data in tqdm(self._data_loader(batch_size=batch_size, backend=backend), total=rough_length):
319 lc_data = data[:, 0]
320 flux_min, flux_max = data[:, 2], data[:, 3]
~\anaconda3\lib\site-packages\tqdm\std.py in __iter__(self)
1176
1177 try:
-> 1178 for obj in iterable:
1179 yield obj
1180 # Update and possibly print the progressbar.
~\anaconda3\lib\site-packages\deep_transit\dt_lightcurve.py in _data_loader(self, batch_size, backend)
269 with warnings.catch_warnings():
270 warnings.simplefilter("ignore")
--> 271 chunk = np.array(list(itertools.islice(it, batch_size)))
272 if chunk.size == 0:
273 return
~\anaconda3\lib\site-packages\deep_transit\dt_lightcurve.py in _splited_lc_generator(self, backend)
258 if len(splited_flatten_lc) < 1 / exp_time:
259 continue
--> 260 img_arr = _light_curve_to_image_array(splited_flatten_lc, (flux_min, flux_max))
261 image = np.array(Image.fromarray(img_arr).convert("L"))
262 image = backend.trans(image)
~\anaconda3\lib\site-packages\deep_transit\dt_lightcurve.py in _light_curve_to_image_array(lc_object, flux_range)
118 ax.set_ylim([flux_range[0], flux_range[1]])
119 fig.savefig(io_buf, format='raw', dpi=100)
--> 120 img_arr = np.reshape(np.frombuffer(io_buf.getvalue(), dtype=np.uint8),
121 newshape=(int(fig.bbox.bounds[3]), int(fig.bbox.bounds[2]), 4))
122 io_buf.close()
<__array_function__ internals> in reshape(*args, **kwargs)
~\anaconda3\lib\site-packages\numpy\core\fromnumeric.py in reshape(a, newshape, order)
297 [5, 6]])
298 """
--> 299 return _wrapfunc(a, 'reshape', newshape, order=order)
300
301
~\anaconda3\lib\site-packages\numpy\core\fromnumeric.py in _wrapfunc(obj, method, *args, **kwds)
56
57 try:
---> 58 return bound(*args, **kwds)
59 except TypeError:
60 # A TypeError occurs if the object does have such a method in its
ValueError: cannot reshape array of size 756900 into shape (416,416,4)
I am running on a cpu. Help?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.